Skip to content

Commit

Permalink
Fixed Client Event Names
Browse files Browse the repository at this point in the history
  • Loading branch information
oaaron99 authored Apr 23, 2019
1 parent 2c51bc7 commit 9a0ff9a
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 9a0ff9a

Please sign in to comment.