02.02.2012, 13:35
Hi friends,
I need your help.
I want that, when IsPlayerInRangeOfPoint(playerid,30,2347.0178,-1980.7462,13.176, the player can hear a particularly music.
I used this method:
I tried to callback the function OnPlayerUpdate but lag is so high. Can u help me?
Remember. No command, just presence in area.
I need your help.
I want that, when IsPlayerInRangeOfPoint(playerid,30,2347.0178,-1980.7462,13.176, the player can hear a particularly music.
I used this method:
PHP Code:
forward MusicInArea(playerid);
public MusicInArea(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,30,2347.0178,-1980.7462,13.1768))
{
PlayAudioStreamForPlayer(playerid, "http://maremma.com/musica/China.mp3");
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,31,2347.0178,-1980.7462,13.1768))
{
StopAudioStreamForPlayer(playerid);
return 1;
}
return 1;
}
Remember. No command, just presence in area.