Teleport command help please :=D
#7

There are two types of teleports.
On Foot
On Foot + On Vehicle
I will show you both.
pawn Код:
// This is only on foot.
CMD:teleport(playerid, params[])
{
    SetPlayerPos(playerid, X, Y, Z);
    return 1;
}

// This command is for on foot and vehicle.
CMD:tf2(playerid, params[])
{
    new
        currentveh,
        Float:x,
        Float:y,
        Float:z,
        Float:angle;
    GetPlayerPos(playerid, x, y, z);
    if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
    else SetPlayerPos(playerid, X, Y, Z);
    currentveh = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(currentveh, angle);
    SetVehicleZAngle(currentveh, A);
    return 1;
}

/* Note:
The Float: X, Y, Z and A should be changed by the coordinates you want.

Connect in-game write
/save teleport1
Note: teleport1 is an example. You can save it with the name you want.

there you want to make the teleport command. Then go to your ...\My Documents\GTA San Andreas User Files\SAMP and open the savedpositions.txt file

You will see something like this

AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);

Ofc it would have different numbers. Then you should copy the second, third and fourth numbers becaue it's the X, Y, Z

AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)

The fifth numbers is the Angle or A at the command.
I hope it helps! Good Luck
*/
Reply


Messages In This Thread
Teleport command help please :=D - by Sfor$ahil - 10.12.2011, 08:05
Re: Teleport command help please :=D - by Max_Coldheart - 10.12.2011, 08:18
Re: Teleport command help please :=D - by T0pAz - 10.12.2011, 08:19
Re: Teleport command help please :=D - by doreto - 10.12.2011, 08:26
Re: Teleport command help please :=D - by Sfor$ahil - 10.12.2011, 08:26
Re: Teleport command help please :=D - by doreto - 10.12.2011, 08:29
Re: Teleport command help please :=D - by Kostas' - 10.12.2011, 08:32

Forum Jump:


Users browsing this thread: 4 Guest(s)