i need only teror can do this
this is code from my hns shop
PHP Code:
public menu1(id, menu, item)
{
if (item == MENU_EXIT){
menu_destroy(menu)
return PLUGIN_HANDLED
}
new Data[6];
new Access;
new Callback;
new Name[64];
menu_item_getinfo(menu, item, Access, Data, 5, Name, 63, Callback)
new Key = str_to_num(Data);
switch (Key){
case 1:{
if (!is_user_alive(id))
{
return PLUGIN_HANDLED
}
new cost = get_pcvar_num(cost_deagle)
if (money[id] < cost){
ColorChat(id,"^1You don't have money to Deagle")
}
else{
ColorChat(id,"your buy Deagle", Name)
cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 1);
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
}