DisableMapHack Lua
DisableMapHack Lua
events'
local ffi = require 'ffi'
local gta = ffi.load('GTASA')
ffi.cdef[[
typedef struct RwV3d {
float x, y, z;
} RwV3d;
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(0)
function renderHealthBar(char, x, y)
local result, id = sampGetPlayerIdByCharHandle(char)
if result then
local healthPercentage = sampGetPlayerHealth(id) / 100
local armorPercentage = sampGetPlayerArmor(id) / 100
if armorPercentage > 0 then
renderDrawBox(x - 43, y - 13, 86, 12, 0xFF000000)
renderDrawBox(x - 40, y - 10, 80 * armorPercentage, 8, 0xFFC6C5C7)
end
renderDrawBox(x - 43, y, 86, 12, 0xFF000000)
renderDrawBox(x - 40, y + 3, 80 * healthPercentage, 8, 0xFFFF0000)
end
end