06.07.2016, 11:16
PHP код:
forward SendAudioToPlayer(playerid, audioid, volume, seek);
public SendAudioToPlayer(playerid, audioid, volume, seek)
{
if(IsPlayerConnected(playerid))
{
if(Audio_IsClientConnected(playerid))
{
new localhandle = Audio_Play(playerid,audioid);//Line 8092
Audio_SetVolume(playerid, localhandle, volume);
Audio_SetPosition(playerid, localhandle, seek);
}
else
{
return 0;
}
}
return 1;
}
SendAudioToRange(audioid, volume, seek, Float:x, Float:y, Float:z, Float:range)
{
if(audiohandleglobal >= 99)
{
audiohandleglobal = 0;
}
else
{
audiohandleglobal++;
}
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(Audio_IsClientConnected(i))
{
if(IsPlayerInRangeOfPoint(i,range,x,y,z))
{
new localhandle = Audio_Play(i,audioid);// Line 8153
Audio_Set3DPosition(i, localhandle, x, y, z, range);
Audio_SetVolume(i, localhandle, volume);
Audio_SetPosition(i, localhandle, seek);
audiohandle[i][audiohandleglobal] = localhandle;
}
}
}
}
return audiohandleglobal;
}