AlliedModders

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

Waleed 06-17-2012 15:05

Not Precaching
 
I read it here: http://forums.alliedmods.net/showthread.php?t=136682
But its not working,Any changes to do?

PHP Code:

#include <amxmodx>
#include <amxmisc>

new const gszSound[] = "sheep.wav";  

public 
plugin_precache()
{
    
precache_soundgszSound )
}  

public 
plugin_init()
{
    
register_plugin("Testing""1,0""Waleed")
    
register_clcmd("say /mega""cmd_me")
}
public 
cmd_me(id)
{
            
client_cmd(id"sheep.wav")
            



YamiKaitou 06-17-2012 15:08

Re: Not Precaching
 
What is not working? The precaching or the playing of the sound.

If it is not precaching, then the file doesn't exist in the sound folder

If the sound isn't playing, than that is because you are not telling it to play.

Waleed 06-17-2012 15:11

Re: Not Precaching
 
File is a sheep.wav,Its a basic sound file that come with CounterStrike
The sound is not playing

YamiKaitou 06-17-2012 15:13

Re: Not Precaching
 
Quote:

Originally Posted by YamiKaitou (Post 1730675)
than that is because you are not telling it to play.

Use "spk sheep.wav"

Waleed 06-17-2012 15:18

Re: Not Precaching
 
Unknown symbol (spk) error

Backstabnoob 06-17-2012 15:21

Re: Not Precaching
 
"spk" is a console command. I told you in the other topic you have to put it before the sound file name.

Waleed 06-17-2012 15:22

Re: Not Precaching
 
Can you please edit my code to show me,I cannot understand......

Backstabnoob 06-17-2012 15:23

Re: Not Precaching
 
This is scripting help, post in suggestions/requests if you want someone to just give you a working code.
Try to use your head.

fysiks 06-17-2012 15:27

Re: Not Precaching
 
Quote:

Originally Posted by Waleed (Post 1730692)
Can you please edit my code to show me,I cannot understand......

If you can't understand Yami's post then you should stop coding now.

Waleed 06-17-2012 15:29

Re: Not Precaching
 
http://forums.alliedmods.net/showthread.php?t=26363

If you don't know how to explain,Then you should probably don't say anything.
In above link,In 7th point,It is written to provide detail about error,

By the way I am not requesting,I am sharing my problem according to this thread,If you know then tell me.......
Or don't say anything,Sorry!


All times are GMT -4. The time now is 06:13.

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