SA-MP Forums Archive
Listen to Radio without a vehicle? - 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: Listen to Radio without a vehicle? (/showthread.php?tid=294073)



Listen to Radio without a vehicle? - pandaeyez - 31.10.2011

I can only enter a vehicle to listen radio, Can i change it to without a car?
What i want is type /music then the Radio will be playing

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	// play an internet radio stream when they are in a vehicle
	if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
	{
		PlayAudioStreamForPlayer(playerid, "http://www.di.fm/mp3/eurodance.pls");
	}
	// stop the internet stream
	else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
	{
	    StopAudioStreamForPlayer(playerid);
	}
	return 0;
}



Re: Listen to Radio without a vehicle? - Norn - 31.10.2011

Put this in a command....

pawn Код:
PlayAudioStreamForPlayer(playerid, "http://www.di.fm/mp3/eurodance.pls");



Re: Listen to Radio without a vehicle? - pandaeyez - 31.10.2011

Quote:
Originally Posted by Norn
Посмотреть сообщение
Put this in a command....

pawn Код:
PlayAudioStreamForPlayer(playerid, "http://www.di.fm/mp3/eurodance.pls");
Thanks! works perfect but can you hide those Audio text when you playing?? like this ''Audio stream: http.......''