hlsdk

Untitled

May 30th, 2010
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.96 KB | None | 0 0
  1. #include sourcemod
  2. #include sdktools
  3.  
  4. #pragma semicolon 1
  5.  
  6. #define Imogenheap_mp3      "IMOGENHEAP.mp3"
  7.  
  8. Handle sm_headshotsound_file;
  9.  
  10. public Plugin:myinfo =
  11. {
  12.     name = "Headshot Sound player",
  13.     author = "HL-SDK",
  14.     description = "Plays a sound cool sound to all the cool people",
  15.     version = "1.2",
  16.     url = "http://www.bsmclan.com"
  17. }
  18.  
  19. public OnPluginStart()
  20. {
  21.     HookEvent("player_death", Event_PlayerDeath);
  22.     sm_headshotsound_file = CreateConVar("sm_headshotsound_file", Imogenheap_mp3, "Sound player to play", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
  23. }
  24.  
  25. public OnMapStart()
  26. {
  27.     PrecacheSound(Imogenheap_mp3);
  28.     decl String:file[64];
  29.     Format(file, 63, "sound/%s", Boom);
  30.     AddFileToDownloadsTable(file);
  31. }
  32.  
  33. public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
  34. {
  35.     if (GetEventInt(event, "customkill") == 1)
  36.     {
  37.         //GetConVarString()
  38.         EmitSoundToAll(Imogenheap_mp3);
  39.     }
  40.     return Plugin_Continue;
  41. }
Add Comment
Please, Sign In to add comment