SA-MP Forums Archive
How to get to.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to get to.. (/showthread.php?tid=131950)



How to get to.. - Torran - 05.03.2010

Hello,

Im making my own admin script and ive done everything im just making admin chat,
Ive done it all, But i want to detect if the player types + and nothing else,
And if they do it dosent show it in chat or do admin chat?


Re: How to get to.. - Joe Staff - 05.03.2010

pawn Код:
public OnPlayerText(playerid,text[])
{
  if((text[0]=='+')&&(IsPlayerAdmin(playerid))
  {
    new tmp[192];
    GetPlayerName(playerid,tmp,24);
    format(tmp,192,"%s: %s",tmp);
    for(new ply;ply<MAX_PLAYERS;ply++)if(IsPlayerConnected(ply)&&IsPlayerAdmin(ply))SendClientMessage(ply,0xFF0000FF,tmp);
    return 0;
  }
  return 1;
}