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

Wysłany: 2018-09-28, 16:04


Pyrek24







Wiek: 25
Na forum: 3438 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

Witam ot?? dopiszecie mi jaki? kodzik do tego by by?o wi?cej hajsu w banku bo jest limit 2kkk nwm jak to zwi?kszy? lub prosi?ym o skrypt kt?ry daje mo?liwo?ci zwi?kszenia got?wki przy sobie z 99kk na 999kkk
Bankomaty:
bankomaty_c.lua
local bankomaty={
{92.281049.5013.61-0.35, -0.000.0089.13}, -- Salon Doherty.

{-1648.901202.507.25-0.35, -0.000.00180.47}, -- Salon Downtown.

{-1603.62710.2713.87-0.35, -0.000.00178.86}, -- Komenda G??wna Policji.

{-2460.16,-316.03,41.40, -0.000.00270.00}, -- G?rnik

{-2620.641414.937.09-0.4, -0.000.00, -64,93}, -- Bankomat

{-1517.13492.920.78, -0.000.00100.50}, -- ??dki 

{1460.35, -1256.25813.50  , -0.000.000.00}, -- URZ?D SF 

{-1719.50, -130.183.15  , -0.000.00, -45.00}, -- TuneDiagnostyka 

{-1832.11110.4814.50  , -0.000.00, -180.00}, -- TuneVizu 

{-1707.911351.036.75  , -0.000.0045.00}, -- Spawn32  

{-1910.19278.7340.55  , -0.000.00, -90.00}, -- Licka DOherty

{-1379.43, -531.4413.65 , -0.000.0030.00}, -- Lot SF 

{-1243.8033.1913.60 , -0.000.00, -140.00}, -- Naprawa Lot SF

{-2735.25115.724.00 , -00, -90.353050231934}, -- Komis Pyrek 

{-22.141175.2419.00 , -00, -180},  

{-332.031537.0275.00 , -000}, -- Komis SZYSZAK 

{-2029.80435.0434.80 , -000}, -- Komis xNancio
{2494.391887.1510.00 , -00, -180}, -- Magazyn z TOPKAMI 
}

for i,v in ipairs(bankomaty) do

    v.obiekt=createObject(2618,v[1],v[2],v[3]-0.7,v[4],v[5],v[6])
    setElementInterior(v.obiekt,v[7] or 0)
    setElementDimension(v.obiekt,v[8] or 0)
    setElementFrozen(v.obiekt,true)
    setObjectBreakable v.obiektfalse )
    
    setElementInterior(v.mapicon,v[7] or 0)
    setElementDimension(v.mapicon,v[8] or 0)
    
    v.cs=createColSphere(v[1],v[2],v[3]+11)
    setElementInterior(v.cs,v[7] or 0)
    setElementDimension(v.cs,v[8] or 0)
    v.text=createElement('text')
    setElementData(v.text,"name","Bankomat")
    setElementPosition(v.text,v[1],v[2],v[3]+1)
end

local screenWscreenH guiGetScreenSize()

local bw={}
bw.lbl1 guiCreateLabel(0.780.400.170.07,"Stan konta:\n0 PLN",true)
local font0_money guiCreateFont(":ogrpg-gui/epik.ttf"12)
guiSetFont(bw.lbl1font0_money)    
guiLabelSetVerticalAlign(bw.lbl1,"center")
guiLabelSetHorizontalAlign(bw.lbl1,"center",false)


bw.edt1 guiCreateEdit(0.7750.6050.080.04,"0",true) --wplac

bw.edt2 guiCreateEdit(0.7750.5050.080.04,"0",true) --wyplac


guiSetVisible(bw.lbl1false)
guiSetVisible(bw.edt1false)
guiSetVisible(bw.edt2false)

panel false

function BankGUI()
local r,g,b=interpolateBetween(255,255,255,20,250,0,(getTickCount()-czas)/1100,"SineCurve")
local r2,g2,b2=interpolateBetween(255,255,255,255,0,0,(getTickCount()-czas)/1100,"SineCurve")
dxDrawImage(screenW 0.7255screenH 0.3451screenW 0.7943screenH 0.5339"okn2.png"000tocolor(255255255180), false)
  
if not cursorPosition(screenW 0.8682screenH 0.5052screenW 0.0798screenH 0.0404then --wyplac
dxDrawImage(screenW 0.8448screenH 0.4466screenW 0.1340screenH 0.1497"przycisk.png"000tocolor(255,255,255255), false)
 
dxDrawText("Wyp?a?", (screenW 0.8690) + 1, (screenH 0.5052) + 1, (screenW 0.9480) + 1, (screenH 0.5430) + 1tocolor(000255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Wyp?a?"screenW 0.8690screenH 0.5052screenW 0.9480screenH 0.5430tocolor(255255255255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse)
  
else 
dxDrawImage(screenW 0.8448screenH 0.4466screenW 0.1340screenH 0.1497"przycisk.png"000tocolor(255,255,255255), false)

dxDrawText("Wyp?a?", (screenW 0.8690) + 1, (screenH 0.5052) + 1, (screenW 0.9480) + 1, (screenH 0.5430) + 1tocolor(000255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Wyp?a?"screenW 0.8690screenH 0.5052screenW 0.9480screenH 0.5430tocolor(505050255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)
   
end 
if not cursorPosition(screenW 0.8690screenH 0.6029screenW 0.0798screenH 0.0404then --wplac
dxDrawImage(screenW 0.8448screenH 0.5469screenW 0.1340screenH 0.1497"przycisk.png"000tocolor(255,255,255255), false)
 
dxDrawText("Wp?a?", (screenW 0.8697) + 1, (screenH 0.6042) + 1, (screenW 0.9488) + 1, (screenH 0.6432) + 1tocolor(000255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Wp?a?"screenW 0.8697screenH 0.6042screenW 0.9488screenH 0.6432tocolor(255255255255), 1.12"default-bold""center""center"falsefalsefalsefalsefalse)

else 
dxDrawImage(screenW 0.8448screenH 0.5469screenW 0.1340screenH 0.1497"przycisk.png"000tocolor(255,255,255255), false)

 
dxDrawText("Wp?a?", (screenW 0.8697) + 1, (screenH 0.6042) + 1, (screenW 0.9488) + 1, (screenH 0.6432) + 1tocolor(000255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Wp?a?"screenW 0.8697screenH 0.6042screenW 0.9488screenH 0.6432tocolor(505050255), 1.05"default-bold""center""center"falsefalsefalsefalsefalse)
 
end 
if not cursorPosition(screenW 0.7943screenH 0.7839screenW 0.1340screenH 0.0547then --zamknij
dxDrawImage(screenW 0.7526screenH 0.7031screenW 0.2299screenH 0.2070"przycisk.png"000tocolor(255255255255), false)
 
dxDrawText("Zamknij", (screenW 0.7950) + 1, (screenH 0.7839) + 1, (screenW 0.9283) + 1, (screenH 0.8385) + 1tocolor(000255), 1.30"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Zamknij"screenW 0.7950screenH 0.7839screenW 0.9283screenH 0.8385tocolor(255255255255), 1.30"default-bold""center""center"falsefalsefalsefalsefalse)
else 
dxDrawImage(screenW 0.7526screenH 0.7031screenW 0.2299screenH 0.2070"przycisk.png"000tocolor(255,255,255255), false)
 
dxDrawText("Zamknij", (screenW 0.7950) + 1, (screenH 0.7839) + 1, (screenW 0.9283) + 1, (screenH 0.8385) + 1tocolor(000255), 1.24"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Zamknij"screenW 0.7950screenH 0.7839screenW 0.9283screenH 0.8385tocolor(505050255), 1.24"default-bold""center""center"falsefalsefalsefalsefalseend 
                     
dxDrawText("Bankomat", (screenW 0.7694) + 1, (screenH 0.3620) + 1, (screenW 0.9510) + 1, (screenH 0.3997) + 1tocolor(000255), 1.20"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("Bankomat"screenW 0.7694screenH 0.3620screenW 0.9510screenH 0.3997tocolor(255,255,255255), 1.20"default-bold""center""center"falsefalsefalsefalsefalse)
 
dxDrawText("U?ytkownik: "..getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x","").."", (screenW 0.7782) + 1, (screenH 0.6693) + 1, (screenW 0.9422) + 1, (screenH 0.7135) + 1tocolor(000255), 1.20"default-bold""center""center"falsefalsefalsefalsefalse)
        
dxDrawText("U?ytkownik: "..getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x","")..""screenW 0.7782screenH 0.6693screenW 0.9422screenH 0.7135tocolor(255255255255), 1.20"default-bold""center""center"falsefalsefalsefalsefalse)                             
end



addEventHandler("onClientColShapeHit"resourceRoot, function(el,md)
    if not md or el~=localPlayer then return end
                if panel == false then
                  addEventHandler("onClientRender",root,BankGUI)
                          czas getTickCount()
                                panel true
                                guiSetVisible(bw.lbl1true)
                                guiSetVisible(bw.edt1true)
                                guiSetVisible(bw.edt2true)
                                showCursor(true)
        guiSetText(bw.lbl1,"* Trwa otwieranie konta bankowego...")
        triggerServerEvent("onPlayerRequestATMInfo"resourceRoot)
        guiSetInputMode("no_binds_when_editing")
            guiSetFont(bw.lbl2font1_money)
            guiSetFont(bw.lbl3font1_money)
            end
end)

addEvent("doFillATMInfo"true)
addEventHandler("doFillATMInfo"resourceRoot, function(successbalance)
    if not success then
        guiSetText(bw.lbl1,"* Brak polaczenia mysql....")
        return
    end
    guiSetText(bw.lbl1,"Stan Twojego konta:".."\n".. balance.." PLN")
    guiSetFont(bw.lbl1normalFont)
    setElementData(bw.lbl1"balance"tonumber(balance))
    guiSetText(bw.edt2,100 balance and balance or 100)
    if balance>0 then
    end

    guiSetText(bw.edt1,balance)
end)

addEventHandler("onClientPlayerSpawn"localPlayercloseATMWin)


function Wplac(buttonstate)
if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.8690screenH 0.6029screenW 0.0798screenH 0.0404then
    local kwotaee=tonumber(guiGetText(bw.edt1))
    if not kwotaee then return end
    local kwota=math.floor(kwotaee)
    if not kwota or kwota<1 then
        outputChatBox("* Nieprawid?owa kwota wp?aty!"255,0,0)
        return
    end
    
    
        if kwota>getPlayerMoney() then
            outputChatBox("* Nie masz tyle got?wki!"255,0,0)
            return
        end
        
        triggerServerEvent("doATMOperation"resourceRootkwota)
    end

end
end
addEventHandler("onClientClick"getRootElement(), Wplac)

function Wyplac(buttonstate)
if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.8682screenH 0.5052screenW 0.0798screenH 0.0404then
    if not tonumber(guiGetText(bw.edt2)) then return end
    local kwotae=tonumber(guiGetText(bw.edt2))
    if not kwotae then return end
    local kwota=math.floor(kwotae)
    if not kwota or kwota<1 then
        outputChatBox("* Nieprawid?owa kwota wyp?aty!"255,0,0)
        return
    end
    if getPlayerMoney()+kwota>99999999 then
        outputChatBox("* Maksymalna ilo?? got?wki kt?r? mo?esz mie? przy sobie to 999999.99 PLN"255,0,0)
        return
    end
    triggerServerEvent("doATMOperation"resourceRoot, -kwota)
end
end
end
addEventHandler("onClientClick"getRootElement(), Wyplac)

function Zamknij(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(screenW 0.7943screenH 0.7839screenW 0.1340screenH 0.0547then
                panel false 
                removeEventHandler ("onClientRender"rootBankGUI)
                showCursor(false)
                guiSetVisible(bw.lbl1false)
                guiSetVisible(bw.edt1false)
                guiSetVisible(bw.edt2false)
         end
    end
end
addEventHandler("onClientClick"getRootElement(), Zamknij)

function cursorPosition(xywh)
    if (not isCursorShowing()) then
        return false
    end
    local mxmy getCursorPosition()
    local fullxfully guiGetScreenSize()
    cursorxcursory mx*fullxmy*fully
    if cursorx and cursorx and cursory and cursory h then
        return true
    else
        return false
    end
end


bankomaty.lua



addEvent("onPlayerRequestATMInfo"true)
addEventHandler("onPlayerRequestATMInfo"resourceRoot, function()
    local dbid=getElementData(client,"player:uid")
    if not dbid then
        triggerClientEvent(client,"doFillATMInfo"resourceRootfalse)
        return
    end
    local sr=exports["ogrpg-db"]:dbGet("SELECT bank_money FROM ogrpg_users WHERE id=? LIMIT 1",dbid)
    if not sr or #sr < 1 then
        triggerClientEvent(client,"doFillATMInfo"resourceRootfalse)
        return
    end
    local sr=sr[1]
    triggerClientEvent(client,"doFillATMInfo"resourceRoottruetonumber(sr.bank_money))
end)

addEvent("doATMOperation"true)
addEventHandler("doATMOperation"resourceRoot, function(kwota)
    if type(kwota) ~= "number" then outputDebugString("Blad bankomatu xDDDDD") return end
    if kwota>and kwota>getPlayerMoney(clientthen return end -- komunikat bledu po stronie klienta
    local dbid=getElementData(client,"player:uid")
    local sr=exports["ogrpg-db"]:dbGet("SELECT `bank_money` FROM `ogrpg_users` WHERE id=? LIMIT 1",dbid)
    if not sr or #sr < 1 then return end
    sr=tonumber(sr[1].bank_money)
    if not dbid then return end -- nie powinno sie zdarzyc
    if kwota>0 then
        if getPlayerMoney(client)<kwota then return end
        takePlayerMoney(clientkwota)
        exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET bank_money=bank_money+?? WHERE id=? LIMIT 1",tonumber(kwota),dbid)
        local sr=exports["ogrpg-db"]:dbGet("SELECT `bank_money` FROM `ogrpg_users` WHERE id=? LIMIT 1",dbid)
        if not sr or #sr < 1 then return end
        sr=tonumber(sr[1].bank_money)
        triggerEvent("admin:logs"rootstring.format("WPLATA %d DO bankomatu (UID : %d) STAN KONTA %d",math.abs(tonumber(kwota)),dbid,sr))
        --triggerEvent("broadcastCaptionedEvent"clientgetPlayerName(client).." wp?aca pieni?dze do bankomatu"320true)
        outputChatBox("Wp?aci?e?[a?] pieni?dze do bankomatu."client255,0,100)
    elseif kwota<0 then
        if (sr<math.abs(kwota)) then
            outputChatBox("* Nie masz tyle ?rodk?w na koncie!"client255,0,0)
--            triggerClientEvent(client,"onAnnouncement3"root"Nie masz tyle ?rodk?w na koncie!"5)
            return
        end
        exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET bank_money=bank_money-?? WHERE id=? LIMIT 1",math.abs(tonumber(kwota)),dbid)
        local sr=exports["ogrpg-db"]:dbGet("SELECT `bank_money` FROM `ogrpg_users` WHERE id=? LIMIT 1",dbid)
        if not sr or #sr < 1 then return end
        sr=tonumber(sr[1].bank_money)
        triggerEvent("admin:logs"rootstring.format("WYPLATA %d z bankomatu (UID : %d) STAN KONTA %d",math.abs(tonumber(kwota)),dbid,sr))
        outputChatBox("* Wyp?aci?e? pieni?dze z bankomatu."client255,80,0)
        givePlayerMoney(clientmath.abs(kwota))
    end
end)



Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-28, 17:14


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

Linijka 211:
if getPlayerMoney()+kwota>99999999 then


Zmie? warto?? na jak? tam chcesz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-28, 17:36


Pyrek24







Wiek: 25
Na forum: 3438 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

No zwi?kszy?em i nie dzia?a ;(

Podpis
amta
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-28, 17:48


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

Podaj b??dy DB3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-28, 18:00


Pyrek24







Wiek: 25
Na forum: 3438 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

nazwa pliku drpg-bankomaty jak co?
ssy
https://imgur.com/UA7WXQv

[ Dodano: 2018-09-30, 10:12 ]
Pomo?e kto??

Podpis
amta
Postaw piwo autorowi tego posta
 

 
Tagi: większa :: ilość :: gotówki :: bankomacie/lub :: przy :: sobie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Większa ilość gotówki w bankomacie/lub przy sobie 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