Tiny script help
#1

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
Reply
#2

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

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

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

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

Its not working please anyone helpppp
Reply
#5

Jamesc It worked thanks !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)