Raised This Month: $ Target: $400
 0% 

ad sound to bankscript


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eewokney
Junior Member
Join Date: May 2005
Old 01-05-2008 , 16:30   ad sound to bankscript
Reply With Quote #1

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")                     }
eewokney is offline
Send a message via MSN to eewokney
lolhax44
BANNED
Join Date: Jan 2008
Old 01-06-2008 , 06:42   Re: ad sound to bankscript
Reply With Quote #2

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"
lolhax44 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-06-2008 , 07:10   Re: ad sound to bankscript
Reply With Quote #3

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?
__________________
Arkshine is offline
eewokney
Junior Member
Join Date: May 2005
Old 01-06-2008 , 08:02   Re: ad sound to bankscript
Reply With Quote #4

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 is offline
Send a message via MSN to eewokney
eewokney
Junior Member
Join Date: May 2005
Old 01-08-2008 , 12:17   Re: ad sound to bankscript
Reply With Quote #5

server_cmd(id, "spk misc/coin05.wav") didnt worked either, how should it work?
eewokney is offline
Send a message via MSN to eewokney
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 01-08-2008 , 12:29   Re: ad sound to bankscript
Reply With Quote #6

Quote:
Originally Posted by eewokney View Post
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?
__________________
If one of my plugins become broken, contact me by mail. [email protected]
fxfighter is offline
Send a message via MSN to fxfighter
eewokney
Junior Member
Join Date: May 2005
Old 01-08-2008 , 12:41   Re: ad sound to bankscript
Reply With Quote #7

cause lolhax said so, in my starting topic i used client_cmd
eewokney is offline
Send a message via MSN to eewokney
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-08-2008 , 13:06   Re: ad sound to bankscript
Reply With Quote #8

Again, attach your modified plugin. I want to see if you have properly modified the plugin.
__________________
Arkshine is offline
lolhax44
BANNED
Join Date: Jan 2008
Old 01-08-2008 , 17:43   Re: ad sound to bankscript
Reply With Quote #9

oh sugar nvm i thought server_cmd was for clients but it aint is it
lolhax44 is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 01-09-2008 , 07:03   Re: ad sound to bankscript
Reply With Quote #10

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.
purple_pixie is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:23.


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