toribio

toribio

Aug 30th, 2008
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. public OnPlayerText(playerid, text[])
  2. {
  3.     if(text[0] == '!')
  4.     {
  5.         if(IsPlayerAdmin(playerid))
  6.         {
  7.             new chat[256], pname[24], string[256];
  8.             GetPlayerName(playerid, pname, sizeof pname);
  9.             strmid(chat, text, 1, strlen(text));
  10.             format(string, sizeof string, "%s: %s", pname, chat);
  11.             for(new i = 0; i < MAX_PLAYERS; i++)
  12.             {
  13.                 if(IsPlayerAdmin(i))
  14.                     SendClientMessage(i, 0xFFF000AA, string);
  15.             }
  16.         }
  17.         return 0;
  18.     }
  19.     return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment