Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.7 kB
15
Indexable
Never
local font_flag = require('moonloader').font_flag
local my_font = renderCreateFont('Cambria', 11, font_flag.BOLD + font_flag.SHADOW)

function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end

    while true do
        local server = sampGetCurrentServerName(PLAYER_HANDLE)
        local _, id = sampGetPlayerIdByCharHandle(PLAYER_PED)
        local nick = sampGetPlayerNickname(id)
        local model_id = getCharModel(PLAYER_PED)
        local health = getCharHealth(PLAYER_PED)
        local armour = getCharArmour(PLAYER_PED)
        local score = sampGetPlayerScore(id)
        local current_weapon = getCurrentCharWeapon(PLAYER_PED)
        local ammo = getAmmoInCharWeapon(PLAYER_PED, current_weapon)
        local ping = sampGetPlayerPing(id)
        
        local x, y, z = getCharCoordinates(PLAYER_PED)
        
        renderFontDrawText(my_font, 
            '{ED8C23}Server: {FFFFFF}' .. server ..
            '\n{ED8C23}Nickname: {FFFFFF}' .. nick ..
            '\n{ED8C23}Player ID: {FFFFFF}' .. id ..
            '\n{ED8C23}Model ID: {FFFFFF}' .. model_id ..
            '\n{ED8C23}Health: {FFFFFF}' .. health ..
            '\n{ED8C23}Armour: {FFFFFF}' .. armour ..
            '\n{ED8C23}Score: {FFFFFF}' .. score ..
            '\n{ED8C23}Weapon ID: {FFFFFF}' .. current_weapon ..
            '\n{ED8C23}Ammo: {FFFFFF}' .. ammo ..
            '\n{ED8C23}Ping: {FFFFFF}' .. ping ..
            '\n{ED8C23}Coordinates: {FFFFFF}X: ' .. string.format("%.3f", x) .. ' Y: ' .. string.format("%.3f", y) .. ' Z: ' .. string.format("%.3f", z),
            10, 400, 0xFFFFFFFF
        )
        wait(0)
    end
end
Leave a Comment