Cerere modificare plugin

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
mariusexeqt
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 199
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 4 times
Contact:

08 Jan 2021, 20:53

Salut, am pluginul asta de vip furien ( T )
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Furien V.I.P Knives"
#define VERSION "1.0"
#define AUTHOR "dRaGoNeLy"

#define ADMIN_VIP ADMIN_LEVEL_H

#define IsPlayer(%0) (1 <= %0 <= MaxPlayers)

new const szTag[] = "[AMXX]";
new const szContact[] = "[email protected]";

new const Model1[66] = "models/furien/v_dual_katana.mdl";
new const Model2[66] = "models/furien/v_axe.mdl";
new const Model3[66] = "models/furien/v_daedric.mdl";

new bool:DualKatana[32];
new bool:Axe[32];
new bool:Daedric[32];

new MaxPlayers;

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	RegisterHam(Ham_TakeDamage, "player", "ClCmdDamage") 
	register_event("CurWeapon", "ClCmdModels", "be", "1=1")
	register_clcmd("say /vipshop", "ClCmdKnivesTest")
	MaxPlayers = get_maxplayers()
}

public plugin_precache()
{
	precache_model(Model1)
	precache_model(Model2)
	precache_model(Model3)
}

public client_putinserver(id)
{
	DualKatana[id] = false;
	Axe[id] = false;
	Daedric[id] = false;
}

public client_disconnect(id)
{
	DualKatana[id] = false;
	Axe[id] = false;
	Daedric[id] = false;
}

public ClCmdModels(id)
{
	if(get_user_weapon(id) == CSW_KNIFE && DualKatana[id])
	{
		set_pev(id, pev_viewmodel2, Model1)
	}
	if(get_user_weapon(id) == CSW_KNIFE && Axe[id])
	{
		set_pev(id, pev_viewmodel2, Model2)
	}
	if(get_user_weapon(id) == CSW_KNIFE && Daedric[id])
	{
		set_pev(id, pev_viewmodel2, Model3)
	}
}

public ClCmdDamage(iVictim, iInflictor, iAttacker, Float:fDamage)
{
	if(iInflictor == iAttacker && DualKatana[iAttacker] || Axe[iAttacker] || Daedric[iAttacker] && IsPlayer(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE)
	{
		SetHamParamFloat(4, fDamage * 2.0)
		return HAM_HANDLED;
	}
	
	return HAM_IGNORED;
	
}

public ClCmdKnivesTest(id)
{
	if(get_user_flags(id) & ADMIN_VIP)
	{
		if(get_user_team(id) == 1 && is_user_alive(id))
		{
			ClCmdKnives(id)
		}
		else
		{
			client_print(id, print_chat, "%s Nu ai acces pentru a accesa meniul!", szTag);
		}
	}
	else
	{
		client_print(id, print_chat, "%s Doar V.I.P poate accesa meniul! Contact Y!M: %s", szTag, szContact);
	}
	
	return 1;
}

public ClCmdKnives(id)
{
	new szMenu = menu_create("\yFurien \rV.I.P \wKnives", "ClCmdKnives2")
	
	menu_additem(szMenu, "Dual Katana \y[ \r2X Damage \y] \w- \y16000$", "1")
	menu_additem(szMenu, "Axe \y[ \r2X Damage \y] \w- \y16000$", "2")
	menu_additem(szMenu, "Daedric \y[ \r2X Damage \y] \w- \y16000$", "3")
	
	menu_setprop(szMenu, MPROP_EXITNAME, "Exit Menu")
	menu_display(id, szMenu, 0)
	
	return 1;
}

public ClCmdKnives2(id, szMenu, item)
{
	if(item == MENU_EXIT)
	{
		menu_destroy(szMenu);
		return 1;
	}
	
	new money = cs_get_user_money(id);
	
	switch(item)
	{
		case 0:
		{
			if(money < 16000)
			{
				client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag)
			}
			else
			{
				give_item(id, "weapon_knife")
				DualKatana[id] = true;
				Axe[id] = false;
				Daedric[id] = false;
				ClCmdModels(id)
				client_print(id, print_chat, "%s Ti-ai cumparat un Dual Katana!", szTag);
				cs_set_user_money(id, money - 16000);
			}
		}
		case 1:
		{
			if(money < 16000)
			{
				client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag)
			}
			else
			{
				give_item(id, "weapon_knife")
				DualKatana[id] = false;
				Axe[id] = true;
				Daedric[id] = false;
				ClCmdModels(id)
				client_print(id, print_chat, "%s Ti-ai cumparat un Axe!", szTag);
				cs_set_user_money(id, money - 16000);
			}
		}
		case 2:
		{
			if(money < 16000)
			{
				client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag)
			}
			else
			{
				give_item(id, "weapon_knife")
				DualKatana[id] = false;
				Axe[id] = false;
				Daedric[id] = true;
				ClCmdModels(id)
				client_print(id, print_chat, "%s Ti-ai cumparat un Daedric!", szTag);
				cs_set_user_money(id, money - 16000);
			}
		}
	}
	menu_destroy(szMenu);
	return 1;
}
sunt cateva bug-uri
-daca mor ramane sk-ul
daca pierd runda la t ramane sk-ul la ct
RoyalServer
User avatar
ciprian3213
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 23 Mar 2015, 17:17
Detinator Steam: Da
CS Status: Nothing here !
Fond eXtream: 0
Location: Dorohoi, Botosani
Contact:

21 Jan 2021, 13:32

Poftim.
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Furien V.I.P Knives"
#define VERSION "1.0"
#define AUTHOR "dRaGoNeLy"

#define ADMIN_VIP ADMIN_LEVEL_H

#define IsPlayer(%0) (1 <= %0 <= MaxPlayers)

new const szTag[] = "[AMXX]";
new const szContact[] = "[email protected]";

new const Model1[66] = "models/furien/v_dual_katana.mdl";
new const Model2[66] = "models/furien/v_axe.mdl";
new const Model3[66] = "models/furien/v_daedric.mdl";

new bool:DualKatana[32];
new bool:Axe[32];
new bool:Daedric[32];

new MaxPlayers;

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	RegisterHam(Ham_TakeDamage, "player", "ClCmdDamage") 
	register_event("CurWeapon", "ClCmdModels", "be", "1=1")
	register_clcmd("say /vipshop", "ClCmdKnivesTest")
	
	RegisterHam(Ham_Spawn, "player", "hamPlayerSpawnPost", 1);
	register_event("DeathMsg", "eDeath", "a")
	
	MaxPlayers = get_maxplayers()
}

public hamPlayerSpawnPost(id)
{
	if(is_user_alive(id) && get_user_team(id) == 2)
	{
		DualKatana[id] = false;
		Axe[id] = false;
		Daedric[id] = false;
	}	
}

public eDeath ( ) {
	
	if (DualKatana[read_data(2)] || Axe[read_data(2)] || Daedric[read_data(2)])
	{
		
		DualKatana[read_data(2)] = false;
		Axe[read_data(2)] = false;
		Daedric[read_data(2)] = false;
	}
}

public plugin_precache()
{
	precache_model(Model1)
	precache_model(Model2)
	precache_model(Model3)
}

public client_putinserver(id)
{
	DualKatana[id] = false;
	Axe[id] = false;
	Daedric[id] = false;
}

public client_disconnect(id)
{
	DualKatana[id] = false;
	Axe[id] = false;
	Daedric[id] = false;
}

public ClCmdModels(id)
{
	if(get_user_weapon(id) == CSW_KNIFE && DualKatana[id])
	{
		set_pev(id, pev_viewmodel2, Model1)
	}
	if(get_user_weapon(id) == CSW_KNIFE && Axe[id])
	{
		set_pev(id, pev_viewmodel2, Model2)
	}
	if(get_user_weapon(id) == CSW_KNIFE && Daedric[id])
	{
		set_pev(id, pev_viewmodel2, Model3)
	}
}

public ClCmdDamage(iVictim, iInflictor, iAttacker, Float:fDamage)
{
	if(iInflictor == iAttacker && DualKatana[iAttacker] || Axe[iAttacker] || Daedric[iAttacker] && IsPlayer(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE)
	{
		SetHamParamFloat(4, fDamage * 2.0)
		return HAM_HANDLED;
	}
	
	return HAM_IGNORED;
	
}

public ClCmdKnivesTest(id)
{
	if(get_user_flags(id) & ADMIN_VIP)
	{
		if(get_user_team(id) == 1 && is_user_alive(id))
		{
			ClCmdKnives(id)
		}
		else
		{
			client_print(id, print_chat, "%s Nu ai acces pentru a accesa meniul!", szTag);
		}
	}
	else
	{
		client_print(id, print_chat, "%s Doar V.I.P poate accesa meniul! Contact Y!M: %s", szTag, szContact);
	}
	
	return 1;
}

public ClCmdKnives(id)
{
	new szMenu = menu_create("\yFurien \rV.I.P \wKnives", "ClCmdKnives2")
	
	menu_additem(szMenu, "Dual Katana \y[ \r2X Damage \y] \w- \y16000$", "1")
	menu_additem(szMenu, "Axe \y[ \r2X Damage \y] \w- \y16000$", "2")
	menu_additem(szMenu, "Daedric \y[ \r2X Damage \y] \w- \y16000$", "3")
	
	menu_setprop(szMenu, MPROP_EXITNAME, "Exit Menu")
	menu_display(id, szMenu, 0)
	
	return 1;
}

public ClCmdKnives2(id, szMenu, item)
{
	if(item == MENU_EXIT)
	{
		menu_destroy(szMenu);
		return 1;
	}
	
	new money = cs_get_user_money(id);
	
	switch(item)
	{
		case 0:
		{
			if(money < 16000)
			{
				client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag)
			}
			else
			{
				give_item(id, "weapon_knife")
				DualKatana[id] = true;
				Axe[id] = false;
				Daedric[id] = false;
				ClCmdModels(id)
				client_print(id, print_chat, "%s Ti-ai cumparat un Dual Katana!", szTag);
				cs_set_user_money(id, money - 16000);
			}
		}
		case 1:
		{
			if(money < 16000)
			{
				client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag)
			}
			else
			{
				give_item(id, "weapon_knife")
				DualKatana[id] = false;
				Axe[id] = true;
				Daedric[id] = false;
				ClCmdModels(id)
				client_print(id, print_chat, "%s Ti-ai cumparat un Axe!", szTag);
				cs_set_user_money(id, money - 16000);
			}
		}
		case 2:
		{
			if(money < 16000)
			{
				client_print(id, print_chat, "%s Nu ai suficienti bani!", szTag)
			}
			else
			{
				give_item(id, "weapon_knife")
				DualKatana[id] = false;
				Axe[id] = false;
				Daedric[id] = true;
				ClCmdModels(id)
				client_print(id, print_chat, "%s Ti-ai cumparat un Daedric!", szTag);
				cs_set_user_money(id, money - 16000);
			}
		}
	}
	menu_destroy(szMenu);
	return 1;
}
Last edited by ciprian3213 on 22 Jan 2021, 16:49, edited 2 times in total.
User avatar
mariusexeqt
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 199
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 4 times
Contact:

21 Jan 2021, 22:12

nu merge, nu se deschide
User avatar
ciprian3213
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 23 Mar 2015, 17:17
Detinator Steam: Da
CS Status: Nothing here !
Fond eXtream: 0
Location: Dorohoi, Botosani
Contact:

22 Jan 2021, 04:29

L-am testat acum și mie îmi merge.
User avatar
mariusexeqt
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 199
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 4 times
Contact:

22 Jan 2021, 09:48

edit : merge , mersi mult
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests