here the full codes. Where is the wrong ? :/
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
public plugin_init()
{
register_plugin("CAMenu", "0.10", "Oguz&Tulga");
register_clcmd("say !camenu", "CokAmacliMenu");
}
public CokAmacliMenu(id)
{
new menu = menu_create("\yCokAmacliMenu:", "camenu_handler");
menu_additem(menu, "\wCamouflage On&Off", "1", ADMIN_LEVEL_A);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
public camenu_handler(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
new team;
team = get_user_team(id);
if (team == 1) //TERRORIST
{
cs_set_user_model(id, "urban");
set_hudmessage(255, 0, 0, -1.0, -1.0);
show_hudmessage(id, "Suan CT Gorunumundesiniz");
}
else if (team == 2)
{
cs_set_user_model(id, "leet");
set_hudmessage(255, 0, 0, -1.0, -1.0);
show_hudmessage(id, "Suan T Gorunumundesiniz");
}
CokAmacliMenu(id);
}
}
return PLUGIN_HANDLED;
}