SA-MP Forums Archive
Tiny script help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tiny script help (/showthread.php?tid=210077)



Tiny script help - Swiftz - 12.01.2011

I managed to put some audio into my server with audio plugin. When i do /eradios1 I hear that radio but when i want to change to /eradios2 , The /eradio1 doesnt stop they both continue playing, How to stop one radio when i toggle other one please help

PHP код:
}
        if(
strcmp(cmd"/eradios1"true) == 0)
    {
        
Audio_PlayStreamed(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=674096"falsefalsefalse);
        return 
1;
    }
        if(
strcmp(cmd"/eradios2"true) == 0)
    {
        
Audio_PlayStreamed(playerid"http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280356"falsefalsefalse);
        return 
1



Re: Tiny script help - Swiftz - 12.01.2011

i think i could use audio_stop(playerid, handleid) But what handleid should i put in this case any ideas?


Re: Tiny script help - JamesC - 12.01.2011

pawn Код:
new AudioHandler[ MAX_PLAYERS ]; // Top of script.

AudioHandler[ playerid ] = Audio_PlayStreamed( ... // To Play

audio_stop( playerid, AudioHandler[ playerid ] ); // To Stop



Re: Tiny script help - Swiftz - 12.01.2011

Its not working please anyone helpppp


Re: Tiny script help - Swiftz - 12.01.2011

Jamesc It worked thanks !!