Author Topic: How to disable example: "/goto name"  (Read 3409 times)

0 Members and 1 Guest are viewing this topic.

Offline Arber

  • Street Thug
  • *
  • Posts: 28
    • View Profile
How to disable example: "/goto name"
« on: November 28, 2012, 01:31:03 am »
How to disable example: "/goto name" ??
thanks for read

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How to disable example: "/goto name"
« Reply #1 on: November 28, 2012, 01:42:41 am »
How to disable example: "/goto name" ??
thanks for read

You can't disable a rcon command, but is protected by rcon pass.

From what we know, you have to be RCON Admin to can use "/goto" command.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline Arber

  • Street Thug
  • *
  • Posts: 28
    • View Profile
Re: How to disable example: "/goto name"
« Reply #2 on: November 28, 2012, 03:11:01 pm »
No, i'm not admin on server and i can use /goto command and other commands

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How to disable example: "/goto name"
« Reply #3 on: November 28, 2012, 03:44:53 pm »
No, i'm not admin on server and i can use /goto command and other commands

You can't use /goto command if you aren't RCON Administrator !

If the owner of server made a cmd like " !goto " or "/c goto" for all players, thats anything else.

RCON Administrator is that player what type in the chat "/admin <password>"

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline VS

  • Street Thug
  • *
  • Posts: 37
  • Opening Soon - VS Society
    • View Profile
Re: How to disable example: "/goto name"
« Reply #4 on: November 29, 2012, 06:12:31 pm »
[pawn]

new nogoto[MAX_PLAYERS]

public OnPlayerCommandText(playerid, cmdtext[])
{
        new tmp[256];
   if (strcmp("nogoto", cmd, true, 10) == 0)
   {
        tmp = strtok(cmdtext, idx);
        if(nogoto[playerid] == 0)
        {
            nogoto[playerid] = 1;
            SendClientMessage(playerid, red, "You are no longer accepting goto warps.");
        }
        else
        {
            nogoto[playerid] = 0;
            SendClientMessage(playerid, lgr, "You are now accepting goto warps.");
        }
      return 1;
   }
   if (strcmp("goto", cmd, true, 10) == 0)
   {
      tmp = strtok( cmdtext, idx );
        if (!strlen(tmp))
      {
       SendClientMessage(playerid, lgr, " /c goto [ID]");
       return true;
      }

      new ID = strval(tmp);

        if(nogoto[playerid] == 1) return SendClientMessage(playerid, red, "Sorry that player has goto disabled");

      if (!IsPlayerConnected(ID))
      {
          SendClientMessage(playerid, 0xFFFFFFAA, " Invalid Player");
          format( tmp, 128, "%s > Error < that > Player < isn't in the data base", Name[playerid]), SendClientMessage(playerid, red, tmp);
          return true;
      }

        new Float:X, Float:Y, Float:Z;

      if ( GetPlayerVehicleID( playerid ) )
       {
          GetPlayerPos( strval(tmp), X, Y, Z );
            SetVehiclePos( GetPlayerVehicleID(playerid), X+2, Y+2, Z ,0);
           GetPlayerName(ID, tmp, 128);
         format(tmp, 128, "Teleported to (Player - %s, id - %d)", tmp, ID);
         SendClientMessage(playerid, 0xFFFFFFAA, tmp);
         
         format( tmp, 128, "Teleport to > %s < ID > %d <", tmp, ID), SendClientMessage(playerid, red, tmp);
         
      }else{
           GetPlayerPos( strval(tmp), X, Y, Z );
           SetPlayerPos( playerid, X+2, Y+2, Z ,0 ,0);
             GetPlayerName(ID, tmp, 128);

           format( tmp, 128, "Teleport to > %s < ID > %d <", tmp, ID), SendClientMessage(playerid, red, tmp);

      }
      return 1;
   }
}

[/pawn]