Teleport command help please :=D
#1

Please tell me how to make a simple teleport command for all players in 0.3d with zcmd
Reply
#2

Are you using sscanf?
Reply
#3

CLICK ME
Reply
#4

PHP код:
CMD:command(playeridparams[]) //name on command
{
    
SetPlayerPos(playerid,Float:x,Float:y,Float:z);// set possition
    
return true;

Reply
#5

Thanks Doerto
Reply
#6

Quote:
Originally Posted by Sfor$ahil
Посмотреть сообщение
Thanks Doerto
im not Doerto im doreto xD
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)