Skip to content

Commit

Permalink
fix(client): correct zone target response handling
Browse files Browse the repository at this point in the history
- Pass the zone id for a selected option to the callback,
which was mistakenly removed at some point.
- Fix export handling for zone options, which possibly
never worked?
  • Loading branch information
thelindat committed Sep 23, 2024
1 parent cdaf676 commit ed21208
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,12 @@ RegisterNUICallback('select', function(data, cb)
state.setNuiFocus(false)
end

currentTarget.zone = zone?.id

if option.onSelect then
option.onSelect(option.qtarget and currentTarget.entity or getResponse(option))
elseif option.export then
exports[option.resource][option.export](nil, getResponse(option))
exports[option.resource or zone.resource][option.export](nil, getResponse(option))
elseif option.event then
TriggerEvent(option.event, getResponse(option))
elseif option.serverEvent then
Expand Down

0 comments on commit ed21208

Please sign in to comment.