12.06.2016, 12:31
(
Последний раз редактировалось Ugaustin; 13.06.2016 в 11:18.
)
how can I Disallow ENTER at job vehicles if player is doing job... so players can do job !!
#include <foreach> //at top if u don't have public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(!ispassenger) { foreach(Player,i) { if( i != playerid && GetPlayerVehicleID(i) == vehicleid && GetPlayerState(i) == PLAYER_STATE_DRIVER && PlayerWithJob[i]) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x , y , z); SetPlayerPos(playerid, x , y , z + 1); break; } } } return 1; }
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;
}