quake sounds on kill

Started by umar4911, Oct 25, 2017, 05:58 AM

Previous topic - Next topic

umar4911

I downloaded quake sounds in .wav format and added it on player kill
[ if (killer.Score == 1) PlaySound( player.UniqueWorld , 50000 , killer.Pos );
else if (killer.Score == 6) PlaySound( player.UniqueWorld , 50001 , killer.Pos );
else if (killer.Score == 2) PlaySound( player.UniqueWorld , 50002 , killer.Pos );
else if (killer.Score == 3) PlaySound( player.UniqueWorld , 50003 , killer.Pos );
else if (killer.Score == 4) PlaySound( player.UniqueWorld , 50004 , killer.Pos );
else if (killer.Score == 5) PlaySound( player.UniqueWorld , 50005 , killer.Pos );
but sound does not play.
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter

KAKAN

killer.PlaySound( 49999 + killer.Score );If it doesn't work, try playing( your game ) in debug mode. It should print out if there's something wrong with the .wav file.
oh no

D4rkR420R

Furthermore, you should use switch statements in this case than using if statements.

umar4911

Quote from: KAKAN on Oct 25, 2017, 08:34 AMkiller.PlaySound( 49999 + killer.Score );If it doesn't work, try playing( your game ) in debug mode. It should print out if there's something wrong with the .wav file.
How to play game in debug mode??
Quote from: KuRiMi on Oct 25, 2017, 09:37 PMFurthermore, you should use switch statements in this case than using if statements.
Hmmm....  I never made a switch statement
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

aXXo

/setconfig game_showdebug 1

Shadow

QuotePS:is trash is ur home language??


umar4911

I used the code and worked

killer.PlaySound(50000);
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter