01-11-2014, 04:07 PM
(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.