04.08.2011, 18:24
Hello there,
I'm trying to achieve this goal here.. I'd like it so a passenger of a vehicle hears the radio when the driver starts one.
Unfortunately, I'm not very succesful, only the driver can hear it.
Here's my code:
I hope one of you could help me out.
Thanks,
Jack Shred.
I'm trying to achieve this goal here.. I'd like it so a passenger of a vehicle hears the radio when the driver starts one.
Unfortunately, I'm not very succesful, only the driver can hear it.
Here's my code:
Код:
if(listitem == 0)// (1-Jazz Radio) { if(pRadio[playerid] == 0) { for(new i; i < MAX_PLAYERS; i++) { new vehicle = GetPlayerVehicleID(playerid); if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER && GetPlayerVehicleID(i) == vehicle) { Radio[playerid] = Audio_PlayStreamed(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=674096",false,false,false); pRadio[playerid] = 1; pRadioID[playerid] = 0; } } } else { SendClientMessage(playerid, 0xFF0000AA, "[MUSIC ERROR]: You're already playing a radio station!"); } }
Thanks,
Jack Shred.