- 179
- 31
[ML] (error) helper2.lua: ...pob\Desktop\GTA 140K BY DAPO SHOW\moonloader\helper2.lua:42: '<eof>' expected near 'end'
[ML] (error) helper2.lua: Script died due to an error. (11CA73EC)
[ML] (error) helper2.lua: Script died due to an error. (11CA73EC)
LUA:
require "lib.moonloader"
if not doesFileExist('moonloader/config/delay.ini') then inicfg.save(mainIni,'delay.ini') end
function main()
while not isSampAvailable() do wait(100) end
while true do
wait(0)
result, id = sampGetPlayerIdByCharHandle(PLAYER_PED)
if not sampIsDialogActive() and not sampIsChatInputActive() then
if isKeyDown(97) then
sampSetChatInputEnabled(true)
sampSetChatInputTextWithDelay('/id ' ..id, math.random(2, 70))
wait (75)
setVirtualKeyDown(13, true)
wait(5)
setVirtualKeyDown(13, false)
end
if isKeyJustPressed(98) then
sampSetChatInputEnabled(true)
sampSetChatInputTextWithDelay('/time', math.random(2, 70))
wait (75)
setVirtualKeyDown(13, true)
wait(5)
setVirtualKeyDown(13, false)
end
if isKeyJustPressed(99) then
sampSetChatInputEnabled(true)
sampSetChatInputTextWithDelay('/stats', math.random(2, 70))
wait (75)
setVirtualKeyDown(13, true)
wait(5)
setVirtualKeyDown(13, false)
end
end
function sampSetChatInputTextWithDelay(text, delay)
local array = {}
for i in text:gmatch('[^%z]') do
wait(delay)
table.insert(array, i)
sampSetChatInputText(table.concat(array))
end