HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4.  
  5. #define PLUGIN "Effect Loading Sound"
  6. #define VERSION "1.0"
  7. #define AUTHOR "Vieni"
  8.  
  9. new gLoadingSound[] = "media/Half-Life17.mp3"
  10. new Float:gSoundLength = 100.0
  11.  
  12. new Array:arrayLoadingPlayers
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17.  
  18. arrayLoadingPlayers = ArrayCreate(MAX_IP_LENGTH)
  19. }
  20.  
  21. public client_connect(id)
  22. {
  23. new lIp[MAX_IP_LENGTH]
  24.  
  25. get_user_ip(id, lIp, charsmax(lIp), 1)
  26.  
  27. if(ArrayFindString(arrayLoadingPlayers, lIp) == -1)
  28. {
  29. ArrayPushString(arrayLoadingPlayers, lIp)
  30.  
  31. client_cmd(id,"mp3 play ^"%s^"", gLoadingSound)
  32.  
  33. set_task(gSoundLength, "removeLoadingPlayer", _, lIp, charsmax(lIp))
  34. }
  35. }
  36.  
  37. public removeLoadingPlayer(ip[])
  38. ArrayDeleteItem(arrayLoadingPlayers, ArrayFindString(arrayLoadingPlayers, ip))
  39. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  40. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  41. */
  42.