19.11.2011, 23:24
eu aconselharia a fazer assim:
Quando o player entrar no carro vai tocar a radio que estava tocando e quando o player trocar de radio os players que estao no carro dele vao ouvir a msm radio.
pawn Код:
//variavel global
new Radio[MAX_VEHICLES][128];//n sei o tamanho maximo de um link de radio, troca o 128 pelo tamanho maximo
//onde o player troca a estaзгo de radio
format(Radio[GetPlayerVehicleID(playerid)],sizeof(Radio), "link da radio");
PlayeAudioStreamForPlayer(playerid, Radio[GetPlayerVehicleID(playerid)]);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
PlayeAudioStreamForPlayer(i, Radio[GetPlayerVehicleID(i)]);
}
//na public OnPlayerStateChange
if(PLAYER_STATE_PASSENGER == newstate == PLAYER_STATE_DRIVER)
PlayeAudioStreamForPlayer(playerid, Radio[GetPlayerVehicleID(playerid)]);