Advertisement
crywolfy

AMXX Sound

Aug 26th, 2013
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include < amxmodx >
  2.  
  3. #define PLUGIN "New Plugin"
  4. #define VERSION "1.0"
  5. #define AUTHOR "anakin_cstrike"
  6.  
  7. new g_Sounds[][] =
  8. {
  9.     "misc/parap2.wav"
  10. };
  11.  
  12. public plugin_init ( )
  13. {
  14.     register_plugin ( PLUGIN, VERSION, AUTHOR )
  15.     register_logevent ( "roundstart", 2, "1=Round_Start" );
  16.    
  17. }
  18. public plugin_precache()
  19. {
  20.     for(new i = 0; i < sizeof g_Sounds; i++ )
  21.         precache_sound( g_Sounds[ i ] );
  22. }
  23.  
  24. public roundstart ( )
  25. {
  26.     set_task ( 15.0, "roundstart2", _, _, _, "b", _ );
  27. }
  28.  
  29. public roundstart2 ( )
  30. {
  31.     new x = random_num( 0, sizeof g_Sounds - 1 );
  32.     client_cmd( 0, "spk ^"%s^"", g_Sounds[ x ] );
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement