require 'lib.moonloader'
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
if not sampIsCursorActive() then
if wasKeyPressed(VK_I) then
setChatinputWithRandomDelay('/id '..select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)), 10, 50)
end
if wasKeyPressed(VK_J) then
setChatinputWithRandomDelay('/time', 10, 50)
end
end
end
end
function setChatinputWithRandomDelay(text, min, max)
lua_thread.create(function()
if not sampIsChatInputActive() then sampSetChatInputEnabled(true) end
sampSetChatInputText('')
for i = 1, #text do
sampSetChatInputText(sampGetChatInputText()..text:sub(i, i))
math.randomseed(os.clock())
wait(math.random(min, max))
end
sampSendChat(text)
sampSetChatInputText('')
end)
end