Disabling a function in whole script
#1

Hello,
I have an RP gamemode that has alot of StopAudioStreamForPlayer(playerid);
How to disable it if an admin is streaming a global song?
I use this : MusicAll = 0; / if(MusicAll == 0)
But it's too hard to place it before each StopAudioStreamForPlayer(playerid); in a 40k lines script
Please help
Reply
#2

Make a command which makes MusicAll more than 0 and done if you mean that
Reply
#3

How a command will disable alot of StopAudioStreamForPlayer(playerid); functions in same time?
Reply
#4

Press CTRL + H and replace StopAudioStreamForPlayer(playerid); with the check you want;

PHP код:
if(MusicAll == 0StopAudioStreamForPlayer(playerid); 
Is it really hard?
Reply
#5

Not this?
Quote:

if(MusicAll == 0) return StopAudioStreamForPlayer(playerid);

Reply
#6

Quote:
Originally Posted by YouHack
Посмотреть сообщение
Not this?
No, his simply stops the stream, and continues going on, yours will stop the stream, and that entire section of code.
Reply
#7

Ahh i also was wondering for a function that don't stop the code!
Thanks both, +rep guys you deserve it for fast reply!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)