09.05.2017, 20:53
pawn Код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && GetOnlinePlayers() < 20) //OP vehicles players limit for normal players
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 520 || GetVehicleModel(vehicleid) == 432 || GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 447 || GetVehicleModel(vehicleid) == 476)
{
SendClientMessage(playerid,0xAA3333AA,"* You can drive this vehicle only if there are more than 20 players online.");
RemovePlayerFromVehicle(playerid);
return 1;
}