#4

If you mean you want to stop the sound when the player is leaving the vehicle,

Use this code. This callback will be called when the player leaves any vehicle he is in, and you can stop the audio for him.

https://sampwiki.blast.hk/wiki/StopAudioStreamForPlayer
https://sampwiki.blast.hk/wiki/OnPlayerStateChange

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
        // If the player exits a vehicle
	if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) 
	{
	    StopAudioStreamForPlayer(playerid); // Stop the audio stream
	}
	return 1;
}
Reply


Messages In This Thread
song - by asri - 25.05.2017, 03:38
Re: song - by CheezIt - 25.05.2017, 04:30
Re: song - by Aldrago - 25.05.2017, 04:34
Re: song - by Farzam - 25.05.2017, 05:05
Re: song - by asri - 25.05.2017, 06:06

Forum Jump:


Users browsing this thread: 1 Guest(s)