Szerző Téma: Miért nem müködik?  (Megtekintve 618 alkalommal)

Miért nem müködik?
« Dátum: 2016. augusztus 13. - 15:52:16 »
0 Show voters
addEventHandler(\"onClientResourceStart\"
showPlayerHudComponent(\"all\", false)
)
local hp = getElementHealth (source)
local money = getPlayerMoney (source)
local name = getPlayerName (source)
local screenW, screenH = guiGetScreenSize()
addEventHandler(\"onClientRender\", root,
    function all ()
local hp = getElementHealth (getLocalPlayer)
local money = getPlayerMoney (getLocalPlayer)
local name = getPlayerName (getLocalPlayer)
        dxDrawLine((screenW * 0.7188) - 1, (screenH * 0.0333) - 1, (screenW * 0.7188) - 1, screenH * 0.1954, tocolor(11, 17, 77, 255), 1, false)
        dxDrawLine(screenW * 0.9891, (screenH * 0.0333) - 1, (screenW * 0.7188) - 1, (screenH * 0.0333) - 1, tocolor(11, 17, 77, 255), 1, false)
        dxDrawLine((screenW * 0.7188) - 1, screenH * 0.1954, screenW * 0.9891, screenH * 0.1954, tocolor(11, 17, 77, 255), 1, false)
        dxDrawLine(screenW * 0.9891, screenH * 0.1954, screenW * 0.9891, (screenH * 0.0333) - 1, tocolor(11, 17, 77, 255), 1, false)
        dxDrawRectangle(screenW * 0.7188, screenH * 0.0333, screenW * 0.2703, screenH * 0.1620, tocolor(0, 0, 0, 255), false)
        dxDrawRectangle(1390, 46, 59, hp-40, tocolor(35, 6, 6, 255), false)
        dxDrawRectangle(1390, 46, 59, 61, tocolor(207, 35, 35, 255), false)
        dxDrawRectangle(1459, 46, 59, 61, tocolor(58, 31, 21, 255), false)
        dxDrawRectangle(1459, 46, 59, 61, tocolor(141, 75, 51, 255), false)
        dxDrawRectangle(1528, 46, 59, 61, tocolor(11, 9, 43, 255), false)
        dxDrawRectangle(1528, 46, 59, 61, tocolor(43, 35, 171, 255), false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) - 1, (screenH * 0.0426) - 1, (screenW * 0.7547) - 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) + 1, (screenH * 0.0426) - 1, (screenW * 0.7547) + 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) - 1, (screenH * 0.0426) + 1, (screenW * 0.7547) - 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) + 1, (screenH * 0.0426) + 1, (screenW * 0.7547) + 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", screenW * 0.7240, screenH * 0.0426, screenW * 0.7547, screenH * 0.0991, tocolor(255, 255, 255, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) - 1, (screenH * 0.0426) - 1, (screenW * 0.7906) - 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) + 1, (screenH * 0.0426) - 1, (screenW * 0.7906) + 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) - 1, (screenH * 0.0426) + 1, (screenW * 0.7906) - 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) + 1, (screenH * 0.0426) + 1, (screenW * 0.7906) + 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", screenW * 0.7599, screenH * 0.0426, screenW * 0.7906, screenH * 0.0991, tocolor(255, 255, 255, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) - 1, (screenH * 0.0426) - 1, (screenW * 0.8266) - 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) + 1, (screenH * 0.0426) - 1, (screenW * 0.8266) + 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) - 1, (screenH * 0.0426) + 1, (screenW * 0.8266) - 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) + 1, (screenH * 0.0426) + 1, (screenW * 0.8266) + 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", screenW * 0.7958, screenH * 0.0426, screenW * 0.8266, screenH * 0.0991, tocolor(255, 255, 255, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"Neved : \"..name, screenW * 0.8292, screenH * 0.0426, screenW * 0.9839, screenH * 0.0556, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(money..\" FT\", screenW * 0.7240, screenH * 0.1083, screenW * 0.8552, screenH * 0.1333, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) - 1, (screenH * 0.1657) - 1, (screenW * 0.8906) - 1, (screenH * 0.1954) - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) + 1, (screenH * 0.1657) - 1, (screenW * 0.8906) + 1, (screenH * 0.1954) - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) - 1, (screenH * 0.1657) + 1, (screenW * 0.8906) - 1, (screenH * 0.1954) + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) + 1, (screenH * 0.1657) + 1, (screenW * 0.8906) + 1, (screenH * 0.1954) + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", screenW * 0.7188, screenH * 0.1657, screenW * 0.8906, screenH * 0.1954, tocolor(43, 35, 171, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
    end
)

 Mi lehet a baja?

Miért nem müködik?
« Válasz #1 Dátum: 2016. augusztus 13. - 16:17:26 »
+1 Show voters
function component()
showPlayerHudComponent(\"all\", false)
end
addEventHandler(\"onClientResourceStart\", getRootElement(), component)
local screenW, screenH = guiGetScreenSize()
function all()
        local hp = getElementHealth (localPlayer)
        local money = getPlayerMoney (localPlayer)
        local name = getPlayerName (localPlayer)
        dxDrawLine((screenW * 0.7188) - 1, (screenH * 0.0333) - 1, (screenW * 0.7188) - 1, screenH * 0.1954, tocolor(11, 17, 77, 255), 1, false)
        dxDrawLine(screenW * 0.9891, (screenH * 0.0333) - 1, (screenW * 0.7188) - 1, (screenH * 0.0333) - 1, tocolor(11, 17, 77, 255), 1, false)
        dxDrawLine((screenW * 0.7188) - 1, screenH * 0.1954, screenW * 0.9891, screenH * 0.1954, tocolor(11, 17, 77, 255), 1, false)
        dxDrawLine(screenW * 0.9891, screenH * 0.1954, screenW * 0.9891, (screenH * 0.0333) - 1, tocolor(11, 17, 77, 255), 1, false)
        dxDrawRectangle(screenW * 0.7188, screenH * 0.0333, screenW * 0.2703, screenH * 0.1620, tocolor(0, 0, 0, 255), false)
        dxDrawRectangle(1390, 46, 59, hp-40, tocolor(35, 6, 6, 255), false)
        dxDrawRectangle(1390, 46, 59, 61, tocolor(207, 35, 35, 255), false)
        dxDrawRectangle(1459, 46, 59, 61, tocolor(58, 31, 21, 255), false)
        dxDrawRectangle(1459, 46, 59, 61, tocolor(141, 75, 51, 255), false)
        dxDrawRectangle(1528, 46, 59, 61, tocolor(11, 9, 43, 255), false)
        dxDrawRectangle(1528, 46, 59, 61, tocolor(43, 35, 171, 255), false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) - 1, (screenH * 0.0426) - 1, (screenW * 0.7547) - 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) + 1, (screenH * 0.0426) - 1, (screenW * 0.7547) + 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) - 1, (screenH * 0.0426) + 1, (screenW * 0.7547) - 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", (screenW * 0.7240) + 1, (screenH * 0.0426) + 1, (screenW * 0.7547) + 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(hp..\"%\", screenW * 0.7240, screenH * 0.0426, screenW * 0.7547, screenH * 0.0991, tocolor(255, 255, 255, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) - 1, (screenH * 0.0426) - 1, (screenW * 0.7906) - 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) + 1, (screenH * 0.0426) - 1, (screenW * 0.7906) + 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) - 1, (screenH * 0.0426) + 1, (screenW * 0.7906) - 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7599) + 1, (screenH * 0.0426) + 1, (screenW * 0.7906) + 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", screenW * 0.7599, screenH * 0.0426, screenW * 0.7906, screenH * 0.0991, tocolor(255, 255, 255, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) - 1, (screenH * 0.0426) - 1, (screenW * 0.8266) - 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) + 1, (screenH * 0.0426) - 1, (screenW * 0.8266) + 1, (screenH * 0.0991) - 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) - 1, (screenH * 0.0426) + 1, (screenW * 0.8266) - 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", (screenW * 0.7958) + 1, (screenH * 0.0426) + 1, (screenW * 0.8266) + 1, (screenH * 0.0991) + 1, tocolor(0, 0, 0, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"%\", screenW * 0.7958, screenH * 0.0426, screenW * 0.8266, screenH * 0.0991, tocolor(255, 255, 255, 255), 1.00, \"default\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"Neved : \"..name, screenW * 0.8292, screenH * 0.0426, screenW * 0.9839, screenH * 0.0556, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(money..\" FT\", screenW * 0.7240, screenH * 0.1083, screenW * 0.8552, screenH * 0.1333, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) - 1, (screenH * 0.1657) - 1, (screenW * 0.8906) - 1, (screenH * 0.1954) - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) + 1, (screenH * 0.1657) - 1, (screenW * 0.8906) + 1, (screenH * 0.1954) - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) - 1, (screenH * 0.1657) + 1, (screenW * 0.8906) - 1, (screenH * 0.1954) + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", (screenW * 0.7188) + 1, (screenH * 0.1657) + 1, (screenW * 0.8906) + 1, (screenH * 0.1954) + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", screenW * 0.7188, screenH * 0.1657, screenW * 0.8906, screenH * 0.1954, tocolor(43, 35, 171, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
end
addEventHandler(\"onClientRender\", getRootElement(), all)

 
Kicsit átírtam, rosszul rendeled hozzá az eventeket a funckiókhoz. Nem teszteltem, de elvileg működnie kell.

Miért nem müködik?
« Válasz #2 Dátum: 2016. augusztus 13. - 18:57:43 »
0 Show voters
Köszi kiprobálom.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal