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

Wysłany: 2017-08-19, 23:06


sasik12







Wiek: 26
Na forum: 3763 dni
Posty: 182

Piwa: 7

Respekt: 60

Elo .Mam problem z wyplatami :/

--[[
AutorMalentas
Dla: .sunnyRPG
NIE MASZ PRAWA DO U?YWANIA KODU BEZ MOJEJ ZGODY!!!!!!
]]

local screenWscreenH guiGetScreenSize()
local sxsy 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 roundedRectangle(xywhcolor)
  exports["nm-blur"]:dxDrawBluredRectangle(xywhtocolor(255,255,255), false)
  exports["nm-blur"]:dxDrawBluredRectangle(2141tocolor(255,255,255), false)
  exports["nm-blur"]:dxDrawBluredRectangle(2h41tocolor(255,255,255), false)
  exports["nm-blur"]:dxDrawBluredRectangle(1214tocolor(255,255,255), false)
  exports["nm-blur"]:dxDrawBluredRectangle(w214tocolor(255,255,255), false)
  dxDrawRectangle(xywhcolorfalse)
  dxDrawRectangle(2141colorfalse)
  dxDrawRectangle(2h41colorfalse)
  dxDrawRectangle(1214colorfalse)
  dxDrawRectangle(w214colorfalse)
end

function shadowText(textxywhcolorsizefontxxyy)
    dxDrawText(textx+1y+1w+1h+1tocolor(0,0,0), sizefontxxyyfalse)
    dxDrawText(textxywhcolorsizefontxxyyfalse)
end

oknowyplat false

local font dxCreateFont(":nm-gui/lcz.ttf"10) or "default-bold"

function gui()
        dxDrawRectangle(screenW 0.3542screenH 0.2656screenW 0.2597screenH 0.3933tocolor(000180), false)
        dxDrawRectangle(screenW 0.3542screenH 0.2200screenW 0.2597screenH 0.0644tocolor(741780255), false)
        dxDrawText("Odbieranie wyp?at frakcyjnych"screenW 0.3535screenH 0.2189screenW 0.6139screenH 0.2844tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)
        dxDrawText("Tutaj odbierzesz wyp?ate z SAPD, PSP ,PR i TAXI\n Twoja s?u?ba wynosi: "..getElementData(localPlayer,"wyplata").." minut/a"screenW 0.3542screenH 0.2844screenW 0.6139screenH 0.4356tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)
        --dxDrawText("Tutaj odbierzesz wyp?ate z SAPD, PSP ,PR i TAXI\n Twoja s?u?ba wynosi: "..getElementData(localPlayer,"wyplata").." minut/a"screenW 0.3542screenH 0.2844screenW 0.6139screenH 0.4356tocolor(255255255255), 1.00font,"center""center"falsefalsefalsefalsefalse)
        if isMouseIn(screenW 0.3681screenH 0.4722screenW 0.2306screenH 0.0789then
        dxDrawRectangle(screenW 0.3681screenH 0.4722screenW 0.2306screenH 0.0789tocolor(741780155), false)
        else
        dxDrawRectangle(screenW 0.3681screenH 0.4722screenW 0.2306screenH 0.0789tocolor(741780255), false)
        end
        if isMouseIn(screenW 0.3681screenH 0.5622screenW 0.2306screenH 0.0789then
        dxDrawRectangle(screenW 0.3681screenH 0.5622screenW 0.2306screenH 0.0789tocolor(741780155), false)
        else
        dxDrawRectangle(screenW 0.3681screenH 0.5622screenW 0.2306screenH 0.0789tocolor(741780255), false)
        end
        dxDrawText("Odbierz wyp?ate"screenW 0.3674screenH 0.4650screenW 0.5986screenH 0.5611tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)
        dxDrawText("Zamknij panel"screenW 0.3674screenH 0.645screenW 0.5986screenH 0.5611tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)
end


local marker createMarker(-2023.18474.09161.55-1,"cylinder"1.525525525550)

addEventHandler("onClientMarkerHit"marker, function(player)
    if player ~= localPlayer then return end
    addEventHandler("onClientRender"rootgui)
    oknowyplat true
    showCursor(true)

addEventHandler("onClientMarkerHit"marker, function(btnstate)
    if btn == "left" and state == "down" then
        if isMouseIn(screenW 0.3681screenH 0.4722screenW 0.2306screenH 0.0789) and oknowyplat == true then
            local pieniadze getElementData(localPlayer,"pieniadze")
            local wyplata getElementData(localPlayer,"wyplata")*200
            local minut getElementData(localPlayer,"wyplata")
            if minut 1 then return exports["nm-noti"]:noti("Musisz posiada? minimum 1 minute na s?u?bie aby odebra? wyp?ate."end
            setElementData(localPlayer,"pieniadze"pieniadze+wyplata)
            exports["nm-noti"]:noti("Odebra?e? "..wyplata.." PLN za "..minut.." minut.")
            removeEventHandler("onClientRender"rootgui)
                       oknowyplat false
                      showCursor(false)
                       setElementData(localPlayer,"wyplata"0)
        elseif isMouseIn(screenW 0.3681screenH 0.5622screenW 0.2306screenH 0.0789) and oknowyplat == true then
            removeEventHandler("onClientRender"rootgui)
                        oknowyplat false
                        showCursor(false)
end
end
end)
end)



B??d db3 :
http://www77.zippyshare.com/v/wmI0zTVM/file.html

Za pomoc :piwo: i R*

Podpis
Uczeń LUA . Mapper MTA.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-19, 23:34


Luqas

.lua <3






Wiek: 25
Na forum: 3455 dni
Posty: 84
Nick w MP: Luqas

Piwa: 10

Respekt: 80

Z tego co widze, je?eli patrz? na dobr? linijke to elementData "wyplata" ma warto?? prawda/fa?sz. A dlaczego, to ju? nie mam poj?cia. Co? musi le?e? po stronie servera :|

[ Dodano: 2017-08-19, 23:38 ]
Prawdopodobnie co? jest nie tak ze skryptem, albo nadaje z?? elementDate, a "wyplata" nie istnieje. St?d ten b??d.

Podpis
Pomogłem? Postaw Piwo lub/i respekt ^^


 Mój Youtube (klik)
Moje skrypty:
- Pay'n'Spray -

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-20, 00:32


Szymczu

Programista bo tak






Wiek: 27
Na forum: 3434 dni
Posty: 194
Nick w MP: Szymczu

Piwa: 36

Respekt: 120
Respekt: 120

B??d wynika z tego, ?e skrypt pr?buje pobra? elementDate, kt?ra nie istnieje.
Skrypt wywal bo ma mase b??d?w.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-20, 21:49


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

W og?le czemu masz 2 onClientMarkerHit? jednego nie zako?czy?e? i drugi zrobi?e? z parametrami 'btn' 'state' ;o



addEventHandler("onClientMarkerHit"marker, function(player)
    if player ~= localPlayer then return end
    addEventHandler("onClientRender"rootgui)
    oknowyplat true
    showCursor(true)

addEventHandler("onClientMarkerHit"marker, function(btnstate)
    if btn == "left" and state == "down" then


Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Tagi: wyplaty :: frakcji
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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