toribio

toribio

Sep 11th, 2008
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1.     if(!strcmp(cmd, "/reportar", true))
  2.     {
  3.         new tmp[256], report[256], pname[24], string[256];
  4.         tmp = strtok(cmdtext, idx);
  5.         report = tmp;
  6.         if(!strlen(tmp))SendClientMessage(playerid, 0xFFFFFFAA, "/reportar [mensagem]");
  7.         while(strlen(tmp) > 0) //faz o loop com cada palavra que o cara escreveu
  8.         {
  9.             strcat(report, " "); //coloca um " " depois da palavra
  10.             strcat(report, tmp); //coloca a palavra junta com as outras antes
  11.             tmp = strtok(cmdtext,idx);
  12.         }
  13.         GetPlayerName(playerid, pname, sizeof pname);
  14.         format(string, sizeof(string), "%s reportou: %s.", pname, report);
  15.         for(new i; i < MAX_PLAYERS; i++)
  16.         {
  17.             if(IsPlayerAdmin(i))SendClientMessage(i, 0xFF0000AA, string);
  18.         }
  19.         return 1;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment