local root = getRootElement()
local player = getLocalPlayer()
local counter = 0
local starttick
local currenttick
addEventHandler(\"onClientRender\",root,
function()
if not starttick then
starttick = getTickCount()
end
counter = counter + 1
currenttick = getTickCount()
if currenttick - starttick >= 1000 then
setElementData(player,\"FPS\",counter)
counter = 0
starttick = false
end
end
)
function drawStates ()
addEventHandler ( \"onClientRender\", root, logoCiz )
addEventHandler ( \"onClientRender\", root, pingFpsCiz )
end
addEventHandler ( \"onClientResourceStart\", resourceRoot, drawStates )
function logoCiz()
local sx, sy = guiGetScreenSize()
local wx = 450
local wy = 40
local px = (sx-wx)
local py = (5 - wy)
dxDrawImage(sx - 220, py + 200, 189, 131, \"data/logo.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText(\"[My World Race]\", px - 1, 5 - 1, 1928 - 1, 56 - 1, tocolor(0, 0, 0, 255), 1.50, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"[My World Race]\", px + 1, 5 - 1, 1928 + 1, 56 - 1, tocolor(0, 0, 0, 255), 1.50, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"[My World Race]\", px - 1, 5 + 1, 1928 - 1, 56 + 1, tocolor(0, 0, 0, 255), 1.50, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"[My World Race]\", px + 1, 5 + 1, 1928 + 1, 56 + 1, tocolor(0, 0, 0, 255), 1.50, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"[My World Race]\", px, 5, 1928, 56, tocolor(13, 241, 131, 255), 1.50, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
end
function pingFpsCiz()
local sx, sy = guiGetScreenSize()
local wx = 600
local wy = 40
local px = (sx-wx)
local py = (sy-wy)
dxDrawText(\"FPS: \"..getElementData(getLocalPlayer(),\"FPS\")..\" PING: \"..getPlayerPing(getLocalPlayer()), px - 1, py - 1, 1806 - 1, 1050 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, true, false)
dxDrawText(\"FPS: \"..getElementData(getLocalPlayer(),\"FPS\")..\" PING: \"..getPlayerPing(getLocalPlayer()), px + 1, py - 1, 1806 + 1, 1050 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, true, false)
dxDrawText(\"FPS: \"..getElementData(getLocalPlayer(),\"FPS\")..\" PING: \"..getPlayerPing(getLocalPlayer()), px - 1, py + 1, 1806 - 1, 1050 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, true, false)
dxDrawText(\"FPS: \"..getElementData(getLocalPlayer(),\"FPS\")..\" PING: \"..getPlayerPing(getLocalPlayer()), px + 1, py + 1, 1806 + 1, 1050 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, true, false)
dxDrawText(\"FPS: \"..getElementData(getLocalPlayer(),\"FPS\")..\" PING: \"..getPlayerPing(getLocalPlayer()), px, py, 1806, 1050, tocolor(13, 241, 131, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, true, false)
end
itt egy példa, ez úgy írja ki