oh yh haha i just added it in to your code without actually looking at it...
local playingsound = 0
function localsound_init(e)
end
function localsound_main(e)
PlayerDX = g_Entity[9]['x'] - g_PlayerPosX; PlayerDY = g_Entity[9]['y'] - g_PlayerPosY; PlayerDZ = g_Entity[9]['z'] - g_PlayerPosZ;
PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ));
if PlayerDist < 600 then
if playingsound == 0 then
LoopSound(e,0);
playingsound = 1
end
else
if playingsound == 1 then
--Destroy(e,0);
StopSound(e,0)
playingsound = 0
end
end
end
there u go
life's one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11