diff --git a/imports.lua b/imports.lua index d8c0cd62..a637270d 100644 --- a/imports.lua +++ b/imports.lua @@ -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] diff --git a/server/commands.lua b/server/commands.lua index 0f80daa1..3c324b4f 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -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'}) diff --git a/server/functions.lua b/server/functions.lua index 7fef63af..c82b01f1 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -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