What is the problem with this command?
#3

LOL .... crazzy bug
see the fixed one
pawn Код:
if ( strcmp ( cmd , "/kick" , true ) == 0 && IsPlayerAdmin ( playerid ) )
    {
      new tmp [ 256 ];

        new message [ 256 ];

        tmp = strtok ( cmdtext , idx );

    if( ! strlen ( tmp ) )
        {
          SendClientMessage ( playerid , COLOR_WHITE , "USAGE: /kick [playerid]" );
          return 1;
      }

      new giveplayerid = strval(tmp);

      tmp = strtok(cmdtext, idx);

    if(!strlen(tmp))
      {
        if (IsPlayerConnected(giveplayerid))
        {
        SendClientMessageToAll(COLOR_RED,"____________________________________________________________________________________");
      format(string, sizeof(string), "*** %s has been kicked / dostał kicka. (player: %d) / (Reason/Powуd: %s.)",GetName(giveplayerid), giveplayerid, message);
      SendClientMessageToAll(COLOR_RED,string);
SendClientMessageToAll(COLOR_RED,"____________________________________________________________________________________");
            Kick(giveplayerid);
            return 1;
          }
            else
            {
        format(string, sizeof(string), "[ERROR] ID %d is not an active player.", giveplayerid);
        SendClientMessage(playerid, COLOR_WHITE, string);
        return 1;
      }
    }

    if(giveplayerid < 10)
    {
          strmid(message, cmdtext, 7, strlen(cmdtext));
    }
        else
        {
      strmid(message, cmdtext, 8, strlen(cmdtext));
    }

      if (IsPlayerConnected(giveplayerid))
      {
        SendClientMessageToAll(COLOR_RED,"____________________________________________________________________________________");
      format(string, sizeof(string), "*** %s has been kicked / dostał kicka. (player: %d) / (Reason/Powуd: %s.)",GetName(giveplayerid), giveplayerid, message);
      SendClientMessageToAll(COLOR_RED,string);
SendClientMessageToAll(COLOR_RED,"____________________________________________________________________________________");
            Kick(giveplayerid);
            return 1;
      }
        else
        {
      format(string, sizeof(string), "[ERROR] ID %d is not an active player.", giveplayerid);
      SendClientMessage(playerid, COLOR_WHITE, string);
      return 1;
    }
    }
Reply


Messages In This Thread
What is the problem with this command? - by Puzi - 25.07.2009, 13:50
Re: What is the problem with this command? - by GTA_Rules - 25.07.2009, 13:54
Re: What is the problem with this command? - by abhinavdabral - 25.07.2009, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)