Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-11-14, 15:56


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4134 dni
Posty: 445
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1033

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%
Witam. Chcia?em zrobi? tak? "desk? rozdzielcz?" dla pojazd?w i zrobi? tak, ?e je?li jest ma?o paliwa, kontrolka (obrazek) mruga. Jak mog? u?y? timera aby mruga?? Daj? :piwo:

Podpis



GTAO Member: 2015-08-23, 14:26

Ostatnio zmieniony przez jg2aviva1 2015-11-14, 17:09, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-14, 16:18


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

Mo?esz dasz tu kod to kto? ci pomo?e?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-14, 16:28


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4134 dni
Posty: 445
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1033

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%
Nie dam kodu bo go nie mam? :x . Chc? si? dowiedzie? w?a?nie JAK GO ZROBI?.. Jak mam u?y? timera aby wygl?da?o tak, jakby obrazek mruga?..

Podpis



GTAO Member: 2015-08-23, 14:26

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-14, 16:47


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

Kumpel masz specjaln? funkcje na znikanie i pojawianie. Wystarczy szuka?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-14, 17:10


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4134 dni
Posty: 445
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1033

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%
Dobra, olewam to. Edytowa?em nazw? bo mam inny problem. Chc? zrobi? w?a?nie te kontrolki ale jak wejd? do auta kt?re spe?nia conajmniej jedn? z tych rzeczy, to ?adnego obrazka nie wida?. Za to dam :piwo:

local screenWscreenH guiGetScreenSize()

addEventHandler("onClientRender",root,function()
    if getPedOccupiedVehicle(localPlayerthen
        if getVehicleController(getPedOccupiedVehicle(localPlayer))==localPlayer then
            local paliwo=getElementData(getPedOccupiedVehicle(localPlayer),"pojazd_paliwo") or "Brak"
            local przebieg=getElementData(getPedOccupiedVehicle(localPlayer),"pojazd_przebieg") or "Brak"
            local id=getElementData(getPedOccupiedVehicle(localPlayer),"car_id") or "Brak"
            speedxspeedyspeedz getElementVelocity (getPedOccupiedVehicle(localPlayer))
            actualspeed = (speedx^speedy^speedz^2)^(0.5) 
            kmh actualspeed 180
                        dxDrawRectangle(screenW 0.7625screenH 0.6433screenW 0.2138screenH 0.3300tocolor(000207), false)
                        dxDrawText(getVehicleName(getPedOccupiedVehicle(localPlayer)), screenW 0.7688screenH 0.6433screenW 0.8588screenH 0.6683tocolor(1952070207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText(getElementData(getPedOccupiedVehicle(localPlayer),"car_id") or "Publiczny"screenW 0.9213screenH 0.6450screenW 0.9812screenH 0.6683tocolor(1952070207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText("Pr?dko??:"screenW 0.7800screenH 0.6783screenW 0.8462screenH 0.7017tocolor(52080207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText("Przebieg:"screenW 0.7800screenH 0.7100screenW 0.8488screenH 0.7317tocolor(52080207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText("Paliwo:"screenW 0.7800screenH 0.7417screenW 0.8512screenH 0.7650tocolor(52080207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText(math.floor(paliwo).."L"screenW 0.8413screenH 0.7417screenW 0.8700screenH 0.7683tocolor(20800207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText(math.floor(przebieg).." km"screenW 0.8562screenH 0.7100screenW 0.8875screenH 0.7317tocolor(20800207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText(math.floor(kmh).."km/h"screenW 0.8588screenH 0.6783screenW 0.8875screenH 0.7000tocolor(20800207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText("W?a?ciciel:"screenW 0.7800screenH 0.7750screenW 0.8462screenH 0.7983tocolor(52080207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        dxDrawText(getElementData (getPedOccupiedVehicle (localPlayer), "car_owner") or "Publiczny"screenW 0.8588screenH 0.7733screenW 0.9075screenH 0.7983tocolor(20800207), 1.00"default-bold""left""top"falsefalsefalsefalsefalse)
                        sprawdzanie setTimer (check_all60*10000)
        end
    end
end)

function check_all ()
         local pojazd getPedOccupiedVehicle (localPlayer)
         if not pojazd then return end
         if getElementHealth(pojazd) <= 600 then
            obraz_silnik guiCreateStaticImage(0.900.860.050.04":OL-Paliwo/silnik.png"true)    
         else return end
         if getVehicleLightsState(pojazd) == true then
            obraz_swiatla guiCreateStaticImage(0.770.920.050.04":OL-Paliwo/swiatla.png"true)
         else return end
         if getVehicleDoorOpenRatio(pojazd0) >= 0.1 or getVehicleDoorOpenRatio(pojazd1) >= 0.1 or getVehicleDoorOpenRatio(pojazd2) >= 0.1 or getVehicleDoorOpenRatio(pojazd3) >= 0.1 or getVehicleDoorOpenRatio(pojazd4) >= 0.1 or getVehicleDoorOpenRatio(pojazd5) >= 0.1 then
            obraz_drzwi guiCreateStaticImage(0.840.920.040.04":OL-Paliwo/drzwi.png"true)
         else return end
         if getVehicleEngineState(pojazd) == false then
            obraz_akumulator guiCreateStaticImage(0.910.920.050.04":OL-Paliwo/akumulator.png"true)
         else return end
         if getElementData(pojazd"pojazd_paliwo") <= 15 then
            obraz_paliwo guiCreateStaticImage(0.770.860.050.04":OL-Paliwo/paliwo.png"true)
         else return end
         if getElementFrozen (pojazd) == true then
            obraz_reczny guiCreateStaticImage(0.840.860.040.04":OL-Paliwo/reczny.png"true)
         else return end
end

function usun_timer ()
         killTimer (sprawdzanie)
end
addEventHandler ("onClientVehicleExit"getRootElement (), usun_timer)


Podpis



GTAO Member: 2015-08-23, 14:26

Postaw piwo autorowi tego posta
 

 
Tagi: obrazki
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Obrazki Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku