скрипт не робит

gromov squad

Участник
Автор темы
107
11
ML] (error) Auto-Heal.lua: C:\Games\stock gta inferno\moonloader\Auto-Heal.lua:11: unexpected symbol near '='
[ML] (error) Auto-Heal.lua: Script died due to an error. (0671A68C)
 

gromov squad

Участник
Автор темы
107
11
lua:
local sampev = require 'lib.samp.events'
state = false
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('ah', ah)
    while true do
        wait(0)
        local myhp = getCharHealth(PLAYER_PED)
        if state and myhp < 20 then
            sampSendChat('/healme')
            wait(1000) = 1c
            sampSendChat('/healme')
            state = false
        end
    end
end

function sampev.onSendSpawn()
    state = true
end

function ah()
    state = not state
sampAddChatMessage(state and 'on' or 'off', -1)
end