13.06.2016, 12:09
Use OnPlayerEnterVehicle.
You can stop the player from entering the vehicle if he's not doing the job like this:
You can stop the player from entering the vehicle if he's not doing the job like this:
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new model = GetVehicleModel(vehicleid);
if(model == 407){
if(Fireman[playerid] == 0){
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X,Y,Z);
SendClientMessage(playerid, COLOR_WHITE, "You don't have the fireman job.");
return 1;
}
}
return 1;
}

