Sunday, September 21, 2014

// ... luaVM = luaL_newstate ( ) ; luaL_openlibs ( luaVM ) ; // lua_register ( luaVM,


function thread1 wait(2000) ShowGameText() wait(5000) StartMission(1) end function thread2 while true do if isPlayerDead() ShowGameText(" ") wait(3000) -- 3 .. break end wait(0) end end -- . CreateThread(thread1) CreateThread(thread2) ithaca beer company , , wait , , - . , - , .
2. , , / , , - . , 7 , - , ? , .
// ... luaVM = luaL_newstate ( ) ; luaL_openlibs ( luaVM ) ; // lua_register ( luaVM, "setRGBMoney" , LuaSetRGB ) ; lua_register ( luaVM, "setRGBTime" , LuaSetRGB2 ) ; lua_register ( luaVM, "Wait" , luaWait ) ; Newthread = lua_newthread ( luaVM ) ; luaL_loadfile ( Newthread, "script.lua" ) ; lua_pcall ( Newthread, 0 , 0 , 0 ) ; lua_getglobal ( Newthread, "Main" ) ; lua_resume ( Newthread, 0 , 0 ) ;
// - void OnSceneUpdate ( ) { // snTimeInMillisecondsE - if ( vcTime < = *snTimeInMillisecondsE ) { lua_resume ( Newthread, luaVM, 0 ) ; } }
, ?


No comments:

Post a Comment