AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Simple question [Still need help] (https://forums.alliedmods.net/showthread.php?t=159764)

usaexelent 06-21-2011 08:01

Simple question [Still need help]
 
I'm a noobie at amx plugins and i want to ask you all how to make a sound play when somthing happens like when you buy something on a plugin.
I would frefer to use simple modules.

Nyuszy 06-21-2011 09:09

Re: Simple question
 
http://www.amxmodx.org/funcwiki.php?go=func&id=282

usaexelent 06-21-2011 09:43

Re: Simple question
 
Is there another way.
Or maybe you could give me example with the current one?

Hunter-Digital 06-21-2011 10:25

Re: Simple question [Still need help]
 
You have a example of emit_sound() in that page there, including comments.
You'll also need to use precache_sound() on the sound to make players download it if they don't have it.

Still, emit_sound() emits a sound (duh) that all nearby players can hear.
If you want just a player to hear it, use client_cmd() like so:
Code:

client_cmd(id, "spk ^"path/sound.wav^"")

usaexelent 06-21-2011 12:03

Re: Simple question [Still need help]
 
Could anybody tell me what client_cmd() has commands ?
And BTW thanks it works ;)

drekes 06-21-2011 12:09

Re: Simple question [Still need help]
 
http://www.amxmodx.org/funcwiki.php?go=func&id=230

usaexelent 06-21-2011 12:25

Re: Simple question [Still need help]
 
Yes i seen this page but it doesn't give me any command list or what it does.

grimvh2 06-21-2011 12:47

Re: Simple question [Still need help]
 
ffs client command, it makes the player execute a command. A console command ...

usaexelent 06-21-2011 15:21

Re: Simple question [Still need help]
 
Thanks i got it now, i didn't know that theres such thing as spk command.

drekes 06-21-2011 20:46

Re: Simple question [Still need help]
 
for mp3's its:
PHP Code:

client_cmd(id"mp3 play ^"sound/some_song.mp3^""); 



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

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