Kick everyone besides people with a certain name?
#3

Quote:
Originally Posted by Ronyx69
Код:
OnPlayerConnect(playerid)
  {
  new nick[MAX_PLAYER_NAME];
  GetPlayerName(playerid, nick, sizeof(nick));
  if(strfind(nick,"tester1",true)!=-1||strfind(nick,"tester2",true)!=-1||strfind(nick,"tester3",true)!=-1)
    {
    //yo dawg u da tester welcome here xD
    }
  else
    {
    //yo dawg u not testerz, u be banned for sure now xD
    }
  return 1;
  }
It wont ban the people who arent listed..

I've tested it.

pawn Код:
public OnPlayerConnect(playerid)
{
  new nick[MAX_PLAYER_NAME];
  GetPlayerName(playerid, nick, sizeof(nick));
  if(strfind(nick,"[B]Vortex",true)!=-1||strfind(nick,"Lazlow",true)!=-1||strfind(nick,"AjayRz",true)!=-1||strfind(nick,"TehFedra",true)!=-1||strfind(nick,"Arsham_Vafa",true)!=-1)
    {
    SendClientMessage(playerid,COLOR_RED,"You are reconized as a BETA Tester, welcome");
    }
  else
    {
    SendClientMessage(playerid,COLOR_RED,"You are not a BETA Tester, banned.");
    BanEx(playerid,"BETA Testing.");
    }
  return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)