08.03.2012, 20:10
Hey guys,
I have a question about the PlayAudioStreamForPlayer to be used in a vehicle. I've done it whenever the driver starts the radio all the passengers in the car can hear it but I need some help improving on it. I would like the script to remember which radio was streaming last in the vehicle, because whenever a person exits the car the streaming stops. So it would like the streamed to be remember and whenever a person gets back in this specific car the last stream to be played unless it was stopped from the driver.
This is how the code looks, whenever the radio in the vehicle is started:
I have a question about the PlayAudioStreamForPlayer to be used in a vehicle. I've done it whenever the driver starts the radio all the passengers in the car can hear it but I need some help improving on it. I would like the script to remember which radio was streaming last in the vehicle, because whenever a person exits the car the streaming stops. So it would like the streamed to be remember and whenever a person gets back in this specific car the last stream to be played unless it was stopped from the driver.
This is how the code looks, whenever the radio in the vehicle is started:
Код:
for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerVehicleID( playerid ) == GetPlayerVehicleID( i ) ) { Player[playerid][RadioPlaying] = 1; PlayAudioStreamForPlayer(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=21585"); } } return 1; }