Change
To
PHP Code:
new bool:userm3[33]
Set that boolean false at spawn or anywhere you want.
And
PHP Code:
case 1:
{
if( !is_user_alive( id ) )
{
ColorChat( id, NORMAL,"You can not buy items if you are dead");
return PLUGIN_HANDLED;
}
else if (get_user_flags( id ) & ADMIN_LEVEL_H )
{
ColorChat( id, NORMAL,"You need to be VIP to buy this item");
return PLUGIN_HANDLED;
}
else if(userm3[id])
{
ColorChat( id, NORMAL, "You have already buy this item before");
return PLUGIN_HANDLED;
}
else
{
if( bm_points[id] >= 30 )
{
bm_points[id] -= 30
fm_give_item( id, "weapon_m3" )
cs_set_weapon_ammo( find_ent_by_owner( -1, "weapon_m3", id ), 1 )
cs_set_user_bpammo(id, CSW_M3, 0)
userm3[id] = true
new szName[32];
get_user_name(id, szName, charsmax(szName));
ColorChat( 0, NORMAL, "%s bought M3", szName )
}
else
{
ColorChat( id, NORMAL, "You need more points to buy M3")
}
}
}
__________________