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

Wysłany: 2023-11-30, 15:01


K4M7K







Wiek: 34
Na forum: 1185 dni
Posty: 9
Nick w MP: 7EVEN

Piwa: 6

Respekt: 50

Mam problem z podlaczeniem avatarow z dashbordu do hudu pomoze ktos oto kod avtarow i hudu
-- AutorAsaXx

panel false

local sw,sh guiGetScreenSize()
local scale 1366 sw

local font4 dxCreateFont("Roboto-Regular.ttf"9)
local font41 dxCreateFont("Roboto-Regular.ttf"8)
local font412 dxCreateFont("Roboto-Regular.ttf"15)
local font4123 dxCreateFont("Roboto-Regular.ttf"11)

local sx,sy=guiGetScreenSize()

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
    if not isCursorShowing() then return end
    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 przecinek(liczba)  
    local format liczba  
    while true do      
        formatstring.gsub(format"^(-?%d+)(%d%d%d)"'%1,%2')    
        if ( k==then      
            break  
        end  
    end  
    return format
end

function dashboard()
    setPlayerHudComponentVisible "radar"false )
    local lvl getElementData(localPlayer"player:lvl")
    local lvl2 getElementData(localPlayer"player:lvl") + 1
    local exp getElementData(localPlayer"player:exp")

    local pjA getElementData(localPlayer"player:license:pjA") or "Brak"
    local pjB getElementData(localPlayer"player:license:pjB") or "Brak"
    local pjC getElementData(localPlayer"player:license:pjC") or "Brak"
    local pjL getElementData(localPlayer"player:license:pjL") or "Brak"

    local ppA getElementData(localPlayer"player:ppA")
    local ppB getElementData(localPlayer"player:ppB")
    local ppC getElementData(localPlayer"player:ppC")
    local ppL getElementData(localPlayer"player:ppL")

    if pjA == 0 then 
        setElementData(localPlayer"player:ppA""Brak")
    elseif pjA == 1 then 
        setElementData(localPlayer"player:ppA""Tak")
    end
    if pjB == 0 then 
        setElementData(localPlayer"player:ppB""Brak")
    elseif pjB == 1 then 
        setElementData(localPlayer"player:ppB""Tak")
    end
    if pjC == 0 then 
        setElementData(localPlayer"player:ppC""Brak")
    elseif pjC == 1 then 
        setElementData(localPlayer"player:ppC""Tak")
    end
    if pjL == 0 then 
        setElementData(localPlayer"player:ppL""Brak")
    elseif pjL == 1 then 
        setElementData(localPlayer"player:ppL""Tak")
    end

    local tekst "Siemka "..getPlayerName(localPlayer).."#ffffff! Witam ciÄ&#8482; na serwerze NAZWASERWERA. PozwĂłl, ĹĽe przedstawiÄ&#8482; Tobie po krĂłtce \nco warto zrobiÄ&#8225; na poczÄ&#8230;tku gry na naszym serwerze. Na poczÄ&#8230;tku warto udaÄ&#8225; siÄ&#8482; na pracÄ&#8482; \nmagazyniera. Znajduje siÄ&#8482; ona w okolicy LOKALIZACJA. NastÄ&#8482;pnie warto zrobiÄ&#8225; pierwszy wiÄ&#8482;kszy \nkrok na serwerze. Tak - prawojazdy. Bo przecieĹĽ nikt nie che (hehe) jeĹşdziÄ&#8225; bez prawa jazdy, co nie?\nKategoria B kosztuje CENA. Warto jÄ&#8230; zrobiÄ&#8225; jako pierwszÄ&#8230;, poniewaĹĽ dziÄ&#8482;ki temu moĹĽemy \nprzystÄ&#8230;piÄ&#8225; do pracy jako PRACA, jeĹ&#8250;li mamy odpowiedni poziom. A jak juĹĽ przy poziomach - na \nserwerze obowiÄ&#8230;zuje system poziomĂłw. Tak wiem zaskoczenie. Za kaĹĽdy poziom dostajemy 10.000$. \nPoza tym, ĹĽe dostajemy pieniÄ&#8230;ĹĽki odblokowujemy takĹĽe różne pracÄ&#8482; oraz pojazdy. Tak - bez \nodpowiedniego poziomiu nie bÄ&#8482;dziesz mĂłgĹ&#8218; kupiÄ&#8225; swojego wymarzonego pereniala. \n\nTo tyle sĹ&#8218;owem wstÄ&#8482;pu, jeĹ&#8250;li jeszcze czegoĹ&#8250; nie wiesz odsyĹ&#8218;am ciÄ&#8482; do administracji (/admins). \nMoĹĽesz napisaÄ&#8225; do niej w prywatnej wiadomoĹ&#8250;ci lub poprzez raporta (/raport).\n\nMiĹ&#8218;ej gry!\n\nAdministracja NAZWASERWERA."
 
    local time getRealTime()
    local hours time.hour
    local minutes time.minute
    local seconds time.second
    if (hours 10then
        hours "0"..hours
    end
    if (minutes 10then
        minutes "0"..minutes
    end
    if (seconds 10then
        seconds "0"..seconds
    end


    local monthday time.monthday
    if (monthday 10then
        monthday "0"..monthday
    end
    local month time.month
    if (month 10then
        month "0"..month
    end
    local year time.year

    dxDrawRectangle(325/scale160/scale750/scale450/scaletocolor(121212240), false)
    dxDrawRectangle(325/scale160/scale150/scale450/scaletocolor(171717255), false)
    dxDrawRectangle(325/scale160/scale750/scale50/scaletocolor(171717255), false)

    if isMouseIn(325/scale312/scale150/scale25/scalethen 
        dxDrawRectangle(325/scale312/scale150/scale25/scaletocolor(101010240))

    elseif isMouseIn(325/scale362/scale150/scale25/scalethen 
        dxDrawRectangle(325/scale362/scale150/scale25/scaletocolor(101010240))

    elseif isMouseIn(325/scale412/scale150/scale25/scalethen
        dxDrawRectangle(325/scale412/scale150/scale25/scaletocolor(101010240))
    elseif isMouseIn(325/scale462/scale150/scale25/scalethen
        dxDrawRectangle(325/scale462/scale150/scale25/scaletocolor(101010240))
    end

    dxDrawRectangle(355/scale175/scale85/scale85/scaletocolor(101010255))
    if getElementData(localPlayer"player:avatar") == 0 then 
        dxDrawImage(360/scale180/scale75/scale75/scale"default.png")
    elseif getElementData(localPlayer"player:avatar") == 1 then 
        dxDrawImage(360/scale180/scale75/scale75/scale"1.png")
    elseif getElementData(localPlayer"player:avatar") == 2 then 
        dxDrawImage(360/scale180/scale75/scale75/scale"2.jpg")
    elseif getElementData(localPlayer"player:avatar") == 3 then 
        dxDrawImage(360/scale180/scale75/scale75/scale"3.jpg")
    elseif getElementData(localPlayer"player:avatar") == 4 then 
        dxDrawImage(360/scale180/scale75/scale75/scale"4.jpg")
    elseif getElementData(localPlayer"player:avatar") == 5 then 
        dxDrawImage(360/scale180/scale75/scale75/scale"5.jpg")
    elseif getElementData(localPlayer"player:avatar") == 6 then 
        dxDrawImage(360/scale180/scale75/scale75/scale"6.jpg")
    end

    dxDrawText(""..lvl..""1125/scale270/scale100/scale100/scaletocolor(255255255255), 1font4123"center""center")
    dxDrawText(""..lvl2..""1670/scale270/scale100/scale100/scaletocolor(255255255255), 1font4123"center""center")
    dxDrawRectangle(640/scale175/scale215/scale20/scaletocolor(101010255))
    dxDrawRectangle(642/scale177/scale210*(exp/500)/scale15/scaletocolor(255255255255))

    dxDrawText("Informacje"700/scale550/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
    dxDrawText("Przeowdnik"700/scale650/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
    dxDrawText("Gracz"700/scale750/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
    dxDrawText("Avatar"700/scale850/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")

    dxDrawText(""..monthday.."-"..month.."-2021"695/scale1048/scale100/scale100/scaletocolor(255255255255), 1font41"center""center")
    dxDrawText(""..hours..":"..minutes..":"..seconds..""694/scale1075/scale100/scale100/scaletocolor(255255255255), 1font41"center""center")

    if page == 1 then 
        dxDrawImage(675/scale250/scale125/scale115/scale"astralrp.png")
        dxDrawText("Data startu serwera: XX-XX-XXXX"1375/scale775/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
        dxDrawText("ZaĹ&#8218;oĹĽyciel: AsaXx"1375/scale850/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
        dxDrawText("Rekord online: 500"1375/scale925/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
    
    elseif page == 2 then 
        dxDrawText(""..tekst..""1435/scale625/scale100/scale100/scaletocolor(255255255255), 1font4"center""center"falsefalsefalsetruefalse)
    
    elseif page == 3 then 
        -- OGĂ&#8220;LNE
        dxDrawRectangle(525/scale250/scale185/scale18/scaletocolor(444240))
        dxDrawText("Informacje ogĂłlne"1075/scale419/scale100/scale100/scaletocolor(255255255255), 1font41"center""center")

        dxDrawRectangle(525/scale275/scale185/scale18/scaletocolor(101010240)) -- nick
        --dxDrawText("#C0C0C0Nick: "..getPlayerName(localPlayer)..""1006/scale469/scale100/scale100/scaletocolor(192,192,192255), 1font41"center""center"falsefalsefalsetruefalse)
        dxDrawText("#C0C0C0Nick: #ffffff"..getPlayerName(localPlayer)..""539/scale100/scale100/scale/scale469/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(525/scale300/scale185/scale18/scaletocolor(101010240)) -- id
        dxDrawText("#C0C0C0ID: #ffffff"..getElementData(localPlayer"id")..""539/scale100/scale100/scale519/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(525/scale325/scale185/scale18/scaletocolor(101010240)) -- sid
        dxDrawText("#C0C0C0SID: #ffffff"..getElementData(localPlayer"player:sid")..""539/scale569/scale100/scale100/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(525/scale350/scale185/scale18/scaletocolor(101010240)) -- hajs
        if getElementData(localPlayer"player:premium") == true then
            dxDrawText("#C0C0C0Konto: #C0FF00Premium"539/scale619/scale100/scale100/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        else 
            dxDrawText("#C0C0C0Konto: #ffffffNormalne"539/scale619/scale100/scale100/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        end
        dxDrawRectangle(525/scale375/scale185/scale18/scaletocolor(101010240)) -- hajs bank
        dxDrawText("#C0C0C0PieniÄ&#8230;dze: #ffffff"..przecinek(getPlayerMoney(localPlayer))..""539/scale669/scale100/scale100/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(525/scale400/scale185/scale18/scaletocolor(101010240)) -- godziny
        dxDrawText("#C0C0C0Minuty: #ffffff"..getElementData(localPlayer"player:hours")..""539/scale719/scale100/scale100/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(525/scale425/scale185/scale18/scaletocolor(101010240)) -- skin id
        dxDrawText("#C0C0C0Skin: #ffffff"..getPlayerSkin(localPlayer)..""539/scale769/scale100/scale100/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)

        -- LICENCJE
        dxDrawRectangle(825/scale250/scale185/scale18/scaletocolor(444240))
        dxDrawText("Licencje"1620/scale419/scale100/scale100/scaletocolor(255255255255), 1font41"center""center")

        dxDrawRectangle(825/scale275/scale185/scale18/scaletocolor(101010240)) -- 
        dxDrawText("#C0C0C0Kategoria A: #ffffff"..ppA..""839/scale100/scale100/scale/scale469/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(825/scale300/scale185/scale18/scaletocolor(101010240)) -- 
        dxDrawText("#C0C0C0Kategoria B: #ffffff"..ppB..""839/scale100/scale100/scale/scale519/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(825/scale325/scale185/scale18/scaletocolor(101010240)) -- 
        dxDrawText("#C0C0C0Kategoria C: #ffffff"..ppC..""839/scale100/scale100/scale/scale569/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)
        dxDrawRectangle(825/scale350/scale185/scale18/scaletocolor(101010240)) -- 
        dxDrawText("#C0C0C0Kategoria L: #ffffff"..ppL..""839/scale100/scale100/scale/scale619/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)

        -- INNE
        dxDrawRectangle(825/scale400/scale185/scale18/scaletocolor(444240))
        dxDrawText("Inne informacje"1660/scale719/scale100/scale100/scaletocolor(255255255255), 1font41"center""center")

        dxDrawRectangle(825/scale425/scale185/scale18/scaletocolor(101010240)) -- ping
        dxDrawText("#C0C0C0Ping: #ffffff"..getPlayerPing(localPlayer)..""839/scale100/scale100/scale/scale769/scaletocolor(192,192,192255), 1font41"left""center"falsefalsefalsetruefalse)

    elseif page == 4 then
        dxDrawRectangle(570/scale270/scale85/scale85/scaletocolor(101010255))
        dxDrawImage(575/scale275/scale75/scale75/scale"1.png")
        if not isMouseIn(570/scale375/scale85/scale20/scalethen
            dxDrawRectangle(570/scale375/scale85/scale20/scaletocolor(101010255))
        else 
            dxDrawRectangle(569/scale374/scale88/scale23/scaletocolor(101010255))
        end

        dxDrawRectangle(720/scale270/scale85/scale85/scaletocolor(101010255))
        dxDrawImage(725/scale275/scale75/scale75/scale"2.jpg")
        if not isMouseIn(720/scale375/scale85/scale20/scalethen
            dxDrawRectangle(720/scale375/scale85/scale20/scaletocolor(101010255))
        else 
            dxDrawRectangle(719/scale374/scale88/scale23/scaletocolor(101010255))
        end

        dxDrawRectangle(870/scale270/scale85/scale85/scaletocolor(101010255))
        dxDrawImage(875/scale275/scale75/scale75/scale"3.jpg")
        if not isMouseIn(870/scale375/scale85/scale20/scalethen 
            dxDrawRectangle(870/scale375/scale85/scale20/scaletocolor(101010255))
        else 
            dxDrawRectangle(869/scale374/scale88/scale23/scaletocolor(101010255))
        end

        dxDrawRectangle(570/scale445/scale85/scale85/scaletocolor(101010255))
        dxDrawImage(575/scale450/scale75/scale75/scale"4.jpg")
        if not isMouseIn(570/scale550/scale85/scale20/scalethen
            dxDrawRectangle(570/scale550/scale85/scale20/scaletocolor(101010255))
        else 
            dxDrawRectangle(569/scale549/scale88/scale23/scaletocolor(101010255))
        end


        dxDrawRectangle(720/scale445/scale85/scale85/scaletocolor(101010255))
        dxDrawImage(725/scale450/scale75/scale75/scale"5.jpg")
        if not isMouseIn(720/scale550/scale85/scale20/scalethen
            dxDrawRectangle(720/scale550/scale85/scale20/scaletocolor(101010255))
        else 
            dxDrawRectangle(719/scale549/scale88/scale23/scaletocolor(101010255))
        end

        dxDrawRectangle(870/scale445/scale85/scale85/scaletocolor(101010255))
        dxDrawImage(875/scale450/scale75/scale75/scale"6.jpg")
        if not isMouseIn(870/scale550/scale85/scale20/scalethen
            dxDrawRectangle(870/scale550/scale85/scale20/scaletocolor(101010255))
        else 
            dxDrawRectangle(869/scale549/scale88/scale23/scaletocolor(101010255))
        end

        dxDrawText("Wybierz"1125/scale670/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
        dxDrawText("Wybierz"1425/scale670/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
        dxDrawText("Wybierz"1725/scale670/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")

        dxDrawText("Wybierz"1125/scale1020/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
        dxDrawText("Wybierz"1425/scale1020/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")
        dxDrawText("Wybierz"1725/scale1020/scale100/scale100/scaletocolor(255255255255), 1font4"center""center")

    end 
end

function onoff()
    if panel == false then
        addEventHandler("onClientRender"rootdashboard)
        panel true
        showChat(false)
        showCursor(true)
        page 1
    else
        removeEventHandler("onClientRender"rootdashboard)
        setPlayerHudComponentVisible"radar"true )
        showChat(true)
        showCursor(false)
        panel false
    end
end

bindKey("F1""down"onoff)

addEventHandler("onClientClick"root, function()
    if isMouseIn(325/scale312/scale150/scale25/scalethen
        page 1 
    elseif isMouseIn(325/scale362/scale150/scale25/scalethen
        page 2
    elseif isMouseIn(325/scale412/scale150/scale25/scalethen
        page 3
    elseif isMouseIn(325/scale462/scale150/scale25/scalethen
        page 4
    end
end)

addEventHandler("onClientClick"root, function()
    if page == 4 then
        if isMouseIn(570/scale375/scale85/scale20/scalethen 
            setElementData(localPlayer"player:avatar"1)
        elseif isMouseIn(720/scale375/scale85/scale20/scalethen
            setElementData(localPlayer"player:avatar"2)
        elseif isMouseIn(870/scale375/scale85/scale20/scalethen 
            setElementData(localPlayer"player:avatar"3)
        elseif isMouseIn(570/scale550/scale85/scale20/scalethen
            setElementData(localPlayer"player:avatar"4)
        elseif isMouseIn(725/scale550/scale85/scale20/scalethen 
            setElementData(localPlayer"player:avatar"5)
        elseif isMouseIn(875/scale550/scale85/scale20/scalethen 
            setElementData(localPlayer"player:avatar"6)
        end
    end
end)
i kod hudu
main = {
    onlineTime 0,
    onlineTime2 0,
    premiumMoney 50000,
    premiumPlusMoney 150000,
    afkTimes 0,
}
local screenWscreenH guiGetScreenSize()
local pxpy = (screenW/1366),(screenH/768)
local zoom 1
if screenW 1366 then
    zoom math.min(21366 screenW)
end
tick getTickCount()
online 0
function getPedWeapons(ped)
    local playerWeapons = {}
    if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then
        for i=2,do
            local wep getPedWeapon(ped,i)
            if wep and wep ~= 0 then
                table.insert(playerWeapons,wep)
            end
        end
    else
        return false
    end
    return playerWeapons
end
main.voiceAlpha 0
main.renderHUD = function()
    if getElementData(localPlayer"player:sid") and not getElementData(localPlayer,"notshowhud"then
        local health math.floor(getElementHealth(localPlayer))
        local money getPlayerMoney(localPlayer)
        exports["W_Avatar"]:dxCreateAvatar(1265*px5*px95*px95*px255)
        if getElementData(localPlayer"voice:mowi"then
            main.voiceAlpha main.voiceAlpha 25 <= 255 and main.voiceAlpha 25 or 255
        else
            main.voiceAlpha main.voiceAlpha 25 >= and main.voiceAlpha 25 or 0 
        end
        dxDrawImage(1327*px75*px22*px22*px"img/vc-off.png"000tocolor(255255255255), false)
        dxDrawImage(1327*px75*px22*px22*px"img/vc-on.png"000tocolor(255255255main.voiceAlpha), false)
        local weaponID getPedWeapon(localPlayer)
        if weaponID then
            if weaponID == 8 then
            else
                dxDrawImage(1276*px110*px3*px3*px"weapons/"..(weaponID or 0)..".png"000tocolor(255255255225), false)
                local weaponSlot getPedWeaponSlot (localPlayer)
                if(weaponSlot and weaponSlot 7) and not isElementInWater(localPlayerthen
                    local ammoClip getPedAmmoInClip (localPlayerweaponSlot)
                    local totalAmmo getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)
                    dxDrawText(""..totalAmmo.." / "..ammoClip.." AMMO"1270*px115*px1346*px95*pxtocolor(000255), 1/zoomexports.nrpg_interface:getGUIFont("money7"), "right""top"falsefalsefalsetruefalse)
                    if getElementData(localPlayer"player:strefaDM") == true then
                    dxDrawText("#FFFFFF"..totalAmmo.." / "..ammoClip.."#008000 AMMO"1270*px115*px1345*px85*pxtocolor(255255255255), 1/zoomexports.nrpg_interface:getGUIFont("money7"), "right""top"falsefalsefalsetruefalse)    
                    else
                    dxDrawText("#FFFFFF"..totalAmmo.." / "..ammoClip.."#008000 AMMO"1270*px115*px1345*px85*pxtocolor(255255255255), 1/zoomexports.nrpg_interface:getGUIFont("money7"), "right""top"falsefalsefalsetruefalse)    
                    end
                end
            end
        end
        dxDrawText("&#9829; "..health.."%"1141*px40*px1265*px176*pxtocolor(0,0,0255), 1/zoomexports.nrpg_interface:getGUIFont("money9"), "right""top"falsefalsefalsetruefalse)
            dxDrawText("&#9829; "..health.."%"1141*px40*px1265*px176*pxtocolor(255,0,0255), 1/zoomexports.nrpg_interface:getGUIFont("money9"), "right""top"falsefalsefalsetruefalse)
            dxDrawText(""1171*px14*px1275*px96*pxtocolor(000255), 1/zoomexports.nrpg_interface:getGUIFont("money9"), "right""top"falsefalsefalsetruefalse)
            dxDrawText(""1170*px13*px1274*px95*pxtocolor(2552250255), 1/zoomexports.nrpg_interface:getGUIFont("money9"), "right""top"falsefalsefalsetruefalse)
        dxDrawText(""..main.przecinkiAdd(money).." PLN"1170*px70*px1264*px95*pxtocolor(000255), 1/zoomexports.nrpg_interface:getGUIFont("money8"), "right""top"falsefalsefalsetruefalse)
        if getElementData(localPlayer"player:strefaDM") == true then
        dxDrawText(""..main.przecinkiAdd(money).." #ff0000PLN"1170*px69*px1263*px93*pxtocolor(255255255255), 1/zoomexports.nrpg_interface:getGUIFont("money8"), "right""top"falsefalsefalsetruefalse)    
        else
        dxDrawText(""..main.przecinkiAdd(money).." #15B400PLN"1170*px69*px1263*px93*pxtocolor(255255255255), 1/zoomexports.nrpg_interface:getGUIFont("money8"), "right""top"falsefalsefalsetruefalse)    end
        local x,y,getElementPosition(localPlayer)
        local sid getElementData(localPlayer"player:sid")
        local marycha getElementData(localPlayer"player:marihuana") or 0
        if getElementInterior(localPlayer) == 0 then
        end    
        if marycha 1 then
            dxDrawText("Marihuana: "..marycha.."g"282*px697*py367*px751*pytocolor(0,0,0255), 1/zoomexports.nrpg_interface:getGUIFont("gtav10"), "left""center"falsefalsefalsefalsefalse)
            dxDrawText("Marihuana: "..marycha.."g"281*px696*py366*px750*pytocolor(0,200,0255), 1/zoomexports.nrpg_interface:getGUIFont("gtav10"), "left""center"falsefalsefalsefalsefalseend
        if not getElementData(localPlayer"player:customradar"then
            if getElementData(localPlayer"player:strefaDM") == true then
            dxDrawText(ulica:gsub("#%x%x%x%x%x%x""").." Strefa DM"281*px696*py466*px657*pytocolor(000255), 1/zoomexports.nrpg_interface:getGUIFont("aileron10"), "left""center"falsefalsefalsefalsefalse)
            dxDrawText(ulica.." #ff0000Strefa DM"280*px695*py465*px655*pytocolor(255255255255), 1/zoomexports.nrpg_interface:getGUIFont("aileron10"), "left""center"falsefalsefalsetruefalse)    
        else    
        end
            dxDrawText("Sesja: "..main.secondsToClock(online), 8*px700*py252*px760*pytocolor(225225225155), 1/zoomexports.nrpg_interface:getGUIFont("money7"), "left""bottom"falsefalsefalsefalsefalse)
        end
        if (getTickCount() - tick) >= (1000then
            tick getTickCount()
            online=online+1
            main.addTime(1000)
        end
    end
end
main.addTime = function(seconds)
    main.onlineTime main.onlineTime 1
    main.onlineTime2 main.onlineTime2 1
    if main.onlineTime2 60 then
        setElementData(localPlayer"player:hours"tonumber(getElementData(localPlayer"player:hours") or 0)+1)
        main.onlineTime2 0
    end
    if main.onlineTime > (60*60then
        if getElementData(localPlayer"player:premiumplus"then
            outputChatBox("&#9432; #FFFFFFOtrzymujesz #25C700"..main.przecinkiAdd(main.premiumPlusMoney).." PLN#ffffff za przegraną godzinę."2552550true)
            triggerServerEvent("givePlayerBankMoney"localPlayermain.premiumPlusMoney)
            main.onlineTime 0
        elseif getElementData(localPlayer"player:premium"then
            outputChatBox("&#9432; #FFFFFFOtrzymujesz #25C700"..main.przecinkiAdd(main.premiumMoney).." PLN#ffffff za przegraną godzinę."2552550true)
            triggerServerEvent("givePlayerBankMoney"localPlayermain.premiumMoney)
            main.onlineTime 0
        end
    end
end
main.secondsToClock = function(seconds)
    seconds seconds or 0
    if seconds <= 0 then
        return "00:00:00"
    else
        hours string.format("%02.f"math.floor(seconds/3600))
        mins string.format("%02.f"math.floor(seconds/60 - (hours*60)))
        secs string.format("%02.f"math.floor(seconds hours*3600 mins *60))
        return hours..":"..mins..":"..secs
    end
end
addEventHandler("onClientResourceStart"resourceRoot, function()
    setPlayerHudComponentVisible("all"false)
    addEventHandler("onClientRender"root, function()
        main.renderHUD()
    end)    
end)
main.przecinkiAdd = function(amount) 
    local formatted amount 
        while true do   
            formattedstring.gsub(formatted"^(-?%d+)(%d%d%d)"'%1,%2') 
            
            if (k==0then 
                break 
              end 
        end 
    return formatted 
end
bindKey("F7""down", function()
    if getElementData(localPlayer"player:sid"then
        if getElementData(localPlayer"notshowhud"then
            setElementData(localPlayer"notshowhud"false)
            showChat(true)
        else
            setElementData(localPlayer"notshowhud"true)
            showChat(false)
        end
    end
end)


Ostatnio zmieniony przez rxkrxd 2023-11-30, 15:20, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
borsuk
Wysłany: 2023-12-06, 16:11


Sokdev18

CJ






Wiek: 22
Na forum: 1199 dni
Posty: 27
Nick w MP: Soczek

Piwa: 122

Respekt: 20,5

Ostrzeżeń: 100%
Nadal potrzebujesz pomocy?

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
borsuk
Tagi: jak :: podpiac :: avatary?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak podpiac avatary? Odpowiedz do tematu

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