Skip to content

Commit

Permalink
fix(client/api): early return when setting player options
Browse files Browse the repository at this point in the history
Resolves #146.
  • Loading branch information
thelindat committed May 13, 2024
1 parent 75c09da commit 623ce38
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,12 @@ end
function options_mt:set(entity, _type, model)
if not entity then return options end

if _type == 1 then
if IsPedAPlayer(entity) then
self:wipe()
self.globalTarget = players
options_mt.size += 1
end
if _type == 1 and IsPedAPlayer(entity) then
self:wipe()
self.globalTarget = players
options_mt.size += 1

return
end

local netId = NetworkGetEntityIsNetworked(entity) and NetworkGetNetworkIdFromEntity(entity)
Expand Down

0 comments on commit 623ce38

Please sign in to comment.