I never used it too
But maybe something like this:
Code:
new Weapons[32]
new numWeapons, i, weapon
get_user_weapons(id, Weapons, numWeapons)
for (i=0; i<numWeapns; i++)
{
weapon = Weapons[i]
if ( weapon == CSW_HEGRENADE )
{
client_print ( id , print_chat , "[AmxX] You already own one," )
}
else if ( money < ( multi * g_he_nade ) )
{
new bool:noMoney = true
}
else
{
new bool:giveGrenade = true
}
}
if(noMoney) client_print(id , print_chat, "[AmxX] You do not have enough money." )
if(giveGrenade)
{
give_item (id , "weapon_hegrenade" )
cs_set_user_money ( id , money - ( multi * g_he_nade ) )
client_print ( id , print_chat , "[AmxX] Thank you for using Emergency Ammo!" )
}
return PLUGIN_HANDLED
greetz regalis
PS: thx 4 karma
__________________