require "lib.moonloader"
local weapons = require 'game.weapons'
local font = renderCreateFont("Trebuchet MS", 8, 4)
function main()
if not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(0)
local info = string.format("ID: %d | Skin: %d | Ping: %d | Health: %d | Speed: %.1f | Anim ID: %d | Anim Lib: %s | Anim Name: %s | Heading: %.1f | Angle: %.1f | Weapon: %s[%d] | X: %f, Y: %f, Z: %f",
select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)), --[[ID]]
getCharModel(PLAYER_PED), --[[Skin]]
sampGetPlayerPing(select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))), --[[Ping]]
getCharHealth(PLAYER_PED), --[[HP]]
(isCharInAnyCar(PLAYER_PED) and getCarSpeed(storeCarCharIsInNoSave(PLAYER_PED)) or getCharSpeed(PLAYER_PED)), --[[Speed]]
sampGetPlayerAnimationId(select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))), --[[Anim ID]]
select(1, returnAnimNameAndFile()), --[[Anil Lib]]
select(2, returnAnimNameAndFile()), --[[Anim Name]]
(isCharInAnyCar(PLAYER_PED) and getCarHeading(storeCarCharIsInNoSave(PLAYER_PED)) or getCharHeading(PLAYER_PED)), --[[Heading]]
returnAngle(), --[[Angle]]
weapons.get_name(getCurrentCharWeapon(PLAYER_PED)), --[[Weapon Name]]
getCurrentCharWeapon(PLAYER_PED), --[[Weapon ID]]
select(1, getCharCoordinates(PLAYER_PED)), --[[CoordX]]
select(2, getCharCoordinates(PLAYER_PED)), --[[CoordY]]
select(3, getCharCoordinates(PLAYER_PED))) --[[CoordZ]]
renderDrawBox(0, select(2, getScreenResolution()) - 20, 5000, 20, 0xAA000000)
renderFontDrawText(font, info, 5, select(2, getScreenResolution()) - 18, 0xFFFFFFFF)
end
end
function returnAngle()
local camCoordX, camCoordY, camCoordZ = getActiveCameraCoordinates()
local targetCamX, targetCamY, targetCamZ = getActiveCameraPointAt()
return getHeadingFromVector2d(targetCamX - camCoordX, targetCamY - camCoordY)
end
function returnAnimNameAndFile()
return sampGetAnimationNameAndFile(sampGetPlayerAnimationId(select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))))
end