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

Wysłany: 2018-07-07, 17:20


Songo23







Wiek: 23
Na forum: 3188 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

Hejka!
M?j problem polega na tym, ?e ogarn?aem sobie skrypt na Panel F1, ale gdy wejd? na serwer i spr?buj? go odpali? to zak?adka ze statystykami nie dzia?a, a natomiast gdy zrestartuje skrypt to ona dzia?a, a jak zrobie reconnect to ju? nie.
No i te? mam problem z tym, ?e statystyki sie nie aktualizuj? na bie??co, dopiero gdy zrestartuje skrypt lub zrobi? reconnecta, to wtedy sie aktualizuj?.

Podpis
Aktualny projekt:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-07, 17:25


Qwertick

Coming soon...






Wiek: 23
Na forum: 3718 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2727

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Daj kod i powiedz czy s? b??dy w db3 i najlepiej zrobi? ten panel w dxDrawach aby si? to aktualizowa?o na bie??co

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-07, 17:40


Songo23







Wiek: 23
Na forum: 3188 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

B??d?w w og?le nie ma.


local punktybusy = getElementData(localPlayer,"player:punktybusy") or "0"
local punktysv = getElementData(localPlayer,"player:punktysv") or "0"
local prawkoa = getElementData(localPlayer,"player:license:pjA")
local prawkob = getElementData(localPlayer,"player:license:pjB")
local prawkoc = getElementData(localPlayer,"player:license:pjC")
local uid = getElementData(localPlayer,"player:uid")
local idgracz = getElementData(localPlayer,"id")
local frakcja = getElementData(localPlayer,"player:duty") or "Nie jeste? w ?adnej frakcji"
local premka= getElementData(localPlayer,"player:premiumdate") or "Nie posiadasz konta premium"
--local hours = getElementData(localPlayer,"player:hours") or ""
local rejestracja= getElementData(localPlayer,"player:registerdate") or "test"
local minuty = getElementData(localPlayer,"player:workinjob") or "0"
local czas = getElementData(localPlayer, "player:hours") or "0"

local sx,sy = guiGetScreenSize()
local screenW,screenH = guiGetScreenSize()

mojeW,mojeH = 1920, 1080
sW,sH = guiGetScreenSize()
w, h = (sW/mojeW), (sH/mojeH)

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
    if not isCursorShowing() then return end
    local cx,cy=getCursorPosition()
    cx,cy=cx*sx,cy*sy
    if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
        return true,cx,cy
    else
        return false
    end
end

function mth(minutes)
    local h = math.floor(minutes/60)
    local m = minutes - (h*60)
    return {h,m}
end

local text = ""
local text2 = ""
local showed = false

local info = [[
Wybierz kt?r?? z kategorii
]]

local przewodnik = [[ Przewodnik
Co? tutaj kiedy?
napisz? sobie tak no tak zrobi?.

]]

local premium = [[ Ranga premium ma przywileje takie jak:

- Skiny tylko dla premium;
- Co godzine otrzymuje 1mln;
- Zarobki powi?kszone o po?ow?;
- Czat tylko dla premium;
- Ikonke premium nad g?ow?;
- Z?ote id na czacie;
- Dost?p do og?osze?.
Premium mo?na zakupi? u?ywaj?c komendy /premium.
]]

local tick = getTickCount()

local czas_wysuwania = 1000

function gui()
    local y1,y2 = interpolateBetween(-450, -450, 0, screenW * 0, 23*w, 0, (getTickCount()-tick)/czas_wysuwania, "OutBack")
    local y3,y4 = interpolateBetween(-450, -450, 0, screenW * 0, 569*w, 0, (getTickCount()-tick)/czas_wysuwania, "OutBack")
    local y5,y6 = interpolateBetween(-450, -450, 0, screenW * 0, 660*w, 0, (getTickCount()-tick)/czas_wysuwania, "OutBack")
    dxDrawRectangle(0*w, 0*h, 1920*w, 1080*h, tocolor(47, 47, 47, 150), false)
    dxDrawImage(y4, 297*h, 777*w, 481*h, ":PanelLogowanie/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    dxDrawImage(y6, -17*h, 596*w, 325*h, ":pr-logowanie/img/logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    --exports["pr-text"]:createCustomButton("Informacje", screenW * 0.3125, y2, screenW * 0.0896, screenH * 0.0519, tocolor(255, 255, 255, 255), false, true)
    --exports["pr-text"]:createCustomButton("Przewodnik", screenW * 0.4073, y2, screenW * 0.0896, screenH * 0.0519, tocolor(255, 255, 255, 255), false, true)
    --exports["pr-text"]:createCustomButton("Premium", screenW * 0.5021, y2, screenW * 0.0896, screenH * 0.0519, tocolor(255, 255, 255, 255), false, true)
    --exports["pr-text"]:createCustomButton("aktualizacje", screenW * 0.5969, y2, screenW * 0.0896, screenH * 0.0519, tocolor(255, 255, 255, 255), false, true)
    exports["pr-text"]:createCustomText(text, 647, 393, 1289, 679, tocolor(255, 255, 255, 255), 2, "default", "center", "center", false, true, false, false, false)
    exports["pr-text"]:createCustomText(text, 647, 393, 1289, 679, tocolor(255, 255, 255, 255), 2, "default", "center", "center", false, true, false, false, false)
    if isMouseIn(y2, 138*h, 239*w, 209*h) then -- urzad
        dxDrawImage(y2, 138*h, 239*w, 209*h, "1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    else
        dxDrawImage(y2, 138*h, 239*w, 209*h, "1.png", 0, 0, 0, tocolor(255, 255, 255, 180), false)
    end
    if isMouseIn(y2, 415*h, 239*w, 209*h) then -- urzad
        dxDrawImage(y2, 415*h, 239*w, 209*h, "2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    else
        dxDrawImage(y2, 415*h, 239*w, 209*h, "2.png", 0, 0, 0, tocolor(255, 255, 255, 180), false)
    end
    if isMouseIn(y2, 687*h, 239*w, 209*h) then -- urzad
        dxDrawImage(y2, 687*h, 239*w, 209*h, "3.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
    else
        dxDrawImage(y2, 687*h, 239*w, 209*h, "3.png", 0, 0, 0, tocolor(255, 255, 255, 180), false)
    end
end

bindKey("F1", "down", function()
    tick = getTickCount()
    if not getElementData(localPlayer, "player:logged") then return end
    if showed == true then
        showed = false
        showChat(true)
        setPlayerHudComponentVisible("radar",true)
        text = ""
        removeEventHandler("onClientRender", root, gui)
        showCursor(false)
    else
        --tick = getTickCount()
        Sx = getTickCount()
        showed = true
        showChat(false)
        setPlayerHudComponentVisible("radar",false)
        showCursor(true)
        text = info
        addEventHandler("onClientRender", root, gui)
    end
end)

addEventHandler("onClientClick", root, function(b, s)
    local y1,y2,y3 = interpolateBetween(-250, -250, -600, screenH * 0.2620, screenH * 0.285, screenH * 0.3444, (getTickCount()-tick)/czas_wysuwania, "OutBack")
    if b ~= "state" and s ~= "down" then return end
    if showed ~= true then return end
    if isMouseIn(23*w, 138*h, 239*w, 209*h) then
            text = "Informacje o graczu:\nUID: "..uid.."\nPrzegrany czas: "..mth(czas)[1].."h "..mth(czas)[2].."m ".."\nData rejestracji: "..rejestracja.."\nKonto premium do: "..premka.."\n\nInformacje o pracach:\nPunkty Street View: "..punktysv.."\nPunkty Busy: "..punktybusy.."\n\nInformacje o frakcji:\nFrakcja: "..frakcja.."\nPrzegrany czas na s?u?bie: "..minuty
    elseif isMouseIn(23*w, 415*h, 239*w, 209*h) then
        text = przewodnik
    elseif isMouseIn(23*w, 687*h, 239*w, 209*h) then
        text = premium
    elseif isMouseIn(screenW * 0.5969, screenH * 0.285, screenW * 0.0896, screenH * 0.0519) then
        text = "test4"
    end
end)


Podpis
Aktualny projekt:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-07, 17:44


Query

SyndicateMTA






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

Piwa: 5238

Respekt: 141
Respekt: 141

Songo23, polecam zrobi? restart co minute , zap?tli? go :D

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-07, 17:55


Songo23







Wiek: 23
Na forum: 3188 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

"darecky02" napisał/a:

Songo23, polecam zrobi? restart co minute , zap?tli? go :D


To nie przejdzie :/

Podpis
Aktualny projekt:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-07, 18:27


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Umie?? getElementData w onClientRender, co b?dzie 'renderowa?'(od?wie?a?) element-daty

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Songo23
Tagi: panel
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