30.07.2013, 00:51
So I've made a job, and I'm trying to remove a player from the vehicle when he attempts to enter it without the job. It's working fine, but it happens when I try to enter ANY vehicle.
I haven't scripted for a while, and I'm a bit out of shape. Any help would be appreciated.
I haven't scripted for a while, and I'm a bit out of shape. Any help would be appreciated.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == pilotjobvehicle1 || pilotjobvehicle2)
{
if(job[playerid] == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+3);
SendClientMessage(playerid,-1, "You must have the Pilot Job in order to fly this vehicle.");
return 1;
}
}
return 1;
}
pawn Код:
pilotjobvehicle1 = CreateVehicle(593,1912.4984,-2241.7793,13.5469,180.3823,0,3, 3000);
pilotjobvehicle2 = CreateVehicle(593,1932.0745,-2241.7368,13.5469,187.1307, 0, 3, 3000);