SA-MP Forums Archive
Changing Passgenger - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Changing Passgenger (/showthread.php?tid=445185)



Changing Passgenger - AchievementMaster360 - 20.06.2013

So this a code i have a vehicle to teleport you if you enter the car
Код:
if(newstate == PLAYER_STATE_PASSENGER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 427)
 	{
	    TogglePlayerControllable(playerid, 0);
        GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
     	SetPVarInt(playerid, "LoadingObjects", 1);
      	SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
     	SetPlayerPos(playerid, 2229.9919, -1175.8452, 1014.2710);
     	SetPlayerFacingAngle(playerid, 0);
        SetCameraBehindPlayer(playerid);
        SetPlayerInterior(playerid, 1);
		InEnforcer[playerid] = GetPlayerVehicleID(playerid);
	}
I want the passenger on the backseat to enter it only if you are passenger 2 and 3 not 1 next to the driver how would i make it work for only the second and third passenger?