script_name('info')
script_author('histor')
script_description('helper for witchers')
script_version('1')
require "lib.moonloader"
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local prf = "{808080}[{8B0000}info{808080}] : "
local sampev = require 'lib.samp.events'
local activated = false
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
wait(1000)
sampAddChatMessage(" ", -1)
sampAddChatMessage(prf.."Скрипт {8B0000}активен{808080}! Версия : {8B0000}1", -1)
sampAddChatMessage(prf.."Автор: {8B0000}histor#8461{808080}. Активация {8B0000}//info {808080}!", -1)
sampAddChatMessage(" ", -1)
local font = renderCreateFont("Arial", 8, 5)
sampRegisterChatCommand('/info', function()
activated = not activated
end)
while true do
wait(0)
if isCharSittingInAnyCar(PLAYER_PED) and activated then
local x, y, z = getCharCoordinates(PLAYER_PED)
local hpped = getCharHealth(PLAYER_PED)
local armorped = getCharArmour(PLAYER_PED)
local x1, y1 = convert3DCoordsToScreen(x,y,z)
local veh = storeCarCharIsInNoSave(PLAYER_PED)
local x, y, z = getCarCoordinates(veh)
local hpcar = getCarHealth(veh)
local _, idcar = sampGetVehicleIdByCarHandle(veh)
local a, b = getCarColours(veh)
local x1, y1 = convert3DCoordsToScreen(x,y,z)
renderFontDrawText(font, 'hp: ['..hpped..']\narm: ['..armorped..']', x1-70, y1, -1)
renderFontDrawText(font, 'hpcar: ['..hpcar..']\nid: ['..idcar..']\ncolor: ['..a..'|'..b..']', x1, y1, -1)
end
if not isCharSittingInAnyCar(PLAYER_PED) and activated then
local x, y, z = getCharCoordinates(PLAYER_PED)
local hpped = getCharHealth(PLAYER_PED)
local armorped = getCharArmour(PLAYER_PED)
local x1, y1 = convert3DCoordsToScreen(x,y,z)
renderFontDrawText(font, 'hp: ['..hpped..']\narm: ['..armorped..']', x1-25, y1, -1)
end
end
end