need help with teleport! command
#1

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 ?
Reply
#2

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
Reply
#3

SetPlayerPos(playerid, 1234.234, 2147.1245);

u mean

SetPlayerPos(playerid, X , y);

thats it ?

wherz z
Reply
#4

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

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
Reply
#6

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
Reply
#7

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

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);
Reply
#9

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
Reply
#10

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...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)