SA-MP Forums Archive
RC Cars - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: RC Cars (/showthread.php?tid=236843)



RC Cars - darkknight123 - 08.03.2011

Is there any way that when you exit a RC car youll be put back where you where before you enterd? I'm trying to make a RP server and Its not realy RP if the player TPs to the RC car after they exit it :/


Re: RC Cars - Sascha - 08.03.2011

this at the top
pawn Код:
new Float:PlayerCoord[MAX_PLAYERS][4];
this where you enter the rc veh (before "PutPlayerInVehicle")
pawn Код:
GetPlayerPos(playerid, PlayerCoord[playerid][0], PlayerCoord[playerid][1], PlayerCoord[playerid][2]);
GetPlayerFacingAngle(playerid, PlayerCoord[playerid][3]);
and this where you leave it again (at the cmd or wherever you've defined it)
pawn Код:
SetPlayerPos(playerid, PlayerCoord[playerid][0], PlayerCoord[playerid][1], PlayerCoord[playerid][2]);
SetPlayerFacingAngle(playerid, PlayerCoord[playerid][3]);
hope it works