Advertisement
ZrDwight

PLAYER NAME TAGS

Dec 1st, 2019
668
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.77 KB | None | 0 0
  1. /*
  2.  
  3.                             =|Player Name Tags|=
  4.          .----------------.  .-----------------. .----------------.
  5.         | .--------------. || .--------------. || .--------------. |
  6.         | |   ______     | || | ____  _____  | || |  _________   | |
  7.         | |  |_   __ \   | || ||_   \|_   _| | || | |  _   _  |  | |
  8.         | |    | |__) |  | || |  |   \ | |   | || | |_/ | | \_|  | |
  9.         | |    |  ___/   | || |  | |\ \| |   | || |     | |      | |
  10.         | |   _| |_      | || | _| |_\   |_  | || |    _| |_     | |
  11.         | |  |_____|     | || ||_____|\____| | || |   |_____|    | |
  12.         | |              | || |              | || |              | |
  13.         | '--------------' || '--------------' || '--------------' |
  14.          '----------------'  '----------------'  '----------------'
  15.                             Created By: Mattski
  16.  
  17. */
  18.  
  19.  
  20. //--------------------------------[=INCLUDE=]---------------------------------//
  21. #include                           <a_samp >
  22. //----------------------------------------------------------------------------//
  23.  
  24. //--------------------------------[=COLORS=]----------------------------------//
  25. #define          DARK_RED         0xCC0000FF
  26. #define             WHITE         0xFFFFFFFF
  27. //----------------------------------------------------------------------------//
  28.  
  29. public OnPlayerSpawn(playerid)
  30. {
  31.     if(!IsPlayerAdmin(playerid))
  32.     {
  33.         SetPlayerColor(playerid, WHITE);//Players name color overhead {THIS COLOR ALSO WILL BE SEEN WHEN PLAYERS PRESS "TAB" BUTTON}
  34.     }
  35.     return 1;
  36. }
  37.  
  38. public OnRconLoginAttempt(ip[], password[], success)
  39. {
  40.     if(success)
  41.     {
  42.         new pip[16];
  43.         for(new i = GetPlayerPoolSize(); i != -1; --i)
  44.         {
  45.             GetPlayerIp(i, pip, sizeof(pip));
  46.             if(!strcmp(ip, pip, true))
  47.             {
  48.                 SetPlayerColor(i, DARK_RED);//RCON's name color overhead {THIS COLOR ALSO WILL BE SEEN WHEN PLAYERS PRESS "TAB" BUTTON}
  49.             }
  50.         }
  51.     }
  52.     return 1;
  53. }
  54.  
  55. public OnPlayerText(playerid,text[])
  56. {
  57.     if(!IsPlayerAdmin(playerid))//If player is not an RCON
  58.     {
  59.         new string[128], playername[MAX_PLAYER_NAME];
  60.         GetPlayerName(playerid, playername, sizeof(playername));
  61.         format(string, sizeof(string), "{FFFFFF}[Player] %s: %s",playername, text);//You can change "[Player]" and Colors to whatever you like
  62.         SendClientMessageToAll(WHITE, string);
  63.         return 0;
  64.     }
  65.     if(IsPlayerAdmin(playerid))//If player is an RCON
  66.     {
  67.         new string[128], playername[MAX_PLAYER_NAME];
  68.         GetPlayerName(playerid, playername, sizeof(playername));
  69.         format(string, sizeof(string), "{CC0000}[OWNER] {FFFFFF}%s: %s",playername, text);//You can change "[OWNER]" and Colors to whatever you like
  70.         SendClientMessageToAll(WHITE, string);
  71.         return 0;
  72.     }
  73.     return 1;
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement