Kód: Vybrat vše
#include <amxmisc>
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
public plugin_init()
{
register_plugin("JB Herne Mody", "1.0", "RayCodeCSC")
register_clcmd("say /herneemody", "herne_mody_menu")
register_clcmd("say /hm", "herne_mody_menu")
}
public herne_mody_menu(id)
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
new herne_mody = menu_create("Vyber si herny mod:", "herne_mody_menu_selection")
menu_additem(herne_mody, "Scout")
menu_additem(herne_mody, "Prestrelka")
menu_additem(herne_mody, "Schovavacka")
menu_additem(herne_mody, "AWP")
menu_additem(herne_mody, "Zombie")
menu_additem(herne_mody, "Granaty")
menu_additem(herne_mody, "Nahanacka")
menu_display(id, herne_mody)
}
else if(cs_get_user_team(id) == CS_TEAM_T)
{
client_print(id, print_chat, "[HERNE-MODY] Musis byt CT, aby si mohol dat herny mod!")
}
}
public herne_mody_menu_selection(id, menu, item)
{
switch(item)
{
case MENU_EXIT:
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 0: //Scout
{
new iPlayers[32], iPlayersCount, iPlayer
get_players(iPlayers, iPlayersCount)
for(new i = 0; i < iPlayersCount; i++)
{
iPlayer = iPlayers[i]
if(cs_get_user_team(iPlayer) == CS_TEAM_T)
{
give_item(iPlayer, "weapon_scout")
cs_set_user_bpammo(iPlayer, CSW_SCOUT, 10)
client_print(iPlayer, print_chat, "Zacal sa herny mod: Scout !")
}
else if(cs_get_user_team(iPlayer) == CS_TEAM_CT)
{
strip_user_weapons(iPlayer)
give_item(iPlayer, "weapon_scout")
cs_set_user_bpammo(iPlayer, CSW_SCOUT, 10)
client_print(iPlayer, print_chat, "Zacal sa herny mod: Scout !")
}
}
}
case 1: //Prestrelka
{
new iPlayers[32], iPlayersCount, iPlayer
get_players(iPlayers, iPlayersCount)
for(new i = 0; i < iPlayersCount; i++)
{
iPlayer = iPlayers[i]
if(cs_get_user_team(iPlayer) == CS_TEAM_T)
{
give_item(iPlayer, "weapon_m4a1")
give_item(iPlayer, "weapon_deagle")
cs_set_user_bpammo(iPlayer, CSW_M4A1, 32)
cs_set_user_bpammo(iPlayer, CSW_DEAGLE, 10)
client_print(iPlayer, print_chat, "Zacal sa herny mod: Prestrelka !")
}
else if(cs_get_user_team(iPlayer) == CS_TEAM_CT)
{
strip_user_weapons(iPlayer)
give_item(iPlayer, "weapon_m4a1")
give_item(iPlayer, "weapon_deagle")
cs_set_user_bpammo(iPlayer, CSW_M4A1, 32)
cs_set_user_bpammo(iPlayer, CSW_DEAGLE, 10)
client_print(iPlayer, print_chat, "Zacal sa herny mod: Prestrelka !")
}
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}