SA-MP Forums Archive
Radio 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)
+--- Thread: Radio help (/showthread.php?tid=600160)



Radio help - TheDarkBlade - 04.02.2016

hello , i've got a radio script which plays an audio stream . The only problem i have is that every time i pres F or ENTER the music stops , is there any way of stopping this ?


Re: Radio help - SoFahim - 04.02.2016

Once player hit F or Enter Audio stream will stop.

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
        
    if ((
oldkeys KEY_SECONDARY_ATTACK) && !(newkeys KEY_SECONDARY_ATTACK))
    {
        
StopAudioStreamForPlayer(playerid); // Stop the audio stream
    
}
    return 
1;




Re: Radio help - TheDarkBlade - 04.02.2016

i got it , thank you