if(GetPlayerSkin(playerid) == 280 || 281 || 282 || 283 || 284 || 285 || 286 || 288 || 300 || 301 || 302 ) { if(!AccInfo[playerid][Police]) return GameTextForPlayer(playerid,"~r~This Skin Is For~n~Police~n~Only",4000,1); } |
new vehicleid = GetPlayerVehicleID(playerid); GetVehicleModel(vehicleid); if(GetVehicleModel(vehicleid) == 599 || 596 || 597 || 598 || 497 || 520 || 528 || 425 || 427 || 523 || 490) { if(!AccInfo[playerid][Police]) { RemovePlayerFromVehicle(playerid); GameTextForPlayer(playerid, "~r~Police Only!", 1000, 5); } } |
This has to do something with variable Police.You sure you reset it when a new account is created?
|
This has to do something with variable Police.You sure you reset it when a new account is created?
|
if(GetPlayerSkin(playerid) == 280 || 281 || 282 || 283 || 284 || 285 || 286 || 288 || 300 || 301 || 302 )
new SkinID = GetPlayerSkin(playerid); if( SkinID == 280 || SkinID == 281 || SkinID == 282 /* And so on**/ )
Your 'if' statement is incorrect.
Код:
if(GetPlayerSkin(playerid) == 280 || 281 || 282 || 283 || 284 || 285 || 286 || 288 || 300 || 301 || 302 ) Код:
new SkinID = GetPlayerSkin(playerid); if( SkinID == 280 || SkinID == 281 || SkinID == 282 /* And so on**/ ) Your original code checks if SkinID is '280' the rest of it checks if 281 ... 302 is non-zero - which it is. |
Your 'if' statement is incorrect.
Код:
if(GetPlayerSkin(playerid) == 280 || 281 || 282 || 283 || 284 || 285 || 286 || 288 || 300 || 301 || 302 ) Код:
new SkinID = GetPlayerSkin(playerid); if( SkinID == 280 || SkinID == 281 || SkinID == 282 /* And so on**/ ) Your original code checks if SkinID is '280' the rest of it checks if 281 ... 302 is non-zero - which it is. |
public OnVehicleStreamIn(vehicleid, forplayerid) { switch( GetVehicleModel(vehicleid) ) { case 599, 596, 597, 598, 497, 520, 528, 425, 427, 532, 490: { if (!AccInfo[forplayerid][Police]) SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1); else SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 0); } } return 1; }