21.10.2014, 18:11
Putting sound system, in a certain place, like putting a sound playing in the slum, who are in shanty town will hear the sound that the player colocae, and that is not in the favela can not hear.
#include a_samp
#include streamer // For Dynamics
new YourVariable;
public OnGameModeInit()
{
YourVariable = CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
return 1;
}
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(areaid == YourVariable )
{
PlayAudioStreamForPlayer(playerid, "http://mp3dos.com/assets/songs/15000-15999/15726-am-i-wrong-nico-vinz--1411219503.mp3");
SetPlayerTime(playerid,24,0);
}
return 1;
}
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
if(areaid == YourVariable )
{
SetPlayerTime(playerid,8,0);
StopAudioStreamForPlayer(playerid);
}
return 1;
}