HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*
  2.   Fordította: BBk
  3. */
  4.  
  5. #include <sourcemod>
  6. #include <sdktools>
  7. #include <sdktools_sound>
  8.  
  9. #pragma semicolon 1
  10. #define MAX_FILE_LEN 80
  11. new Handle:g_CvarSoundName = INVALID_HANDLE;
  12. new String:g_soundName[MAX_FILE_LEN];
  13.  
  14. #define PLUGIN_VERSION "1.0"
  15. public Plugin:myinfo =
  16. {
  17. name = "CS:GO Sound",
  18. author = "Team-Secretforce.com",
  19. description = "Udvozlo hang CS:GO szerveredre",
  20. version = PLUGIN_VERSION,
  21. url = "http://www.Team-Secretforce.com/"
  22. };
  23. public OnPluginStart()
  24. {
  25. // Create the rest of the cvar's
  26. CreateConVar("sm_welcome_snd_version", PLUGIN_VERSION, "CS:GO Sound Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
  27. g_CvarSoundName = CreateConVar("sm_start_sound", "music/welcome/secretforce.mp3", "Welcome sound");
  28. }
  29. public OnConfigsExecuted()
  30. {
  31. GetConVarString(g_CvarSoundName, g_soundName, MAX_FILE_LEN);
  32. decl String:buffer[MAX_FILE_LEN];
  33. PrecacheSound(g_soundName, true);
  34. Format(buffer, sizeof(buffer), "sound/%s", g_soundName);
  35. AddFileToDownloadsTable(buffer);
  36. }
  37. public OnClientPostAdminCheck(client)
  38. {
  39. EmitSoundToClient(client,g_soundName);
  40. }