Need an if !
#4

pawn Код:
//place outside of any callbacks, most commonly on the top below #includes
IsPlayerName(playerid,name[])
{
  new tmp[MAX_PLAYER_NAME];
  GetPlayerName(playerid,tmp,sizeof(tmp));
  if(!strcmp(tmp,name,false))return 1;
  return 0;
}

//use
public OnPlayerConnect(playerid)
{
  if(IsPlayerName(playerid,"[BaD]AssMcGee"))
  {
    SendClientMessage(playerid,0xFF0000FF,"YOU'RE FAT!");
  }
  return 1;
}
There you go, untested.
Reply


Messages In This Thread
Need an if ! - by MarcoNecroX - 08.05.2009, 23:22
Re: Need an if ! - by yom - 08.05.2009, 23:38
Re: Need an if ! - by s0nic - 09.05.2009, 00:15
Re: Need an if ! - by Joe Staff - 09.05.2009, 04:13
Re: Need an if ! - by MarcoNecroX - 09.05.2009, 05:50
Re: Need an if ! - by Dark_Kostas - 09.05.2009, 06:48
Re: Need an if ! - by MarcoNecroX - 09.05.2009, 15:48
Re: Need an if ! - by OmeRinG - 09.05.2009, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)