KaLu17

[pawno.pl] -> #28828

Oct 27th, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.59 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf2>
  4.  
  5. CMD:ann(playerid, params[])
  6. {
  7.     if(!IsPlayerAdmin(playerid))
  8.         return SendClientMessage(playerid, 0xFF0000FF, "Nie masz uprawnień");
  9.  
  10.     new time, msg[100];
  11.     if(sscanf(params, "is[100]", time, msg))
  12.         return SendClientMessage(playerid, 0xFFFFFFFF, "/ann [czas] [text]");
  13.  
  14.     format(params, 100, "~w~%s: %s", PlayerName(playerid), msg);
  15.     GameTextForAll(params, (time * 1000), 3);
  16.     return 1;
  17. }
  18.  
  19. stock PlayerName(playerid)
  20. {
  21.     new pname[MAX_PLAYER_NAME];
  22.     GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  23.     return pname;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment