Getting tick count in Moonloader

81Vm3

Новичок
Автор темы
4
0
Версия MoonLoader
Другое
How can you guys get tick count in Moonloader?
 

sᴀxᴏɴ

Известный
Всефорумный модератор
788
855
Lua:
local ffi = require('ffi')
ffi.cdef [[
    unsigned long GetTickCount();
]]

local function getTickCount()
    return ffi.C.GetTickCount()
end

function main()
    repeat wait(0) until isSampAvailable()
    sampRegisterChatCommand('gtc', function()
        sampAddChatMessage(getTickCount(), -1)
    end)
    wait(-1)
end
Lua:
function main()
    repeat wait(0) until isSampAvailable()
    sampRegisterChatCommand('gtc', function()
        sampAddChatMessage(os.clock(), -1)
    end)
    wait(-1)
end
 
Последнее редактирование: