SHARE
TWEET

Connect Server + Sound

ISRaiyaN Feb 20th, 2019 (edited) 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <amxmodx>
  2. #include <colorchat>
  3.  
  4. new SC[] = "ISRaiyaN/Connect.mp3"
  5. new SD[] = "ISRaiyaN/Disconnect.mp3"
  6.  
  7. new Prefix[] = "AMXX"
  8.  
  9. public plugin_init()
  10. {
  11.     register_plugin("Connect Server", "1.0", "ISRaiyaN");
  12. }
  13. public plugin_precache()
  14. {
  15.     precache_sound( SC )
  16.     precache_sound( SD )
  17. }
  18.  
  19. public client_putinserver( client )
  20. {
  21.     ColorChat(0, RED, "^4[ ^3%s ^4] ^3%s ^1Has ^4Connected^1 To The Server.", Prefix, GetUserName(client));
  22.     client_cmd(0, "mp3 play ^"sound/%s^"", SC )
  23. }
  24. public client_disconnect( client )
  25. {
  26.     ColorChat(0, RED, "^4[ ^3%s ^4] ^3%s ^1Has ^4Disconnected^1 From The Server.", Prefix, GetUserName(client));
  27.     client_cmd(0, "mp3 play ^"sound/%s^"", SD )
  28. }
  29. stock GetUserName(client)
  30. {
  31.     new Name[ 32 ];
  32.     get_user_name( client, Name, charsmax( Name ) );
  33.    
  34.     return Name;
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top