Hello There, Guest! Login or Register


[Feature]getid ?
#25
(01-11-2014, 02:44 PM)Jay link Wrote: I've made a quick command which can be ran as a filterscript for this because its pissing me off.
Someone reported a cheater today "JAY NIKE_BUNO HAS HEALTH HACKS QUICCCCCCCK" and I had to look through the whole scoreboard.

Code:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
   if(!strcmp(cmdtext, "/getid", true, 6))
   {
      new
         foundNamesString[128];

      // Can't remember if this compiles in PAWN, might need to use format
      //   new params[] = cmdtext[7];
      new params[128];
      format(params, sizeof(params), "%s", cmdtext[7]);

      if(!(3 < strlen(params) < MAX_PLAYER_NAME)) {
         SendClientMessage(playerid, -1,"Use /getid [name]. Search length must be greater than 3.");
         return 1;
      }
     
      SendClientMessage(playerid, -1, "Results:");

      for(new i = 0; i < 200; i++) {
         if(!IsPlayerConnected(i) || IsPlayerNPC(i)) {
            continue;
         }
         new name[24];
         GetPlayerName(i,name,24);
         if(strfind(params, name, true) == -1) {
            continue;
         }
         format(foundNamesString, sizeof(foundNamesString), "%s (ID:%i)",name, i);
         SendClientMessage(playerid, -1, foundNamesString);
      }
      if(!strlen(foundNamesString)) {
         SendClientMessage(playerid, -1, "No match found.");
      }
      return 1;
   }
   return 0;
}

Can someone compile and upload to the main server and when logged into rcon type /rcon loadfs [nameoffile].
And thats enough developing from me for one year

/getid has been implemented in the next version.


Messages In This Thread
[Feature]getid ? - by Darkfire - 01-05-2014, 12:20 PM
Re: Where is /getid ? - by [NB]Zaibatsu - 01-05-2014, 12:35 PM
Re: Where is /getid ? - by Holsje - 01-05-2014, 12:52 PM
Re: Where is /getid ? - by Madlaggz - 01-05-2014, 07:55 PM
Re: Where is /getid ? - by Darkfire - 01-05-2014, 09:44 PM
Re: Where is /getid ? - by Agent - 01-06-2014, 10:25 AM
Re: Where is /getid ? - by Joeri - 01-06-2014, 10:53 AM
Re: Where is /getid ? - by Richard - 01-06-2014, 11:49 AM
Re: Where is /getid ? - by HaZe - 01-06-2014, 04:50 PM
Re: Where is /getid ? - by George - 01-06-2014, 05:32 PM
Re: Where is /getid ? - by Darkfire - 01-06-2014, 08:35 PM
Re: Where is /getid ? - by Joeri - 01-06-2014, 10:54 PM
Re: Where is /getid ? - by Agent - 01-06-2014, 10:56 PM
Re: Where is /getid ? - by Jay - 01-07-2014, 02:39 AM
Re: Where is /getid ? - by Agent - 01-07-2014, 02:46 AM
Re: Where is /getid ? - by Madlaggz - 01-07-2014, 04:35 AM
Re: Where is /getid ? - by HaZe - 01-07-2014, 06:22 AM
Re: Where is /getid ? - by cake - 01-07-2014, 08:51 AM
Re: Where is /getid ? - by face - 01-07-2014, 09:59 AM
Re: Where is /getid ? - by Maka - 01-07-2014, 10:08 AM
Re: Where is /getid ? - by [NB]Zaibatsu - 01-07-2014, 10:50 AM
Re: Where is /getid ? - by cake - 01-07-2014, 11:50 AM
Re: Where is /getid ? - by Maka - 01-07-2014, 12:55 PM
Re: Where is /getid ? - by Jay - 01-11-2014, 02:44 PM
Re: Where is /getid ? - by Beaner - 01-11-2014, 04:07 PM
Re: Where is /getid ? - by striker - 01-11-2014, 04:33 PM
Re: Where is /getid ? - by Jay - 01-11-2014, 07:05 PM
Re: Where is /getid ? - by Shark - 01-11-2014, 07:24 PM
Re: Where is /getid ? - by cake - 01-11-2014, 08:08 PM
Re: Where is /getid ? - by Shark - 01-11-2014, 08:12 PM
Re: Where is /getid ? - by cake - 01-11-2014, 08:14 PM
Re: Where is /getid ? - by Shark - 01-11-2014, 08:16 PM
Re: Where is /getid ? - by cake - 01-11-2014, 08:17 PM
Re: Where is /getid ? - by Shark - 01-11-2014, 08:20 PM
Re: Where is /getid ? - by cake - 01-11-2014, 08:20 PM
Re: Where is /getid ? - by Shark - 01-11-2014, 08:45 PM
Re: Where is /getid ? - by cake - 01-11-2014, 08:48 PM
Re: Where is /getid ? - by Shark - 01-11-2014, 09:02 PM
Re: Where is /getid ? - by Jay - 01-11-2014, 11:02 PM