Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.38 KB | None | 0 0
  1. /* Script generated by Pawn Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. #define PLUGIN  "ConnectionMessages"
  7. #define AUTHOR  "DragoNNNN"
  8. #define VERSION "1.0"
  9.  
  10. public plugin_init() {
  11.     register_plugin(PLUGIN, VERSION, AUTHOR)
  12.    
  13. }
  14. public client_authorized(id) {
  15.     if(is_user_bot(id)) {
  16.         return PLUGIN_HANDLED
  17.     }
  18.     new name[33]
  19.     get_user_name(id, name, 32)
  20.    
  21.     new playerid[33]
  22.     get_user_authid(id, playerid, 32)
  23.    
  24.     client_printcolor(0, "!tPlayer !g%s !twith !nSteamID !g[!n%s!g]!t has connected.",name,playerid)
  25. }
  26. public client_disconnect(id) {
  27.     if(is_user_bot(id)) {
  28.         return PLUGIN_HANDLED
  29.     }
  30.     new name[33]
  31.     get_user_name(id, name, 32)
  32.    
  33.     new playerid[33]
  34.     get_user_authid(id, playerid, 32)
  35.    
  36.     client_printcolor(0, "!tPlayer !g%s !twith !nSteamID !g[!n%s!g]!t has disconnected.",name,playerid)
  37. }
  38. stock client_printcolor(const id, const input[], any:...)
  39. {
  40.     new count = 1, players[32];
  41.     static msg[191];
  42.     vformat(msg, 190, input, 3);
  43.    
  44.     replace_all(msg, 190, "!g", "^x04"); // Green Color
  45.     replace_all(msg, 190, "!n", "^x01"); // Default Color
  46.     replace_all(msg, 190, "!t", "^x03"); // Team Color
  47.    
  48.     if(id)
  49.         players[0] = id;
  50.     else
  51.         get_players(players, count, "ch");
  52.    
  53.     for (new i = 0; i < count; i++)
  54.     {
  55.         message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
  56.         write_byte(players[i]);
  57.         write_string(msg);
  58.         message_end();
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement