Jump to content
  • 0

Admin Telepport CMD


kidu13

Question

Vreau sa fac o comanda de teleporare pentru adminii level 2.  " /gotospawn "

Am facut asa .. dar imi da eroare :

if(strcmp(cmd, "/gotospawn", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 2)
            {
                if (GetPlayerState(playerid) == 2)
                {
                    new tmpcar = GetPlayerVehicleID(playerid);
                    SetVehiclePos(tmpcar, 898.1884,-1664.2604,13.5469);
                    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                }
                else
                {
                    SetPlayerPos(playerid, 898.1884,-1664.2604,13.5469);
                }
                SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported !");
                SetPlayerInterior(playerid,0);
                PlayerInfo[playerid][pInt] = 0;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
            }
        }
        return 1;

Astept un raspuns :*  

P.S => Am incercat si Teleport Maker , dar acelasi rezultat :P

efe25e4426ff4ce1266705e.png
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Uite aici o comanda ...

Asta merge 100%  :D

if(strcmp(cmd, "/gotospawn", true) == 0)

    {

      if(IsPlayerConnected(playerid))

      {

        if(PlayerInfo[playerid][pAdmin] >= 2)

        {

        new x_nr[256];

        x_nr = strtok(cmdtext, idx);

        if(!strlen(x_nr))

        {

        SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gotospawn [ LS - SF ]");

        return 1;

        }

        if(strcmp(x_nr,"LS",true) == 0)

{

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, 898.1884,-1664.2604,13.5469);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid, 898.1884,-1664.2604,13.5469);

}

SendClientMessage(playerid, COLOR_GRAD1, "  Ati fost teleportat !");

SetPlayerInterior(playerid,0);

PlayerInfo[playerid][pInt] = 0;

      return 1;

  }

        if(strcmp(x_nr,"SF",true) == 0)

{

if (GetPlayerState(playerid) == 2)

{

new tmpcar = GetPlayerVehicleID(playerid);

SetVehiclePos(tmpcar, 898.1884,-1664.2604,13.5469);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;

}

else

{

SetPlayerPos(playerid, 898.1884,-1664.2604,13.5469);

}

SendClientMessage(playerid, COLOR_GRAD1, "  Ati fost teleportat !");

SetPlayerInterior(playerid,0);

PlayerInfo[playerid][pInt] = 0;

  return 1;

  }

        }

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  Tu nu esti autorizat !");

}

      }

      return 1;

    }

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.