Még csak tanulgatom a lua-t
most látszik az előző csak a mostani nem viszont ha a régit kitörlöm a mostani látszik
local screenWidth,screenHeight = guiGetScreenSize()
function renderDisplay ( )
dxDrawImage ( screenWidth/1.3 - 40, 0, 320, 170, \'hud.png\', angle, 0, -120 )
end
function HandleTheRendering ( )
addEventHandler(\"onClientRender\", root, renderDisplay)
end
addEventHandler(\"onClientResourceStart\",resourceRoot, HandleTheRendering)
local components = { \"weapon\", \"money\",\"health\", \"clock\" , \"breath\", \"armour\", \"wanted\",\"radar\",\"ammo\" }
addEventHandler(\"onClientResourceStart\", getResourceRootElement(getThisResource()),
function ()
for _, component in ipairs( components ) do
setPlayerHudComponentVisible( component, false )
end
end)
local screenWidth, screenHeight = guiGetScreenSize ( ) --
----------------------------név--------------------
local screenWidth, screenHeight = guiGetScreenSize ( )
function createText( )
local localPlayerName = getPlayerName(getLocalPlayer())
dxDrawText ( localPlayerName, 960, screenHeight - 808, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, \"pricedown\" )
end
function HandleTheRendering ( )
addEventHandler ( \"onClientRender\", root, createText )
end
addEventHandler ( \"onClientResourceStart\", resourceRoot, HandleTheRendering )
--------------------------------pénz rendszer------------------------
local screenWidth, screenHeight = guiGetScreenSize ( )
function createText ( )
local hour, minutes = getTime()
local playerMoney = getPlayerMoney ()..\"ft\"
dxDrawText ( playerMoney..\" \"..hour..\":\"..minutes, 955, screenHeight - 828, screenWidth, screenHeight, tocolor ( 139, 201, 99, 255 ), 1, \"pricedown\" )
end
function HandleTheRendering ( )
addEventHandler ( \"onClientRender\", root, createText )
end
addEventHandler ( \"onClientResourceStart\", resourceRoot, HandleTheRendering )