Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: umar4911 on Oct 25, 2017, 05:58 AM

Title: quake sounds on kill
Post by: umar4911 on Oct 25, 2017, 05:58 AM
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.
Title: Re: quake sounds on kill
Post by: KAKAN on Oct 25, 2017, 08:34 AM
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.
Title: Re: quake sounds on kill
Post by: D4rkR420R on Oct 25, 2017, 09:37 PM
Furthermore, you should use switch statements in this case than using if statements.
Title: Re: quake sounds on kill
Post by: umar4911 on Oct 26, 2017, 07:26 AM
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
Title: Re: quake sounds on kill
Post by: Xmair on Oct 26, 2017, 10:54 AM
/showdebug 1
Title: Re: quake sounds on kill
Post by: aXXo on Oct 26, 2017, 09:38 PM
/setconfig game_showdebug 1
Title: Re: quake sounds on kill
Post by: Shadow on Oct 27, 2017, 08:27 PM
Best death sound is still this, however

https://www.youtube.com/watch?v=f49ELvryhao#
Title: Re: quake sounds on kill
Post by: Darran on Oct 28, 2017, 06:19 AM
what about this

https://www.youtube.com/watch?v=rV2WaiARn7s#
Title: Re: quake sounds on kill
Post by: umar4911 on Oct 28, 2017, 08:59 AM
I used the code and worked

killer.PlaySound(50000);