allow user to set whether they hear a sound..
im making my very first plugin, its quite a simple plugin.. it will play a sound when a user dies... but if you die ALOT it can get VERY annoying, so im trying to make a command that will stop the plugin from working for that client.. I dont know how to do this though :oops:
heres my source, can someone help me? PHP Code:
|
Re: command to stop a plugin on command executer
You really need to try and compile your plugins before posting here. Then, you will get a list of errors. Fix the errors. Then if it doesn't work then, then you can post here.
PHP Code:
|
Re: command to stop a plugin on command executer
ok, I edited the post above to the proper working one, but it still doesnt work.. whether I set amx_deathmsg on or off, I still here it, but otherwise it works fine..
|
Re: command to stop a plugin on command executer
Ok, now that it compiles, take a look at my code and try to understand it. Then, when you understand what things do, add parts of it into your plugin. Infact there is only one major thing you need to add to make it work like you want.
|
Re: command to stop a plugin on command executer
you set everything under a boolean, making it possible for on/off operation..
PHP Code:
|
Re: command to stop a plugin on command executer
My main point was that you had nothing in "ham_player_killed" to prevent the sound from playing. So, you needed to add a variable (doesn't have to be boolean but I used it because it only has two states) to determine if the player is supposed to hear the sound or not.
|
Re: command to stop a plugin on command executer
okay, so in order for it to work I have to declare it when the action happens, thank you fysiks
|
Re: command to stop a plugin on command executer
Quote:
|
Re: command to stop a plugin on command executer
ohh, okay that makes sense, you can defenitely tell that im still learning :oops: :?
|
Re: load random precached sound.. not working =(
okay, here we go, this is a little more 'advanced' in my opinion, so heres the problem... im trying to:
make it load the sounds from a file [deathsounds.ini] status:SUCCESS make it precache the sounds in [deathsounds.ini] status: SUCCESS make it play a random sound when user dies from [deathsounds.ini] status: FAIL the source is NOT cake, so here.. PHP Code:
|
| All times are GMT -4. The time now is 15:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.