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, 12:55


Gerano

Mleko,Kakao,LUA






Wiek: 38
Na forum: 4266 dni
Posty: 187
Nick w MP: Gerano

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
Witam mam ot?? problem poniewa? robi? hud do nowego swojego projektu RPG i mam taki problem mam wszystko opr?cz reputacji.Mam napisany kod ale nie pokazuje reputacji.
--[[

  AutorGerano
  Wersja2.0 Finish
  Zakaz kopiowania bez pozwolenia autora skryptu
  
--]]
showPlayerHudComponent "all"false )
showPlayerHudComponent "radar"true)
showPlayerHudComponent "wanted"true)

--- Kod na realny czas
local realtime getRealTime()
    local hour realtime.hour
    local minute realtime.minute
    
local pgpval getElementData(localPlayer,"player:reputation")



local screenWscreenH guiGetScreenSize()

addEventHandler("onClientRender"root,
    function()
        dxDrawRectangle(screenW 0.7324screenH 0.0000screenW 0.2676screenH 0.2409tocolor(515151227), false)
        dxDrawRectangle(screenW 0.7275screenH 0.0000screenW 0.0049screenH 0.2409tocolor(10103218227), false)
        dxDrawRectangle(screenW 0.7275screenH 0.2409screenW 0.2725screenH 0.0052tocolor(10103218227), false)
        dxDrawRectangle(screenW 0.8838screenH 0.0508screenW 0.0996screenH 0.0156tocolor(22700227), false)
        dxDrawText("?ycie:"..math.floor(getElementHealth(localPlayer)).. "%"screenW 0.8838screenH 0.0508screenW 0.9834screenH 0.0664tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawRectangle(screenW 0.8838screenH 0.0820screenW 0.0996screenH 0.0156tocolor(111212251), false)
        dxDrawRectangle(screenW 0.8838screenH 0.1107screenW 0.0996screenH 0.0156tocolor(13160229227), false)
        dxDrawText("Pancerz:"..math.floor(getPedArmor(localPlayer)).. "%"screenW 0.8838screenH 0.0794screenW 0.9834screenH 0.0951tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tlen:"..math.floor(getPedOxygenLevel(localPlayer) / 10).. "%"screenW 0.8838screenH 0.1107screenW 0.9834screenH 0.1263tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawText("Pieni?dze:"..getPlayerMoney(localPlayer).."PLN"screenW 0.7324screenH 0.1979screenW 1.0000screenH 0.2331tocolor(471728251), 1.50"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawText("PG:   %01d",getElementData(localPlayer,"player:reputation"), screenW 0.8828screenH 0.1354screenW 0.9932screenH 0.1771tocolor(471728251), 1.50"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawImage(screenW 0.7422screenH 0.0117screenW 0.1309screenH 0.1523"i/ikona.png"000tocolor(255255255255), false)
    end
)
    



Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-14, 14:06


AteX







Wiek: 26
Na forum: 4016 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

dxDrawText("PG:   %01d",getElementData(localPlayer,"player:reputation"), screenW 0.8828screenH 0.1354screenW 0.9932screenH 0.1771tocolor(471728251), 1.50"sans""left""center"falsefalsefalsefalsefalse)

Przed getElementData jest przecinek ;)

Postaw piwo autorowi tego posta
 

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


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

--[[

  AutorGerano
  Wersja2.0 Finish
  Zakaz kopiowania bez pozwolenia autora skryptu
  
--]]
showPlayerHudComponent "all"false )
showPlayerHudComponent "radar"true)
showPlayerHudComponent "wanted"true)

--- Kod na realny czas
local realtime getRealTime()
    local hour realtime.hour
    local minute realtime.minute
    
local pgpval getElementData(localPlayer,"player:reputation")



local screenWscreenH guiGetScreenSize()

addEventHandler("onClientRender"root,
    function()
        dxDrawRectangle(screenW 0.7324screenH 0.0000screenW 0.2676screenH 0.2409tocolor(515151227), false)
        dxDrawRectangle(screenW 0.7275screenH 0.0000screenW 0.0049screenH 0.2409tocolor(10103218227), false)
        dxDrawRectangle(screenW 0.7275screenH 0.2409screenW 0.2725screenH 0.0052tocolor(10103218227), false)
        dxDrawRectangle(screenW 0.8838screenH 0.0508screenW 0.0996screenH 0.0156tocolor(22700227), false)
        dxDrawText("?ycie:"..math.floor(getElementHealth(localPlayer)).. "%"screenW 0.8838screenH 0.0508screenW 0.9834screenH 0.0664tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawRectangle(screenW 0.8838screenH 0.0820screenW 0.0996screenH 0.0156tocolor(111212251), false)
        dxDrawRectangle(screenW 0.8838screenH 0.1107screenW 0.0996screenH 0.0156tocolor(13160229227), false)
        dxDrawText("Pancerz:"..math.floor(getPedArmor(localPlayer)).. "%"screenW 0.8838screenH 0.0794screenW 0.9834screenH 0.0951tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawTextTLEN:"..math.floor(getPedOxygenLevel(localPlayer) / 10).. "%", screenW * 0.8838, screenH * 0.1107, screenW * 0.9834, screenH * 0.1263, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "center", false, false, false, false, false)
        dxDrawText("Pieni?dze:"..getPlayerMoney(localPlayer).."PLN", screenW * 0.7324, screenH * 0.1979, screenW * 1.0000, screenH * 0.2331, tocolor(47, 172, 8, 251), 1.50, "sans", "left", "center", false, false, false, false, false)
        dxDrawText("PG:   %01d",pgpval, screenW * 0.8828, screenH * 0.1354, screenW * 0.9932, screenH * 0.1771, tocolor(47, 172, 8, 251), 1.50, "sans", "left", "center", false, false, false, false, false)
        dxDrawImage(screenW * 0.7422, screenH * 0.0117, screenW * 0.1309, screenH * 0.1523, "i/ikona.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    end
)
    


Tak powinno by? dobrze.

Postaw piwo autorowi tego posta
 

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


Gerano

Mleko,Kakao,LUA






Wiek: 38
Na forum: 4266 dni
Posty: 187
Nick w MP: Gerano

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
Nadal nic

Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

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


monio







Wiek: 30
Na forum: 4887 dni
Posty: 319
Nick w MP: Monio99

Piwa: 3565

Respekt: 120,5
Respekt: 120,5


--[[

  AutorGerano
  Wersja2.0 Finish
  Zakaz kopiowania bez pozwolenia autora skryptu
  
--]]
showPlayerHudComponent "all"false )
showPlayerHudComponent "radar"true)
showPlayerHudComponent "wanted"true)

--- Kod na realny czas
local realtime getRealTime()
    local hour realtime.hour
    local minute realtime.minute
    
local pgpval getElementData(localPlayer,"player:reputation")



local screenWscreenH guiGetScreenSize()

addEventHandler("onClientRender"root,
    function()
        dxDrawRectangle(screenW 0.7324screenH 0.0000screenW 0.2676screenH 0.2409tocolor(515151227), false)
        dxDrawRectangle(screenW 0.7275screenH 0.0000screenW 0.0049screenH 0.2409tocolor(10103218227), false)
        dxDrawRectangle(screenW 0.7275screenH 0.2409screenW 0.2725screenH 0.0052tocolor(10103218227), false)
        dxDrawRectangle(screenW 0.8838screenH 0.0508screenW 0.0996screenH 0.0156tocolor(22700227), false)
        dxDrawText("?ycie:"..math.floor(getElementHealth(localPlayer)).. "%"screenW 0.8838screenH 0.0508screenW 0.9834screenH 0.0664tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawRectangle(screenW 0.8838screenH 0.0820screenW 0.0996screenH 0.0156tocolor(111212251), false)
        dxDrawRectangle(screenW 0.8838screenH 0.1107screenW 0.0996screenH 0.0156tocolor(13160229227), false)
        dxDrawText("Pancerz:"..math.floor(getPedArmor(localPlayer)).. "%"screenW 0.8838screenH 0.0794screenW 0.9834screenH 0.0951tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawText("Tlen:"..math.floor(getPedOxygenLevel(localPlayer) / 10).. "%"screenW 0.8838screenH 0.1107screenW 0.9834screenH 0.1263tocolor(255255255255), 1.00"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawText("Pieni?dze:"..getPlayerMoney(localPlayer).."PLN"screenW 0.7324screenH 0.1979screenW 1.0000screenH 0.2331tocolor(471728251), 1.50"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawText("PG:  "..pgpval ,screenW 0.8828screenH 0.1354screenW 0.9932screenH 0.1771tocolor(471728251), 1.50"sans""left""center"falsefalsefalsefalsefalse)
        dxDrawImage(screenW 0.7422screenH 0.0117screenW 0.1309screenH 0.1523"i/ikona.png"000tocolor(255255255255), false)
    end
)


Ludzie co wy podajecie?...
Do czego ma Ci zwr?ci? "pgpval"?

dxDrawText("PG:  ",pgpval ,screenW 0.8828screenH 0.1354screenW 0.9932screenH 0.1771tocolor(471728251), 1.50"sans""left""center"falsefalsefalsefalsefalse)



dxDrawText("PG:  "..pgpval ,screenW 0.8828screenH 0.1354screenW 0.9932screenH 0.1771tocolor(471728251), 1.50"sans""left""center"falsefalsefalsefalsefalse)


Teraz powinno dzia?a? ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-15, 15:49


Gerano

Mleko,Kakao,LUA






Wiek: 38
Na forum: 4266 dni
Posty: 187
Nick w MP: Gerano

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
nadal nic

[ Dodano: 2015-11-15, 15:58 ]
chcia?em u?y? tej funkcji
local ogpval getElementData(localPlayer,"player:reputation")
string2=string.format("R:   %01d",getElementData(localPlayer,"player:reputation"))

i jak da?em zamiast PG normalnie string2 to nic znika wtedy PG i tyle

[ Dodano: 2015-11-15, 16:10 ]
Pomo?e kto??

Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Tagi: reputacja
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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