AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   randon_num? (https://forums.alliedmods.net/showthread.php?t=45878)

stigma 10-13-2006 16:12

randon_num?
 
How come that this aint working..?


Im trying to do this >>
Code:
} else if (iKill[killer] > 17) {      client_cmd(0,"play %s", kSound[random_num(0, 5)]) }

With this >>
Code:
new kSound[6][] = {     "GodLikeSound",     "RampageSound",     "DominatingSound",     "WickedSickSound",     "KillingSpreeSound",     "UnStoppableSound" }

Greenberet 10-13-2006 16:23

Re: randon_num?
 
because you have to specify also the filepath + file extension in your array

stigma 10-13-2006 16:30

Re: randon_num?
 
Well i already have..
Code:
new const WickedSickSound[] = "Announce/WhickedSick.wav" new const UnStoppableSound[] = "Announce/Unstoppable.wav" new const RampageSound[] = "Announce/Rampage.wav" new const KillingSpreeSound[] = "Announce/Killing_Spree.wav" new const GodLikeSound[] = "Announce/GodLike.wav" new const DominatingSound[] = "Announce/Dominating.wav"

SweatyBanana 10-13-2006 16:40

Re: randon_num?
 
Shouldnt they be
PHP Code:

"sound/Announce/**********.wav" 


Silencer123 10-13-2006 16:46

Re: randon_num?
 
Remove the Quotes (") in ksound.

Hawk552 10-13-2006 16:47

Re: randon_num?
 
Quote:

Originally Posted by SweatyBanana (Post 390786)
Shouldnt they be
PHP Code:

"sound/Announce/**********.wav" 


No. There's no client command "play", I think you want either "spk" or "mp3 play" (the latter of which will most likely not work due to the fact that it is a wav).

Greenberet 10-13-2006 17:26

Re: randon_num?
 
Quote:

Originally Posted by stigma (Post 390784)
Well i already have..
Code:
new const WickedSickSound[] = "Announce/WhickedSick.wav" new const UnStoppableSound[] = "Announce/Unstoppable.wav" new const RampageSound[] = "Announce/Rampage.wav" new const KillingSpreeSound[] = "Announce/Killing_Spree.wav" new const GodLikeSound[] = "Announce/GodLike.wav" new const DominatingSound[] = "Announce/Dominating.wav"

but not in kSound

[ --<-@ ] Black Rose 10-13-2006 18:51

Re: randon_num?
 
its fixed...


All times are GMT -4. The time now is 04:53.

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