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