Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGriefs committed Oct 16, 2021
1 parent 82b0152 commit a838041
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions client.lua
Expand Up @@ -83,14 +83,14 @@ RegisterNetEvent("AB3:ServerBeep", function(netId)
if DoesEntityExist(ped) and (IsPedInAnyVehicle(ped) == IsPedInAnyVehicle(otherPed)) or not IsPedInAnyVehicle(ped) then
local volume = 0.05
local radius = 10
local playerCoords = GetEntityCoords(ped);
local targetCoords = GetEntityCoords(otherPed);
local distance = Vdist(playerCoords.x, playerCoords.y, playerCoords.z, targetCoords.x, targetCoords.y, targetCoords.z);
local distanceVolumeMultiplier = volume / radius;
local distanceVolume = volume - (distance * distanceVolumeMultiplier);

local playerCoords = GetEntityCoords(ped)
local targetCoords = GetEntityCoords(otherPed)

local distance = Vdist(playerCoords.x, playerCoords.y, playerCoords.z, targetCoords.x, targetCoords.y, targetCoords.z)
local distanceVolumeMultiplier = volume / radius
local distanceVolume = volume - (distance * distanceVolumeMultiplier)

if (distance <= radius) then
SendNUIMessage({ AxonBeep = { volume = distanceVolume } })
end
Expand Down
14 changes: 7 additions & 7 deletions fxmanifest.lua
Expand Up @@ -6,15 +6,15 @@ version '0.0.1'
author 'Reece Stokes <hagen@hyena.gay>'

client_script {
'config.lua',
'client.lua',
'config.lua',
'client.lua',
}
server_script 'server.lua'
ui_page 'index.html'
file {
'beep.wav',
'index.html',
'logo.png',
'style.css',
'KlartextMonoBold.ttf',
'beep.wav',
'index.html',
'logo.png',
'style.css',
'KlartextMonoBold.ttf',
}
2 changes: 1 addition & 1 deletion server.lua
@@ -1,3 +1,3 @@
RegisterNetEvent('AB3:ClientBeep', function()
TriggerClientEvent('AB3:ServerBeep', -1, source)
TriggerClientEvent('AB3:ServerBeep', -1, source)
end)

0 comments on commit a838041

Please sign in to comment.