21.02.2012, 15:31
something like this?
pawn Код:
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(IsPlayerNPC(playerid)) return 1;
new isnear;
if(GetPlayerInterior(playerid) == 0 && isnear == 0)
{
if(IsPlayerInRangeOfPoint(playerid,70.0,1300.4093,-1868.7646,17.4449))
{
if(!GetPVarInt(playerid,"alhambra"))
{
SetPVarInt(playerid,"alhambra",0);
isnear = 1;
PlayAudioStreamForPlayer(playerid, "http://live.radioplayone.ro:9888/",1300.4093,-1868.7646,17.4449,70.0,true);
}
}
}
else
{
if(GetPVarInt(playerid,"alhambra"))
{
DeletePVar(playerid,"alhambra");
StopAudioStreamForPlayer(playerid);
isnear = 0;
}
}
return 1;
}