Gguiz007

Untitled

May 6th, 2020
973
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. CMD:ao(playerid, params[])
  2. {
  3.   new Anuncio[128], String[128];
  4.   new NomeAAV[MAX_PLAYER_NAME];
  5.   GetPlayerName(playerid,NomeAAV,sizeof(NomeAAV));
  6.       if(AdminInfo[playerid] == jAdmin){
  7.       if (APlayerData[playerid][LoggedIn] == false) return 0;
  8.       if(APlayerData[playerid][PlayerLevel] < 4) return 0;
  9.       if(sscanf(params, "s[150]", Anuncio)) return SendClientMessage(playerid, 0xFF0000FF, "Use: /ao [mensagem]");
  10.       if(strlen(Anuncio) > 70) return SendClientMessage(playerid,0xFF0000FF,"O máximo de caracteres permitido é 70!");
  11.     else
  12.         {
  13.         for (new i; i < MAX_PLAYERS; i++)
  14.         {
  15.             format(String, sizeof(String),"~b~~h~~h~~h~%s:~n~~w~%s", NomeAAV, Anuncio);
  16.             GameTextForAll(String, 3000, 5);
  17.             }
  18.         }
  19.         format(String, sizeof(String), "{FFE4C4}* %s anuncio: %s *", NomeAAV, Anuncio);
  20.         SendClientMessageToAll(-1, String);
  21.     }
  22.   return 1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment