AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help for sound play (https://forums.alliedmods.net/showthread.php?t=172755)

made.tn 11-25-2011 14:58

Help for sound play
 
thanks for all who's help me
this is the script:

PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init() 

    
register_plugin("round_end""1.0""made.tn")
    
register_logevent("RoundEnd",2,"1=Round_End")  


public 
RoundEnd() // id - no. This is global event. 

    
set_hudmessage(25500, -1.00.3503.01.21.31.44
    
show_hudmessage(0"the round is end"


now I'd like to help me to create this plugin

plugin1:
if the round end this sound will play in sound/csound/roundend.wav
plugin2:
HIT_HEAD sound/csound/headkill.wav
HIT_CHEST sound/csound/chestkill.wav
HIT_STOMACH sound/csound/stomachkill.wav

Only the script
Don't share the files


and thanks

kiki33hun 11-25-2011 15:17

Re: Help for sound play
 
Added round end sound:
PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init() 

    
register_plugin("round_end""1.0""made.tn")
    
register_logevent("RoundEnd",2,"1=Round_End")  


public 
RoundEndid // id - no. This is global event. 

    
set_hudmessage(25500, -1.00.3503.01.21.31.44) ;
    
show_hudmessage(0"the round is end");
    
client_cmd(0"spk csound/roundend.wav);
    return PLUGIN_HANDLED;



made.tn 11-25-2011 15:28

Re: Help for sound play
 
and this script

PHP Code:

public plugin_precache()
{        
    
precache_sound("csound/roundend.wav")    
    return 
PLUGIN_CONTINUE


It's nessasry or no ??

kiki33hun 11-25-2011 16:18

Re: Help for sound play
 
Yes add code to plugin precache:D

Devil259 11-26-2011 04:30

Re: Help for sound play
 
Quote:

Originally Posted by kiki33hun (Post 1602521)
Added round end sound:
PHP Code:

    client_cmd(0"spk csound/roundend.wav);
    return PLUGIN_HANDLED; 


You forgot a "

client_cmd(0, "spk csound/roundend.wav);

->

client_cmd(0, "spk csound/roundend.wav");

kiki33hun 11-26-2011 04:43

Re: Help for sound play
 
Sry small bug:D


All times are GMT -4. The time now is 08:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.