First command added, fix commad errors

This commit is contained in:
Cooldude2606
2017-12-08 16:31:32 +00:00
parent 1e1fabd565
commit cab1207a85
5 changed files with 21 additions and 13 deletions

View File

@@ -124,7 +124,11 @@ function Server.interface(callback,thread,...)
end
end
commands.add_command('server-interface', 'Runs the given input from the script', {'code',true}, function(event,args)
local callback = args.code
local success, err = Server.interface(callback)
player_return(err)
end)
-- thread allows you to run fuinction async to the main game
local thread = {}