Hello guys i want to make that to take it only vips i used that but does not work anyone can help ?
PHP Code:
if (get_user_flags( id ) ) & ADMIN_LEVEL_H ) {
ColorChat( id, NORMAL,"You need to be VIP to buy this item");
return PLUGIN_HANDLED;
}
Code:
case 1:
{
if (get_user_flags( id ) ) & ADMIN_LEVEL_H ) {
ColorChat( id, NORMAL,"You need to be VIP to buy this item");
return PLUGIN_HANDLED;
}
if( !is_user_alive( id ) ) {
ColorChat( id, NORMAL,"You can not buy items if you are dead");
return PLUGIN_HANDLED;
}
if(userm3[id] > 0) {
ColorChat( id, NORMAL, "You have already buy this item before");
return PLUGIN_HANDLED;
}
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)
new m3name[42]
get_user_name(id, m3name, 32)
userm3[id]++;
new szName[33];
get_user_name(id, szName, 32);
ColorChat( 0, NORMAL, "%s bought M3", szName )
} else {
ColorChat( id, NORMAL, "You need more points to buy M3")
}
}