06.08.2012, 18:07
how can i make it like i want to hear diffrent music in difrent location how can i do it??
PHP код:
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(IsPlayerNPC(playerid)) return 1;
// Handle playing SomaFM at the alhambra
if(GetPlayerInterior(playerid) == 0) {
if(IsPlayerInRangeOfPoint(playerid,70.0,251.5308,-1807.7228,7.8359)) { // Discoteca
if(!GetPVarInt(playerid,"alhambra")) {
SetPVarInt(playerid,"alhambra",1);
PlayAudioStreamForPlayer(playerid, "http://srv2.radioboss.ro:8888",251.5308,-1807.7228,7.8359,70.0,true);
}
}
}
else {
if(GetPVarInt(playerid,"alhambra")) {
DeletePVar(playerid,"alhambra");
StopAudioStreamForPlayer(playerid);
}
}
return 1;
}