toribio

toribio

Sep 15th, 2008
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. public OnPlayerText(playerid, text[])
  2. {
  3.     if(text[0] == ';')
  4.     {
  5.         new string[128];    GetPlayerName(playerid, string, sizeof(string));
  6.         format(string, sizeof(string), "*Teamchat de %s:  %s", string, text[1]);
  7.         printf("%s", string);
  8.         for(new i = 0; i < MAX_PLAYERS; i++)
  9.         {
  10.             if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
  11.         }
  12.         return 0;
  13.     }
  14.     new i, j;
  15.     while((j = text[ i]))text[i++] = ((((j) > 0x40 && (j) <= 0x5A) || ((j) > 0xBF && (j) <= 0xDD)) ? ((j) | 0x20) : (j));
  16.     new text2[256];
  17.     format(text2, sizeof(text2), "[%i] %s", playerid, text);
  18.     SendPlayerMessageToAll(playerid, text2);
  19.     return 0;
  20. }
Add Comment
Please, Sign In to add comment