For an example, can you change it me in a simple weapongive script?
PHP Code:
public cmdMenu(id)
{
if( got_weapon[id] )
{
client_print(id, print_chat, "%L", LANG_PLAYER, "HAVEALREADY")
return PLUGIN_CONTINUE
}
showMenu(id)
return PLUGIN_CONTINUE
}
and then the switchcase for the weapons:
PHP Code:
switch(key)
{
case 1:
{
give_item(id, "weapon_ak47")
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id,CSW_AK47,90)
cs_set_user_bpammo(id,CSW_DEAGLE,35)
got_weapon[id] = true
}
sorry, but i am new @ c++ and i donīt know ALL

but i have done a look at many plugins and all what I see is.. well nothing i just trie to fix something and it will work, or not
so what i have tried is to use instead of got_weapon[id],
if ( ++NumBuy <= 2 ) in the public_cmdMenu. But NumBuy is undefined