AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   round start sound (https://forums.alliedmods.net/showthread.php?t=217888)

Closer456 06-08-2013 23:35

round start sound
 
How do you change the "Go Go Go" , "Alright let's move out" and so on.. sound at round start?

heres my attemp and it does not work :(
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx> 
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <csx>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new const round_play[][] = {
    
"player/new/startgo.wav",
    
"player/new/startmove.wav",
    
"player/new/startlock.wav"
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_EmitSound"startround")
    
// Add your code here...
}
public 
plugin_precache() {

    for(new 
ii<3i++)
    {
    
precache_soundround_play[i] )
    }
}
public 
startround(idchannel, const sound[], Float:volumeFloat:attenuationflagspitch)  
{  

    if(!
is_user_connected(id))
    return 
FMRES_IGNORED;  
        
//Checks if the user is connected 

    
if(containi(sound"com_go") != -|| containi(sound"moveout") != -|| containi(sound"locknload") != -1  || containi(sound"go") != -|| containi(sound"letsgo") != -1
    {  
        
// Here it will play your sound and block the old one
    
engfunc(EngFunc_EmitSoundidchannelround_play[random_num(0sizeof round_play 1)], 1.00.92flagspitch);  
          
    return 
FMRES_SUPERCEDE;  
    }  
      
    return 
FMRES_IGNORED;  



Blizzard_87 06-09-2013 00:57

Re: round start sound
 
try this... it blocks the default radio sounds then you can just add code to play your custom ones....

https://forums.alliedmods.net/showpo...6&postcount=17

ConnorMcLeod 06-09-2013 04:21

Re: round start sound
 
Updated on is there : http://forums.alliedmods.net/showpos...72&postcount=2
(BTW, have edited other post to link to that one)


All times are GMT -4. The time now is 16:20.

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