Skip to content

Commit

Permalink
fix: incorrect indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Mar 11, 2022
1 parent 302bb40 commit 8d9b4a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion imports.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Ox = setmetatable({
}, {
__index = function(self, method)
rawset(self, method, function(...)
return core[method](nil, ...)
return ox_core[method](nil, ...)
end)

return self[method]
Expand Down
6 changes: 3 additions & 3 deletions server/commands.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lib.addCommand('group.admin', 'setgroup', function(source, args)
local player = server.player(args.target)
local obj = player(args.target)

if player then
player:setGroup(args.group, args.rank)
if obj then
obj:setGroup(args.group, args.rank)
end
end, {'target:number', 'group:string', 'rank:number'})
4 changes: 3 additions & 1 deletion server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ local functions = {}

function functions.getIdentifiers(source)
local identifiers = {}
for i=0, GetNumPlayerIdentifiers(source)-1 do

for i = 0, GetNumPlayerIdentifiers(source)-1 do
local prefix, identifier = string.strsplit(':', GetPlayerIdentifier(source, i))
identifiers[prefix] = identifier
end

return identifiers
end

Expand Down

0 comments on commit 8d9b4a0

Please sign in to comment.