27.06.2012, 07:01
Make it so it checks if the player is driver when he uses the command to change the station. If it is, allow them to continue. Then, set the audiostream for the playerid (driver) and then you can make a loop to check what players are in the vehicle with you, and set there audiostream as-well.
Example:
If you want them to stop the current music playing, use:
StopAudioStreamForPlayer
Example:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
{
PlayAudioStreamForPlaeyr(.......);
}
}
StopAudioStreamForPlayer