-- require "lib.moonloader" не нужно
--local event = require('lib.samp.events') не нужен тут вообще
--require 'game.keys' не нужно
--local sampev = require 'lib.samp.events' wat?????? ты во второй строке подключил...
local mainState = false
function main()
--[[if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end]]
if not isSampAvailable() then return false end
sampAddChatMessage("[{fd3737}GODMODE{FFFFFF}] LOADED", -1)
sampAddChatMessage("{fd3737}Activate: /gm{FFFFFF}", -1)
sampAddChatMessage("{fd3737}Author: zerro1F{FFFFFF}", -1)
sampRegisterChatCommand("gm", active)
-- active = false не нужно
while true do
wait(0)
health = getCharHealth(PLAYER_PED)
if health < 90 and health > 5 and mainState then
sampSendClickTextdraw(642)
--wait(0) не нужно
end
end
end
--[[
function event.onApplyPlayerAnimation(playerId, animLib, animName)
local _, myId = sampGetPlayerIdByCharHandle(PLAYER_PED)
if playerId == myId then
if sampFindAnimationIdByNameAndFile(animName, animLib) == 1658 then taskPlayAnim(playerPed, "HANDSUP", "PED", 1.0, false, false, false, false, 1) end
end
end
function event.onSetPlayerSpecialAction(SPECIAL_ACTION_NONE)
return false
end
function event.onDisplayGameText(style, time, text)
if text:find("%-20%$") then
printString('GODMODE', 1000)
return false
end
end нахуя???]]
function active()
--[[
if active == true then
active = false
sampAddChatMessage("[{fd3737}GODMODE{FFFFFF}] Deactivated.", -1)
else
active = true
sampAddChatMessage("[{fd3737}GODMODE{FFFFFF}] Activated.", -1)
end дебилизм]]
mainState = not mainState
sampAddChatMessage(string.format("[{fd3737}GODMODE{FFFFFF}] %s", mainState and "Activated" or "Deactivated"), -1)
end