Szerző Téma: Étel, ital rendszer  (Megtekintve 2108 alkalommal)

Étel, ital rendszer
« Dátum: 2016. augusztus 24. - 20:57:25 »
0 Show voters
Sziasztok! Éppen az egyedi hudomon dolgozok, és a bajom az lenne, hogy elvileg a debug szerint (ERROR:Loading Script Failed: hud/client.lua:9: \'(\' expected near \'etele\') Vagyis ha jól olvasom vagy hiányol valamit, vagy éppen valami ottvan ami neki nem tetszik!
[Kliens odali:]
 

    function component()
            showPlayerHudComponent(\"all\", false)
    end
    addEventHandler(\"onClientResourceStart\", getRootElement(), component)
etela = 100
itala = 100
setTimer(
function etele()
etel = 100
setElementData(thePlayer, \"etel\", etela-1)
    outputChatBox(\"Evettem a ételedbö!\")
end, 300000, 0)
setTimer(
function itale()
setElementData(thePlayer, \"ital\", itala-1 )
    outputChatBox(\"Evettem a itaodbo! \")
end, 300000, 0)
     
    local screenW, screenH = guiGetScreenSize()
    function all()
             --local hps = math.ceil(getElementHealth(localPlayer))
    local ital = getElementData(thePlayer, \"ital\")
    local etel = getElementData(thePlayer, \"etel\")
    local hp = getElementHealth (localPlayer)
    local armor = getPedArmor (localPlayer)
            local money = getPlayerMoney (source)
   local time = getRealTime()
local hours = time.hour
local minutes = time.minute
setTime (hours, minutes)
       dxDrawText(money..\" FT\", screenW * 0.7297, screenH * 0.1009, screenW * 0.8609, screenH * 0.1259, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", 0 - 1, -4 - 1, 330 - 1, 28 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", 0 + 1, -4 - 1, 330 + 1, 28 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", 0 - 1, -4 + 1, 330 - 1, 28 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", 0 + 1, -4 + 1, 330 + 1, 28 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Blue Gaming System\", 0, -5, 330, 27, tocolor(43, 35, 171, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(hours..\":\"..minutes, screenW * 0.9052, screenH * 0.0231, screenW * 0.9370, screenH * 0.0491, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"right\", \"center\", false, false, false, false, false)
        dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0361, screenW * 0.9000, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, screenH * 0.0361, screenW * 0.9000, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0231, screenW * 0.1703, screenH * 0.0130, tocolor(73, 0, 0, 255), false)
        dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0361, screenW * 0.9000, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, screenH * 0.0361, screenW * 0.9000, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0231, screenW * 0.1703, screenH * 0.0130, tocolor(73, 0, 0, 255), false) -- hp alatti csík
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0231,  3.28 * hp, screenH * 0.0130, tocolor(243, 0, 0, 255), false) -- hp
        dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0417) - 1, (screenW * 0.7297) - 1, screenH * 0.0546, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, (screenH * 0.0417) - 1, (screenW * 0.7297) - 1, (screenH * 0.0417) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0546, screenW * 0.9000, screenH * 0.0546, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, screenH * 0.0546, screenW * 0.9000, (screenH * 0.0417) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0417, screenW * 0.1703, screenH * 0.0130, tocolor(15, 19, 65, 255), false)
        dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0602) - 1, (screenW * 0.7297) - 1, screenH * 0.0731, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, (screenH * 0.0602) - 1, (screenW * 0.7297) - 1, (screenH * 0.0602) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0731, screenW * 0.9000, screenH * 0.0731, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, screenH * 0.0731, screenW * 0.9000, (screenH * 0.0602) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0602, screenW * 0.1703, screenH * 0.0130, tocolor(92, 52, 23, 255), false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0417, screenW * 0.1703, screenH * 0.0130, tocolor(52, 65, 208, 255), false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0602, screenW * 0.1703, screenH * 0.0130, tocolor(188, 106, 47, 255), false)
        dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0787) - 1, (screenW * 0.7297) - 1, screenH * 0.0917, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, (screenH * 0.0787) - 1, (screenW * 0.7297) - 1, (screenH * 0.0787) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0917, screenW * 0.9000, screenH * 0.0917, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(screenW * 0.9000, screenH * 0.0917, screenW * 0.9000, (screenH * 0.0787) - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0787, screenW * 0.1703, screenH * 0.0130, tocolor(8, 47, 8, 255), false)
        dxDrawRectangle(screenW * 0.7297, screenH * 0.0787, 3.28 * armor, screenH * 0.0130, tocolor(32, 188, 32, 255), false)
        dxDrawImage(1372, 23, 29, 22, \"hpicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawImage(1373, 44, 28, 21, \"italicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawImage(1372, 65, 29, 16, \"kajaicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawImage(1372, 85, 27, 14, \"pancelicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    end
    addEventHandler(\"onClientRender\", getRootElement(), all)

Étel, ital rendszer
« Válasz #1 Dátum: 2016. augusztus 24. - 21:25:26 »
0 Show voters
gondolom klies oldali. ezért function etele(thePlayer)
vagy function etele(localPlayer)
veszem észre a line 5 nél         etela = 100
:)
« Utoljára szerkesztve: 2016. augusztus 24. - 21:29:32 írta AceHardlightHUN »

Étel, ital rendszer
« Válasz #2 Dátum: 2016. augusztus 24. - 21:32:02 »
0 Show voters
Átjavitom
E:Ugyanaz a hiba most a 8-as line-on :(
E2:
function component()
                showPlayerHudComponent(\"all\", false)
        end
        addEventHandler(\"onClientResourceStart\", getRootElement(), component)
            etela = 100
            itala = 100
            setTimer(
    function etele(localPlayer)
    setElementData(thePlayer, \"etel\", etela-1)
        outputChatBox(\"Evettem a ételedbö!\")
    end, 300000, 0)
     
    setTimer(
    function itale(localPlayer)
    setElementData(thePlayer, \"ital\", itala-1 )
        outputChatBox(\"Evettem a itaodbo! \")
    end, 300000, 0)
         
        local screenW, screenH = guiGetScreenSize()
        function all()
                 --local hps = math.ceil(getElementHealth(localPlayer))
                             local ital = getElementData(thePlayer, \"ital\")
                             local etel = getElementData(thePlayer, \"etel\")
                             local hp = getElementHealth (localPlayer)
                             local armor = getPedArmor (localPlayer)
                local money = getPlayerMoney (source)
                            local time = getRealTime()
            local hours = time.hour
            local minutes = time.minute
            setTime (hours, minutes)
           dxDrawText(money..\" FT\", screenW * 0.7297, screenH * 0.1009, screenW * 0.8609, screenH * 0.1259, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"left\", \"top\", false, false, false, false, false)
            dxDrawText(\"Blue Gaming System\", 0 - 1, -4 - 1, 330 - 1, 28 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
            dxDrawText(\"Blue Gaming System\", 0 + 1, -4 - 1, 330 + 1, 28 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
            dxDrawText(\"Blue Gaming System\", 0 - 1, -4 + 1, 330 - 1, 28 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
            dxDrawText(\"Blue Gaming System\", 0 + 1, -4 + 1, 330 + 1, 28 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
            dxDrawText(\"Blue Gaming System\", 0, -5, 330, 27, tocolor(43, 35, 171, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
            dxDrawText(hours..\":\"..minutes, screenW * 0.9052, screenH * 0.0231, screenW * 0.9370, screenH * 0.0491, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"right\", \"center\", false, false, false, false, false)
            dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0361, screenW * 0.9000, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, screenH * 0.0361, screenW * 0.9000, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0231, screenW * 0.1703, screenH * 0.0130, tocolor(73, 0, 0, 255), false)
            dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0361, screenW * 0.9000, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, screenH * 0.0361, screenW * 0.9000, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0231, screenW * 0.1703, screenH * 0.0130, tocolor(73, 0, 0, 255), false) -- hp alatti csík
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0231,  3.28 * hp, screenH * 0.0130, tocolor(243, 0, 0, 255), false) -- hp
            dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0417) - 1, (screenW * 0.7297) - 1, screenH * 0.0546, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, (screenH * 0.0417) - 1, (screenW * 0.7297) - 1, (screenH * 0.0417) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0546, screenW * 0.9000, screenH * 0.0546, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, screenH * 0.0546, screenW * 0.9000, (screenH * 0.0417) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0417, screenW * 0.1703, screenH * 0.0130, tocolor(15, 19, 65, 255), false)
            dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0602) - 1, (screenW * 0.7297) - 1, screenH * 0.0731, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, (screenH * 0.0602) - 1, (screenW * 0.7297) - 1, (screenH * 0.0602) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0731, screenW * 0.9000, screenH * 0.0731, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, screenH * 0.0731, screenW * 0.9000, (screenH * 0.0602) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0602, screenW * 0.1703, screenH * 0.0130, tocolor(92, 52, 23, 255), false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0417, screenW * 0.1703, screenH * 0.0130, tocolor(52, 65, 208, 255), false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0602, screenW * 0.1703, screenH * 0.0130, tocolor(188, 106, 47, 255), false)
            dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0787) - 1, (screenW * 0.7297) - 1, screenH * 0.0917, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, (screenH * 0.0787) - 1, (screenW * 0.7297) - 1, (screenH * 0.0787) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0917, screenW * 0.9000, screenH * 0.0917, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.9000, screenH * 0.0917, screenW * 0.9000, (screenH * 0.0787) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0787, screenW * 0.1703, screenH * 0.0130, tocolor(8, 47, 8, 255), false)
            dxDrawRectangle(screenW * 0.7297, screenH * 0.0787, 3.28 * armor, screenH * 0.0130, tocolor(32, 188, 32, 255), false)
            dxDrawImage(1372, 23, 29, 22, \"hpicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
            dxDrawImage(1373, 44, 28, 21, \"italicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
            dxDrawImage(1372, 65, 29, 16, \"kajaicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
            dxDrawImage(1372, 85, 27, 14, \"pancelicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        end
        addEventHandler(\"onClientRender\", getRootElement(), all)
             
« Utoljára szerkesztve: 2016. augusztus 24. - 21:35:41 írta thegergo02 »

Étel, ital rendszer
« Válasz #3 Dátum: 2016. augusztus 24. - 21:41:22 »
0 Show voters
Amikor megadtam a dxDrawRectangle-nek (\"ital csíknak\") az ital-t (és megszoroztam ugye hogy méretarányos legyen) akkor boolean value-t kap.  :weep:

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Étel, ital rendszer
« Válasz #4 Dátum: 2016. augusztus 24. - 22:58:00 »
0 Show voters
Telefonon eleg nehez atnezni teljesen a kodot, probald meg getElementDataval

Étel, ital rendszer
« Válasz #5 Dátum: 2016. augusztus 24. - 23:30:34 »
0 Show voters
Eddig is elementDataval dolgoztam. De akkor holnap megtudod nézni?

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Étel, ital rendszer
« Válasz #6 Dátum: 2016. augusztus 24. - 23:46:02 »
0 Show voters
Tudom h miert nem mukodik, ha holnap nem felejtem el akk megirom neked

Nem elérhető Live

  • 507
    • Profil megtekintése
Étel, ital rendszer
« Válasz #7 Dátum: 2016. augusztus 24. - 23:59:01 »
0 Show voters
Eléggé össze vissza van a kód, és a játékost sem tudja lekérni, illetve a sor elcsúszások miatt (space) jön elő sok-sok hiba (erre ajánlott a tabulátor használata)
 

local screenW, screenH = guiGetScreenSize()
addEventHandler(\"onClientResourceStart\", resourceRoot, function()
showPlayerHudComponent(\"all\", false)
etela = 100
itala = 100
setTimer(function()
setElementData(localPlayer, \"etel\", etela-1)
setElementData(localPlayer, \"ital\", itala-1)
outputChatBox(\"Evettem a ételedbö / italodból\")
end, 300000, 0)
end)
addEventHandler(\"onClientRender\", root, function()
 --local hps = math.ceil(getElementHealth(localPlayer))
local ital = getElementData(localPlayer, \"ital\")
local etel = getElementData(localPlayer, \"etel\")
local hp = getElementHealth(localPlayer)
local armor = getPedArmor(localPlayer)
local money = getPlayerMoney(localPlayer)
local time = getRealTime()
local hours = time.hour
local minutes = time.minute
setTime(hours, minutes)
dxDrawText(money..\" FT\", screenW * 0.7297, screenH * 0.1009, screenW * 0.8609, screenH * 0.1259, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"Blue Gaming System\", 0 - 1, -4 - 1, 330 - 1, 28 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"Blue Gaming System\", 0 + 1, -4 - 1, 330 + 1, 28 - 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"Blue Gaming System\", 0 - 1, -4 + 1, 330 - 1, 28 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"Blue Gaming System\", 0 + 1, -4 + 1, 330 + 1, 28 + 1, tocolor(0, 0, 0, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(\"Blue Gaming System\", 0, -5, 330, 27, tocolor(43, 35, 171, 255), 1.00, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
dxDrawText(hours..\":\"..minutes, screenW * 0.9052, screenH * 0.0231, screenW * 0.9370, screenH * 0.0491, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"right\", \"center\", false, false, false, false, false)
dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0361, screenW * 0.9000, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, screenH * 0.0361, screenW * 0.9000, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0231, screenW * 0.1703, screenH * 0.0130, tocolor(73, 0, 0, 255), false)
dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, (screenH * 0.0231) - 1, (screenW * 0.7297) - 1, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0361, screenW * 0.9000, screenH * 0.0361, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, screenH * 0.0361, screenW * 0.9000, (screenH * 0.0231) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0231, screenW * 0.1703, screenH * 0.0130, tocolor(73, 0, 0, 255), false) -- hp alatti csík
dxDrawRectangle(screenW * 0.7297, screenH * 0.0231,  3.28 * hp, screenH * 0.0130, tocolor(243, 0, 0, 255), false) -- hp
dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0417) - 1, (screenW * 0.7297) - 1, screenH * 0.0546, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, (screenH * 0.0417) - 1, (screenW * 0.7297) - 1, (screenH * 0.0417) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0546, screenW * 0.9000, screenH * 0.0546, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, screenH * 0.0546, screenW * 0.9000, (screenH * 0.0417) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0417, screenW * 0.1703, screenH * 0.0130, tocolor(15, 19, 65, 255), false)
dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0602) - 1, (screenW * 0.7297) - 1, screenH * 0.0731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, (screenH * 0.0602) - 1, (screenW * 0.7297) - 1, (screenH * 0.0602) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0731, screenW * 0.9000, screenH * 0.0731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, screenH * 0.0731, screenW * 0.9000, (screenH * 0.0602) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0602, screenW * 0.1703, screenH * 0.0130, tocolor(92, 52, 23, 255), false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0417, screenW * 0.1703, screenH * 0.0130, tocolor(52, 65, 208, 255), false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0602, screenW * 0.1703, screenH * 0.0130, tocolor(188, 106, 47, 255), false)
dxDrawLine((screenW * 0.7297) - 1, (screenH * 0.0787) - 1, (screenW * 0.7297) - 1, screenH * 0.0917, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, (screenH * 0.0787) - 1, (screenW * 0.7297) - 1, (screenH * 0.0787) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.7297) - 1, screenH * 0.0917, screenW * 0.9000, screenH * 0.0917, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.9000, screenH * 0.0917, screenW * 0.9000, (screenH * 0.0787) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0787, screenW * 0.1703, screenH * 0.0130, tocolor(8, 47, 8, 255), false)
dxDrawRectangle(screenW * 0.7297, screenH * 0.0787, 3.28 * armor, screenH * 0.0130, tocolor(32, 188, 32, 255), false)
dxDrawImage(1372, 23, 29, 22, \"hpicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(1373, 44, 28, 21, \"italicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(1372, 65, 29, 16, \"kajaicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(1372, 85, 27, 14, \"pancelicon.png\", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end)

Étel, ital rendszer
« Válasz #8 Dátum: 2016. augusztus 25. - 09:24:50 »
0 Show voters
Oké köszi, ha lesz idöm kiprobálom a kódot!
E: Mi az a tabulátor?
« Utoljára szerkesztve: 2016. augusztus 25. - 09:27:15 írta thegergo02 »

Étel, ital rendszer
« Válasz #9 Dátum: 2016. augusztus 25. - 09:33:03 »
0 Show voters
Működik a rendszer, de lehet azért mert nem volt MySQL bekötve, vagy nem tudom, de nekem nem mozdult semelyik csík, csak az élet és armor. :D

Étel, ital rendszer
« Válasz #10 Dátum: 2016. augusztus 25. - 09:34:21 »
0 Show voters
Mivel én asszem (max. ha te nem írtad bele) csak az életet csináltam meg, de lehet az armor-t is.
E: Én csak az életet és az armor-t csináltam megúgy hogy csináljon valamit :)
E2: Ha akarod megírom úgyhogy mozogjon minden, csak amikor lelép, aztán visszalép a játékos nullázodni fog. (Ezért ments le valami adatbázisba.) Ha kellene írj nekem egy PÜ-t

Dupla hozzászólás automatikusan összefûzve. ( 2016. augusztus 25. - 13:08:50 )

Az ital mindig 99 (gondolom az étel is) hiába irtam át re3nderbe a timer-t mindig 99. (Kiiratam outputChatboxba, persze a kiiratást renderbe tettem. és most 1000 ms-enként (1 mp) vettem le tesztként, de csak 99 (vagyis 1-et vesz el) marad)
« Utoljára szerkesztve: 2016. augusztus 25. - 13:08:50 írta thegergo02 »

Étel, ital rendszer
« Válasz #11 Dátum: 2016. augusztus 29. - 16:14:29 »
0 Show voters
Szia! Szerintem az a megoldás, hogy valahogyan a timert ismételteted.

Nem elérhető id100

  • 903
    • Profil megtekintése
Étel, ital rendszer
« Válasz #12 Dátum: 2016. augusztus 29. - 16:48:01 »
0 Show voters
A timer automatikusan ismétlődik. Ha 0-t írsz az ismétlések számához akkor végtelen ideig.
( setTimer(funkció, 1000, 0) ) így fog kinézni ha végtelen ideig akarod mp-nként csináltatni.

Étel, ital rendszer
« Válasz #13 Dátum: 2016. augusztus 29. - 17:26:27 »
0 Show voters
De eddig is 0 volt ott.

Étel, ital rendszer
« Válasz #14 Dátum: 2016. augusztus 30. - 10:22:09 »
0 Show voters
Akkor nem tudom mi lehet a hiba.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal