Skip to content

Commit

Permalink
Merge pull request #4 from oaaron99/master
Browse files Browse the repository at this point in the history
Fixed Client Event Names
  • Loading branch information
plunkettscott authored Apr 23, 2019
2 parents 2c51bc7 + 9a0ff9a commit fb49e6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ local standardVolumeOutput = 1.0;
--
-- Starts playing a sound locally on a single client.
------
RegisterNetEvent('LIFE_CL:Sound:PlayOnOne')
AddEventHandler('LIFE_CL:Sound:PlayOnOne', function(soundFile, soundVolume)
RegisterNetEvent('InteractSound_CL:PlayOnOne')
AddEventHandler('InteractSound_CL:PlayOnOne', function(soundFile, soundVolume)
SendNUIMessage({
transactionType = 'playSound',
transactionFile = soundFile,
Expand All @@ -41,8 +41,8 @@ end)
--
-- Starts playing a sound on all clients who are online in the server.
------
RegisterNetEvent('LIFE_CL:Sound:PlayOnAll')
AddEventHandler('LIFE_CL:Sound:PlayOnAll', function(soundFile, soundVolume)
RegisterNetEvent('InteractSound_CL:PlayOnAll')
AddEventHandler('InteractSound_CL:PlayOnAll', function(soundFile, soundVolume)
SendNUIMessage({
transactionType = 'playSound',
transactionFile = soundFile,
Expand All @@ -66,8 +66,8 @@ end)
-- Starts playing a sound on a client if the client is within the specificed maxDistance from the playOnEntity.
-- @TODO Change sound volume based on the distance the player is away from the playOnEntity.
------
RegisterNetEvent('LIFE_CL:Sound:PlayWithinDistance')
AddEventHandler('LIFE_CL:Sound:PlayWithinDistance', function(playerNetId, maxDistance, soundFile, soundVolume)
RegisterNetEvent('InteractSound_CL:PlayWithinDistance')
AddEventHandler('InteractSound_CL::PlayWithinDistance', function(playerNetId, maxDistance, soundFile, soundVolume)
local lCoords = GetEntityCoords(GetPlayerPed(-1))
local eCoords = GetEntityCoords(GetPlayerPed(GetPlayerFromServerId(playerNetId)))
local distIs = Vdist(lCoords.x, lCoords.y, lCoords.z, eCoords.x, eCoords.y, eCoords.z)
Expand Down

0 comments on commit fb49e6a

Please sign in to comment.