SA-MP Forums Archive
Can't get my car to TP with me - 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: Can't get my car to TP with me (/showthread.php?tid=249489)



Can't get my car to TP with me - Deal-or-die - 19.04.2011

Hey there fellow scripters,
I was just making a Teleport System on my server, i have made it so that Your character can teleport, but it leaves the car behind
Which is my problem, i want it to take the car with you
My Script...
pawn Код:
case 1://San Fierro
                    {
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -1641.9742, 431.1623, 7.1102);
                        SetVehiclePos(playerid, -1641.9742, 431.1623, 7.1102);
                    }



Re: Can't get my car to TP with me - antonio112 - 19.04.2011

pawn Код:
case 1://San Fierro
                    if(!IsPlayerInAnyVehicle(playerid))
                    {
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -1641.9742, 431.1623, 7.1102);
                    }
                    else
                    {
                        SetVehiclePos(GetPlayerVehicleID(playerid), -1641.9742, 431.1623, 7.1102);
                        SendClientMessage(playerid, -1, "Teleported !");
                    }
That should work.