AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ad sound to bankscript (https://forums.alliedmods.net/showthread.php?t=65303)

eewokney 01-05-2008 16:30

ad sound to bankscript
 
ey, im using the CS Bank plugin (http://forums.alliedmods.net/showthread.php?t=18617)

what i wanna do is when you take a widraw from the bank that a sound is played :)

the sound is called coin05.wav located in sounds\misc\(coin05.wav)

what is tried is to put client_cmd(0, "spk misc/coin05.wav") ad the scripting part if cash is witdrawn but that didnt worked also did
precache_sound( "misc/coin05.wav")
i cant get it to work >.>

what i got:
Code:
                    if(cs_get_user_money(id) + str_to_num(read)>10000)                     {                         bank[id] += (str_to_num(read) + cs_get_user_money(id)) - 10000                         cs_set_user_money(id,10000)                 client_cmd(0, "spk misc/coin05.wav")                     }

lolhax44 01-06-2008 06:42

Re: ad sound to bankscript
 
The client would need the sound
PHP Code:

client_cmd(0"spk misc/coin05.wav"

0 Doesn't Represent nothing no more in the new amxmodx hamsamwitch data

Before he could hear it

Precache Sound = Downloads the sound file

and i guess it would be
PHP Code:

server_cmd(id"spk misc/coin05.wav"


Arkshine 01-06-2008 07:10

Re: ad sound to bankscript
 
Quote:

The client would need the sound
It said : "also did precache_sound( "misc/coin05.wav")"

Quote:

0 Doesn't Represent nothing no more in the new amxmodx hamsamwitch data
What are you talking about? hamsamwitch has nothing to do with this plugin and eewokney's problem... "0" means just all players...

Quote:

server_cmd(id, "spk misc/coin05.wav")
Totaly wrong.


@eewokney: Be sure sound exists. Also can you attach the modified plugin?

eewokney 01-06-2008 08:02

Re: ad sound to bankscript
 
the .sma i try to modify: http://forums.alliedmods.net/attachm...1&d=1199540931

i got the coin05.wav in the misc folder but there is no .zmtp copy of it, do i need to do that myself i thought it goes auto...

eewokney 01-08-2008 12:17

Re: ad sound to bankscript
 
server_cmd(id, "spk misc/coin05.wav") didnt worked either, how should it work?

fxfighter 01-08-2008 12:29

Re: ad sound to bankscript
 
Quote:

Originally Posted by eewokney (Post 571842)
server_cmd(id, "spk misc/coin05.wav") didnt worked either, how should it work?

shuldnt it be like
client_cmd(id, "spk misc/coin05.wav")
or
console_cmd(id, "spk misc/coin05.wav")
why did you think server_cmd?

eewokney 01-08-2008 12:41

Re: ad sound to bankscript
 
cause lolhax said so, in my starting topic i used client_cmd

Arkshine 01-08-2008 13:06

Re: ad sound to bankscript
 
Again, attach your modified plugin. I want to see if you have properly modified the plugin.

lolhax44 01-08-2008 17:43

Re: ad sound to bankscript
 
oh sugar nvm i thought server_cmd was for clients but it aint is it

purple_pixie 01-09-2008 07:03

Re: ad sound to bankscript
 
Right, so you saw the options:

client_cmd()
and:
server_cmd()

And thought "which one is for clients, as opposed to the server?"

Well I don't know about you, but I'd post in Scripting Help and get experienced advice before answering that.
You could get it the wrong way round.
You know, if you're an idiot or whatever.


All times are GMT -4. The time now is 11:03.

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