05.06.2015, 00:28
How to write a dynamic gangzone when players enter gangzone play music, when you quit stop music
#include <streamer>
new gGangzoneArea;
public OnGameModeInit()
{
gGangzoneArea = CreateDynamicArea(minx, miny, maxx, maxy);
return 1;
}
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(areaid == gGangzoneArea)
{
PlayAudioStreamForPlayer(playerid, "url");
return 1;
}
return 0;
}
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
if(areaid == gGangzoneArea)
{
StopAudioStreamForPlayer(playerid);
return 1;
}
return 0;
}