24.06.2016, 11:19
This code should prevent non-military players to not be able to enter the vehicles, but looks like they can't eneter any vehicle in-game, how so?I struggled with the code for quite a while and I am out of ideas.Help would be appreciated.Thanks in advance
Code
Code
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_DRIVER)
{
new CarID = GetPlayerVehicleID(playerid);
if(pInfo[playerid][Class] != CLASS_MILITARY && aDuty[playerid] == 0 && GetVehicleModel(CarID) == 520, 447, 579, 432, 470, 433)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, -1, "{FFFF00}[SERVER] {FFFFFF}This is an army vehicle. You can't enter it.");
}
}
return 1;
}

