mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Implemented "wait" functionality to the lua engine. Lost commits due to screw up.
This commit is contained in:
@@ -54,11 +54,23 @@ INVENTORY_EQUIPMENT_OTHERPLAYER = 0x00F9; --Max 0x23
|
||||
--UTILS
|
||||
|
||||
function callClientFunction(player, functionName, ...)
|
||||
player:RunEventFunction(functionName, ...);
|
||||
result = coroutine.yield();
|
||||
player:RunEventFunction(functionName, ...);
|
||||
result = coroutine.yield("_WAIT_EVENT");
|
||||
return result;
|
||||
end
|
||||
|
||||
function wait(seconds)
|
||||
return coroutine.yield(_WAIT_TIME, seconds);
|
||||
end
|
||||
|
||||
function waitForSignal(signal)
|
||||
return coroutine.yield("_WAIT_SIGNAL", signal);
|
||||
end
|
||||
|
||||
function sendSignal(signal)
|
||||
GetLuaInstance():OnSignal(signal);
|
||||
end
|
||||
|
||||
function printf(s, ...)
|
||||
if ... then
|
||||
print(s:format(...));
|
||||
|
Reference in New Issue
Block a user