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

Wysłany: 2017-06-24, 19:52


admiral123







Wiek: 29
Na forum: 3276 dni
Posty: 16

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
Witam mam problem z dxDrawText. Po wej?ciu do auta, kt?re ma w sobie po stronie servera w pracy: setElementData(source, "pojazd") nie pokazuje si? nic. Jak to naprawi? za pomoc piwko!



kod:

local screenWscreenH guiGetScreenSize()    
if getElementData(localPlayer"pojazd"then
        exports["nm-blur"]:dxDrawBluredRectangle(screenW 0.7438screenH 0.1289screenW 0.2379screenH 0.0599tocolor(150150150255))
        dxDrawRectangle(screenW 0.7387screenH 0.1289screenW 0.0051screenH 0.0599tocolor(2575125155), false)
        local poziom getElementData(localPlayer"mlvl")
        local exp getElementData(localPlayer"mexp")
        dxDrawText("Tw?j poziom: "..poziom, (screenW 0.7511) + 1, (screenH 0.1289) + 1, (screenW 0.8631) + 1, (screenH 0.1888) + 1tocolor(000255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tw?j poziom: "..poziomscreenW 0.7511screenH 0.1289screenW 0.8631screenH 0.1888tocolor(255255255255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tw?j exp: "..exp, (screenW 0.8697) + 1, (screenH 0.1289) + 1, (screenW 0.9817) + 1, (screenH 0.1888) + 1tocolor(000255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tw?j exp: "..expscreenW 0.8697screenH 0.1289screenW 0.9817screenH 0.1888tocolor(255255255255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
    end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-24, 19:54


Makay

Tryb .lua






Wiek: 26
Na forum: 3288 dni
Posty: 38
Nick w MP: Makay

Piwa: 774

Respekt: 40,5

Ostrzeżeń: 100%
admiral123, To jest chyba tylko do pracy magazyniera.

Podpis
Początkowy Programista LUA

[lua]if getElementData(source, "gracz:Makay") then
setPlayerName(source, "Makauś")
else
setPlayerName(source, ".lua")
end[/lua]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-24, 20:02


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

na pewno localPlayer?

getElementData(localPlayer"pojazd")


Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-24, 21:10


admiral123







Wiek: 29
Na forum: 3276 dni
Posty: 16

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
amited, Tak, to jest po stronie klienta w gui.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-24, 22:00


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

admiral123, m?wisz ?e pojazd ma elementDat? "pojazd" a nie gracz, chyba ?e ?le zrozumia?em

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 10:35


NeX.

Calm Story






Wiek: 26
Na forum: 3643 dni
Posty: 56
Nick w MP: NeX

Piwa: 36

Respekt: 140
Respekt: 140

Skoro jest to po stronie clienta w 'gui', to gui pojawia si? w tym przypadku tylko na jedn? setn? sekundy i nagle znika.


local screenWscreenH guiGetScreenSize()
function render()
if getElementData(localPlayer"pojazd"then
        exports["nm-blur"]:dxDrawBluredRectangle(screenW 0.7438screenH 0.1289screenW 0.2379screenH 0.0599tocolor(150150150255))
        dxDrawRectangle(screenW 0.7387screenH 0.1289screenW 0.0051screenH 0.0599tocolor(2575125155), false)
        local poziom getElementData(localPlayer"mlvl")
        local exp getElementData(localPlayer"mexp")
        dxDrawText("Tw?j poziom: "..poziom, (screenW 0.7511) + 1, (screenH 0.1289) + 1, (screenW 0.8631) + 1, (screenH 0.1888) + 1tocolor(000255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tw?j poziom: "..poziomscreenW 0.7511screenH 0.1289screenW 0.8631screenH 0.1888tocolor(255255255255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tw?j exp: "..exp, (screenW 0.8697) + 1, (screenH 0.1289) + 1, (screenW 0.9817) + 1, (screenH 0.1888) + 1tocolor(000255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tw?j exp: "..expscreenW 0.8697screenH 0.1289screenW 0.9817screenH 0.1888tocolor(255255255255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
    end
end
addEventHandler("onClientRender",getRootElement(),render)


Podpis
Wykonuję zasoby programistyczne w języku lua. Osoby zainteresowane proszone są o kontakt.
[email protected]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-25, 22:20


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Koledze chodzi?o o to, ?e w pierwszym po?cie napisa?e?, ?e t? date posiada pojazd, a nie bezpo?rednio grasz. Wi?c wnioskuj?c po tym:
function render()
    if isPedInVehicle(localPlayerthen
        if getElementData(getPedOccupiedVehicle(localPlayer), "pojazd"then
            exports["nm-blur"]:dxDrawBluredRectangle(screenW 0.7438screenH 0.1289screenW 0.2379screenH 0.0599tocolor(150150150255))
            dxDrawRectangle(screenW 0.7387screenH 0.1289screenW 0.0051screenH 0.0599tocolor(2575125155), false)
            local poziom getElementData(localPlayer"mlvl")
            local exp getElementData(localPlayer"mexp")
            dxDrawText("Tw?j poziom: "..poziom, (screenW 0.7511) + 1, (screenH 0.1289) + 1, (screenW 0.8631) + 1, (screenH 0.1888) + 1tocolor(000255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
            dxDrawText("Tw?j poziom: "..poziomscreenW 0.7511screenH 0.1289screenW 0.8631screenH 0.1888tocolor(255255255255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
            dxDrawText("Tw?j exp: "..exp, (screenW 0.8697) + 1, (screenH 0.1289) + 1, (screenW 0.9817) + 1, (screenH 0.1888) + 1tocolor(000255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
            dxDrawText("Tw?j exp: "..expscreenW 0.8697screenH 0.1289screenW 0.9817screenH 0.1888tocolor(255255255255), 1.00wFont2"left""center"falsefalsefalsefalsefalse)
        end
    end
end
addEventHandler("onClientRender",getRootElement(),render)


Postaw piwo autorowi tego posta
 

 
Tagi: dxdrawtext
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » dxDrawText 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