SA-MP Forums Archive
need help with teleport! command - 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: need help with teleport! command (/showthread.php?tid=103803)



need help with teleport! command - unique1801 - 21.10.2009

I made a map on air!!

i want to make a teleport command for it!

like when i type /abc

it should go therE!!

how to get the position ?


Re: need help with teleport! command - CAR - 21.10.2009

Get the X, Y, Z of the object where the player must spawn on.

Example: CreateObject(1234, 1234.234, 2142.1245,2452.5243);

The X, Y and Z are the three after the object ID. : X= 1234.234 Y = 2142.1245 Z = 2452.5243
Do the Z +5 or something, that the player is not IN the object:
2452.5243 + 5 = 2457.5243
And then:

pawn Код:
SetPlayerPos(playerid, 1234.234, 2142.1245, 2457.5243); // edited



Re: need help with teleport! command - unique1801 - 21.10.2009

SetPlayerPos(playerid, 1234.234, 2147.1245);

u mean

SetPlayerPos(playerid, X , y);

thats it ?

wherz z


Re: need help with teleport! command - CAR - 21.10.2009

edited:
pawn Код:
SetPlayerPos(playerid, 1234.234, 2142.1245, 2457.5243); // edited



Re: need help with teleport! command - unique1801 - 21.10.2009

it is working

but when i go to /abc

with a vehicle no objects get spawned...!!

but when i come on foot

every object is spawned pls help



Re: need help with teleport! command - CAR - 22.10.2009

pawn Код:
new PlayerVehicle;
SetPlayerPos(playerid, 1234.234, 2142.1245, 2457.5243); // edited
PlayerVehicle = GetPlayerVehicleID(playerid)
SetVehiclePos(GetPlayerVehicleID(playerid), 1234.234, 2142.1245, 2457.5243);
PutPlayerInVehicle(PlayerVehicle);
Maybe so


Re: need help with teleport! command - Correlli - 22.10.2009

Quote:
Originally Posted by CAR
pawn Код:
PutPlayerInVehicle(PlayerVehicle);
Maybe so
PutPlayerInVehicle has 3 parameters: playerid, vehicleid, seatid.


Re: need help with teleport! command - CAR - 22.10.2009

Why I do everything wrong

OK:
pawn Код:
new PlayerVehicle;
SetPlayerPos(playerid, 1234.234, 2142.1245, 2457.5243); // edited
PlayerVehicle = GetPlayerVehicleID(playerid)
SetVehiclePos(GetPlayerVehicleID(playerid), 1234.234, 2142.1245, 2457.5243);
PutPlayerInVehicle(playerid,PlayerVehicle,0);



Re: need help with teleport! command - Peter_Corneile - 22.10.2009

Quote:
Originally Posted by CAR
Why I do everything wrong

OK:
pawn Код:
new PlayerVehicle;
SetPlayerPos(playerid, 1234.234, 2142.1245, 2457.5243); // edited
PlayerVehicle = GetPlayerVehicleID(playerid)
SetVehiclePos(GetPlayerVehicleID(playerid), 1234.234, 2142.1245, 2457.5243);
PutPlayerInVehicle(playerid,PlayerVehicle,0);
You should refer to Wiki SAMP Scripting Functions before posting


Re: need help with teleport! command - CAR - 22.10.2009

Quote:
Originally Posted by ►Peter Corneile◄ [hugu-hosting.co.uk
]
Quote:
Originally Posted by CAR
Why I do everything wrong

OK:
pawn Код:
new PlayerVehicle;
SetPlayerPos(playerid, 1234.234, 2142.1245, 2457.5243); // edited
PlayerVehicle = GetPlayerVehicleID(playerid)
SetVehiclePos(GetPlayerVehicleID(playerid), 1234.234, 2142.1245, 2457.5243);
PutPlayerInVehicle(playerid,PlayerVehicle,0);
You should refer to Wiki SAMP Scripting Functions before posting
No I know what it is, but today I can't write it...