Code modernize (#234)

* refactor: declare exports at runtime and drop the player-data provides alias

Signed-off-by: Mathu-lmn <[email protected]>

* refactor: pass handlers directly to RegisterNetEvent

Signed-off-by: Mathu-lmn <[email protected]>

* refactor: use CreateThread/Wait without the Citizen prefix

Signed-off-by: Mathu-lmn <[email protected]>

* chore: remove trailing whitespace, stray lines and unused locals

Signed-off-by: Mathu-lmn <[email protected]>

---------

Signed-off-by: Mathu-lmn <[email protected]>
This commit is contained in:
Mathu-lmn
2026-09-23 21:00:01 +02:00
committed by GitHub
parent 2935a6ba1d
commit 39b91b14ce
23 changed files with 64 additions and 137 deletions
@@ -80,14 +80,12 @@ local function handleFountainStuff(source, id, pickup)
end
-- event for picking up fountain->player
RegisterNetEvent('money_fountain:tryPickup')
AddEventHandler('money_fountain:tryPickup', function(id)
RegisterNetEvent('money_fountain:tryPickup', function(id)
handleFountainStuff(source, id, true)
end)
-- event for donating player->fountain
RegisterNetEvent('money_fountain:tryPlace')
AddEventHandler('money_fountain:tryPlace', function(id)
RegisterNetEvent('money_fountain:tryPlace', function(id)
handleFountainStuff(source, id, false)
end)