Teleport without vehicle - 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: Teleport without vehicle (
/showthread.php?tid=353961)
Teleport without vehicle -
Crazyboobs - 25.06.2012
Hello!
I made a teleport command but when i use that command with a bike or any vehicle, then i will reach at that place without the vehicle.Why it is like that? can anyone tell me a solution for this?
command
pawn Код:
CMD:dearf(playerid,params[]) {
SetPlayerPos(playerid,-1657.5400,-164.9457,14.1484);
SetPlayerInterior(playerid,0);
return 1;}
Re: Teleport without vehicle -
Dubya - 25.06.2012
Here you go:
pawn Код:
CMD:dearf(playerid,params[])
{
if (GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1657.5400, -164.9457, 14.1484);
SetPlayerInterior(playerid, 0);
}
else
{
SetPlayerPos(playerid, -1657.5400, -164.9457, 14.1484);
SetPlayerInterior(playerid, 0);
}
return 1;
}
Re: Teleport without vehicle -
Crazyboobs - 25.06.2012
Worked! ty dude +rep