mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
added to emit
This commit is contained in:
@@ -42,7 +42,7 @@ local temp_var_time = 1000/commands_per_iteration*ticks_per_iteration --temp var
|
||||
function server.emit(code, callback)
|
||||
if type(callback) == 'function' then
|
||||
local uuid = server.add_callback(callback)
|
||||
game.write_file('socket.data','{ "type": "JS", "id": "' .. uuid .. '", "code": "' .. code .. '" }\n', true, 0)
|
||||
json_log({type='JS',id=uuid,code=code})
|
||||
end
|
||||
end
|
||||
--adds a call back that can be ran with a command
|
||||
|
||||
Reference in New Issue
Block a user