11.09.2012, 18:59
those warnings come from the vehicle models used in a string ("430") etc. i got a slightly modified suggestion, using arrays for identifying an admin-vehicle-model:
not tested, should work nevertheless...
pawn Код:
new AdminVehicle[622];
//OnGameModeInit
AdminVehicle[425]=1;
AdminVehicle[430]=1;
AdminVehicle[432]=1;
AdminVehicle[520]=1;
AdminVehicle[601]=1;
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(!IsPlayerAdmin(playerid))
{
if(newstate == PLAYER_STATE_DRIVER && AdminVehicle[GetVehicleModel(GetPlayerVehicleID(playerid))] == 1)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,0xFF0000FF,"Admins only!");
}
}
return 1;
}