play sound in mod

Posts 1–7 of 7 · Page 1 of 1
play sound in mod
Hello,

I am making a mod where you have every 2 minutes wallhack enabled
it loops, but now i want to have sound when the wallhack enables
the sound: ac130_plt_scanrange (guy who says Set scan range.)

Code:
sound = "ac130_plt_scanrange";
doesnt seem to work

here is the thread:

Code:
verhaaltwee()	
{
   self endon(" disconnect" );
   self endon(" death" );
	for(;;)
    {
	wait 120;
	self iPrintlnBold( "wallhack turned on for 50 seconds");
	sound = "ac130_plt_scanrange"; 
	self ThermalVisionFOFOverlayOn();
	wait 50;
	self ThermalVisionFOFOverlayOff();
	self iPrintlnBold( "wallhack turned off");
	}
}
could you guys help me out whit the sound?
self playLocalSound("ac130_plt_scanrange");

?
hmm it does not work

Code:
wallhackextra()	
{
   self endon(" disconnect" );
   self endon(" death" );
	for(;;)
    {
	wait 150;
	self iPrintlnBold( "^1wallhack ^8turned on for 50 seconds");
	self playLocalSound("ac130_plt_scanrange");
	self ThermalVisionFOFOverlayOn();
	wait 50;
	self iPrintlnBold( "^8wallhack turned off");
	self playLocalSound("ac130_plt_targetreset");
	self ThermalVisionFOFOverlayOff();
	}
}
self playlocalsound("ac130_plt_scanrange"); maybe
this is how i play sounds like that:

Code:
TF( soundalias, saytext ){prefix = maps\mp\gametypes\_teams::getTeamVoicePrefix( self.team );self playSound( prefix+soundalias );self sayTeam( saytext );}
Code:
chat1(){self TF("mp_cmd_fallback", "Fall back!");}
chat2(){self TF("mp_cmd_movein", "Move in!");}
chat3(){self TF("mp_cmd_suppressfire", "Suppressing Fire!");}
chat4(){self TF("mp_cmd_attackleftflank", "Attack left flank!");}
chat5(){self TF("mp_cmd_attackrightflank", "Attack Right flank!");}
chat6(){self TF("mp_cmd_holdposition", "Hold Position!");}
chat7(){self TF("mp_cmd_regroup", "Regroup!");}
chat8(){self TF("ac130_fco_directhits", "Yeah, Direct Hit!");}
chat9(){self TF("ac130_fco_takehimout", "Take him out!");}
chat10(){self TF("ac130_fco_oopsiedaisy", "Oopsy Daisy!");}
chat11(){self TF("ac130_fco_gotarunner", "Runner!!!");}
chat12(){self TF("ac130_fco_lightemup", "Light em Up!");}
chat13(){self TF("ac130_plt_gottahurt", "Thats gotta hurt!");}
chat14(){self TF("ac130_fco_guyrunnin", "Guy running");}
chat15(){self TF("ac130_fco_nailthoseguys", "Nail those guys!");}
chat16(){self TF("ac130_plt_copysmoke", "Smoke em!");}
i guess the code just doesnt work.
the other codes whit mp in it work

this is how i play sounds like that:

Code:
TF( soundalias, saytext ){prefix = maps\mp\gametypes\_teams::getTeamVoicePrefix( self.team );self playSound( prefix+soundalias );self sayTeam( saytext );}
Code:
chat1(){self TF("mp_cmd_fallback", "Fall back!");}
chat2(){self TF("mp_cmd_movein", "Move in!");}
chat3(){self TF("mp_cmd_suppressfire", "Suppressing Fire!");}
chat4(){self TF("mp_cmd_attackleftflank", "Attack left flank!");}
chat5(){self TF("mp_cmd_attackrightflank", "Attack Right flank!");}
chat6(){self TF("mp_cmd_holdposition", "Hold Position!");}
chat7(){self TF("mp_cmd_regroup", "Regroup!");}
chat8(){self TF("ac130_fco_directhits", "Yeah, Direct Hit!");}
chat9(){self TF("ac130_fco_takehimout", "Take him out!");}
chat10(){self TF("ac130_fco_oopsiedaisy", "Oopsy Daisy!");}
chat11(){self TF("ac130_fco_gotarunner", "Runner!!!");}
chat12(){self TF("ac130_fco_lightemup", "Light em Up!");}
chat13(){self TF("ac130_plt_gottahurt", "Thats gotta hurt!");}
chat14(){self TF("ac130_fco_guyrunnin", "Guy running");}
chat15(){self TF("ac130_fco_nailthoseguys", "Nail those guys!");}
chat16(){self TF("ac130_plt_copysmoke", "Smoke em!");}
hhm i dont get this one.
is this like the voices of cod 2?
but than for mw2

when i make a new Thread whit this code it gives syntax error
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.
Talk with us