27.12.2012, 21:14
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER)
{
PlayRadioStationForPlayer(playerid);
}
if(newstate == PLAYER_STATE_DRIVER)
{
PlayRadioStationForPlayer(playerid);
}
if(newstate == PLAYER_STATE_ONFOOT || oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
{
StopAudioStreamForPlayer(playerid);
}
return 1;
}