mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Implemented "wait" functionality to the lua engine. Lost commits due to screw up.
This commit is contained in:
parent
bc30958d37
commit
718bc28c57
12 changed files with 302 additions and 611 deletions
|
@ -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(...));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue