SA-MP Forums Archive
Help with Teleporting - 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: Help with Teleporting (/showthread.php?tid=234376)



Help with Teleporting - yoan103 - 03.03.2011

I want to teleport to a place. When i drive a vehicle and type the command for the teleport, the system teleports me, but without my vehicle! Can you give me a fix to this problem, and also, how do i teleport without the vehicle I'm driving?


Re: Help with Teleporting - yoan103 - 03.03.2011

bump


Re: Help with Teleporting - iggy1 - 03.03.2011

Use this before you teleport. (SetPlayerPos)
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
    RemovePlayerFromVehicle(playerid);



Re: Help with Teleporting - yoan103 - 03.03.2011

Thanks


Re: Help with Teleporting - iggy1 - 03.03.2011

Yw, just thinking about it you might want to use this to prevent vehicle pileups.
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
    new
        vehicleid = GetPlayerVehicleID(playerid);
    RemovePlayerFromVehicle(playerid);
    SetVehicleToRespawn(vehicleid);
}