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

Wysłany: 2018-09-16, 14:32


Query

SyndicateMTA






Wiek: 24
Na forum: 3072 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

Mam ma?y problem gdy? jak si? najadam to HP mi spada i dedam
local sx,sy guiGetScreenSize()
local baseX 1920
local zoom 1.0
local minZoom if sx baseX then 
    zoom math.min(minZoombaseX/sx)
end

local glod nil
local f dxCreateFont("f.ttf"14)
local f2 dxCreateFont("f.ttf"15)

local background dxCreateTexture("i/hud_background.png""argb"true"clamp")

local background_xbackground_ybackground_wbackground_h 1552/zoom10/zoom358/zoom118/zoom
local rectangle1_xrectangle1_yrectangle1_wrectangle1_h 1857/zoom20/zoom8/zoom83/zoom
local rectangle2_xrectangle2_yrectangle2_wrectangle2_h 1875/zoom20/zoom8/zoom83/zoom
local rectangle3_xrectangle3_yrectangle3_wrectangle3_h 1893/zoom20/zoom8/zoom83/zoom
local money_xmoney_ymoney_wmoney_h 1641/zoom53/zoom1748/zoom76/zoom
local rp_xrp_yrp_wrp_h 1552/zoom91/zoom1628/zoom118/zoom
local nick_xnick_ynick_wnick_h 1641/zoom20/zoom1748/zoom43/zoom
local data_xdata_ydata_wdata_h 1759/zoom21/zoom1834/zoom43/zoom
local time_xtime_ytime_wtime_h 1759/zoom54/zoom1834/zoom76/zoom

-- # system glodu # --

local glod nil

function glodny()
    local glod getElementDatalocalPlayer"najedzenie" )
    if glod then
          if glod == 0 then return end
            setElementDatalocalPlayer"najedzenie" )
    end
end
setTimer(glodny,"5000",0)

-- # hud # --

addEventHandler("onClientRender",getRootElement(),function()
    local money getElementData(localPlayer"pieniadze")
    local full 1
       local hp getElementHealth(localPlayer)
       local armour getPlayerArmor(localPlayer)
    local rp getElementData(localPlayer"punkty") or 0
    local time getRealTime()
    local hours time.hour
    local minutes time.minute
    local day time.monthday
    local months time.month 1
    local year time.year 1900
    local nick getPlayerName(localPlayer)
    local stan_glodu getElementData(localPlayer"najedzenie")
    dxDrawImage(background_xbackground_ybackground_wbackground_hbackground000tocolor(255255255255), false)
    dxDrawRectangle(rectangle1_xrectangle1_yrectangle1_w83/zoom*hp/100tocolor(2036161255), false)
    dxDrawRectangle(rectangle2_xrectangle2_yrectangle2_w83/zoom*armour/100tocolor(4134255255), false)
    dxDrawRectangle(rectangle3_xrectangle3_yrectangle3_w83/zoom*stan_glodu/100tocolor(25515660255), false)
    dxDrawText("#096809$#cccccc"..money..""money_xmoney_ymoney_wmoney_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(""..rp.." rp"rp_xrp_yrp_wrp_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(nicknick_xnick_ynick_wnick_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(""..hours..":"..minutestime_xtime_ytime_wtime_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(""..day.."."..months.."."..year..""data_xdata_ydata_wdata_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
end)

local ukryj = {
"ammo",
"armour",
"clock",
"health",
"money",
"weapon",
"wanted",
"clock"
}



addEventHandler("onClientResourceStop"resourceRoot, function()
    if(isElement(hud_background)) then
    destroyElement(hud_background)
    end
end)


[ Dodano: 2018-09-16, 14:37 ]
a jak si? najadam to g?od stoi w miejscu..

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-16, 16:12


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Sprobuj:


local sx,sy guiGetScreenSize()
local baseX 1920
local zoom 1.0
local minZoom if sx baseX then 
    zoom math.min(minZoombaseX/sx)
end

local glod nil
local f dxCreateFont("f.ttf"14)
local f2 dxCreateFont("f.ttf"15)

local background dxCreateTexture("i/hud_background.png""argb"true"clamp")

local background_xbackground_ybackground_wbackground_h 1552/zoom10/zoom358/zoom118/zoom
local rectangle1_xrectangle1_yrectangle1_wrectangle1_h 1857/zoom20/zoom8/zoom83/zoom
local rectangle2_xrectangle2_yrectangle2_wrectangle2_h 1875/zoom20/zoom8/zoom83/zoom
local rectangle3_xrectangle3_yrectangle3_wrectangle3_h 1893/zoom20/zoom8/zoom83/zoom
local money_xmoney_ymoney_wmoney_h 1641/zoom53/zoom1748/zoom76/zoom
local rp_xrp_yrp_wrp_h 1552/zoom91/zoom1628/zoom118/zoom
local nick_xnick_ynick_wnick_h 1641/zoom20/zoom1748/zoom43/zoom
local data_xdata_ydata_wdata_h 1759/zoom21/zoom1834/zoom43/zoom
local time_xtime_ytime_wtime_h 1759/zoom54/zoom1834/zoom76/zoom

-- # system glodu # --

local glod nil

function glodny()
    local glod getElementDatalocalPlayer"najedzenie" ) or 0
    if glod then
          if glod == 0 then return end
            setElementDatalocalPlayer"najedzenie"glod )
    end
end
setTimer(glodny,5000,0)

-- # hud # --

addEventHandler("onClientRender",getRootElement(),function()
    local money getElementData(localPlayer"pieniadze")
    local full 1
       local hp getElementHealth(localPlayer)
       local armour getPlayerArmor(localPlayer)
    local rp getElementData(localPlayer"punkty") or 0
    local time getRealTime()
    local hours time.hour
    local minutes time.minute
    local day time.monthday
    local months time.month 1
    local year time.year 1900
    local nick getPlayerName(localPlayer)
    local stan_glodu getElementData(localPlayer"najedzenie")
    dxDrawImage(background_xbackground_ybackground_wbackground_hbackground000tocolor(255255255255), false)
    dxDrawRectangle(rectangle1_xrectangle1_yrectangle1_w83/zoom*hp/100tocolor(2036161255), false)
    dxDrawRectangle(rectangle2_xrectangle2_yrectangle2_w83/zoom*armour/100tocolor(4134255255), false)
    dxDrawRectangle(rectangle3_xrectangle3_yrectangle3_w83/zoom*stan_glodu/100tocolor(25515660255), false)
    dxDrawText("#096809$#cccccc"..money..""money_xmoney_ymoney_wmoney_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(""..rp.." rp"rp_xrp_yrp_wrp_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(nicknick_xnick_ynick_wnick_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(""..hours..":"..minutestime_xtime_ytime_wtime_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
    dxDrawText(""..day.."."..months.."."..year..""data_xdata_ydata_wdata_htocolor(255255255255), 1f2"center""center",false,false,false,true,true)
end)

local ukryj = {
"ammo",
"armour",
"clock",
"health",
"money",
"weapon",
"wanted",
"clock"
}



addEventHandler("onClientResourceStop"resourceRoot, function()
    if(isElement(hud_background)) then
    destroyElement(hud_background)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-16, 16:37


Query

SyndicateMTA






Wiek: 24
Na forum: 3072 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

nadal to samo

[ Dodano: 2018-09-16, 16:40 ]
w dodatku jest ogromny spadek fps ..

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-16, 17:19


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Wy?lij kod, kt?ry zabija gracza. Tutaj go nie ma.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-24, 10:50


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

Mam ma?y problem gdy? jak si? najadam to HP mi spada i dedam
Coo?
a jak si? najadam to g?od stoi w miejscu..
Zdecyduj si?...
Jak mamy ci pom?c jak nie mo?esz dok?adnie opisa? swojego problemu?
Tzn ?e jak si? najadasz, to g??d stoi w miejscu czy ci hp spada i dedasz? XD
Opisz dok?adniej sw?j problem.

Podpis

Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021

Postaw piwo autorowi tego posta
 

 
Tagi: głód
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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