Restric name ????
#1

what code to i need to insert to restric a name to stop players using a anti cheat bot name? And basicly kicking them from the game.
Reply
#2

connect
Код:
new nick[24];
GetPlayerName(playerid,nick,24);
if(!strcmp("AH_Name",nick,true)) {
Kick(playerid);
}
Reply
#3

Or something like this:
pawn Код:
//Top
#define MAX_BAD_NAMES  2 // Number of "bad names" you will have in the array
new BanNames[MAX_BAD_NAMES][MAX_PLAYER_NAME] =
{
  "OneRestrictedName",
};

//OnPlayerConnect
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
for(new b = 0; b < sizeof(BadNames); ++)
{
  if(!strcmp(name, b, true))
  {
   Kick(playerid);
  }
}
Sorry if any mistakes, I"m very tired even though its only 20:00.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)