17.05.2013, 20:08
having problems with brackets:
pawn Код:
public OnPlayerEnterDynamicArea(playerid, areaid)
{
foreach(Player, i)
{
if(GetPVarType(i, "bboxareaid"))
{
new station[256];
GetPVarString(i, "BoomboxURL", station, sizeof(station));
if(areaid == GetPVarInt(i, "bboxareaid"))
{
PlayAudioStreamForPlayer(playerid, station, GetPVarFloat(i, "bposX"), GetPVarFloat(i, "bposY"), GetPVarFloat(i, "bposZ"), 30.0, 1);
SendClientMessage(playerid, COLOR_GREY, " You are listening to music coming out of a nearby boombox.");
return 1;
}
}
}
return 1;
}
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
foreach(Player, i)
{
if(GetPVarType(i, "bboxareaid"))
{
if(areaid == GetPVarInt(i, "bboxareaid"))
{
StopAudioStreamForPlayerEx(playerid);
SendClientMessage(playerid, COLOR_GREY, " You have went far away from the boombox.");
return 1;
}
}
}
return 1;
}
public Audio_OnPlay(playerid, handleid)
{
//new string[128];
//format(string, sizeof(string), "(Audio Plugin) Debug: Audio playback started for handle ID %d.", handleid);
//SendClientMessage(playerid, 0xA9C4E4FF, string);
}