Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: banku
1. Kasa do banku
Jak zrobi? ?eby kasa lecia?a do banku?

[lua]sianko = math.random(30000,38000)
function rgbToHex(red, green, blue, alpha)
if( ( red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255 ) or ( alpha and ( alpha < 0 or alpha > 255 ) ) ) then
return nil
end
if alpha then
return string.format("#%.2X%.2X%.2X%.2X", red, green, blue, alpha)
else
return string.format("#%.2X%.2X%.2X", red, green, blue)
end
end
kordy = math.random(1,20)
if kordy == 1 then
x,y,z = 571.86, -1743.04, 12.40
elseif kordy == 2 then
x,y,z = -1993.66, 495.93, 35.17-1
elseif kordy == 3 then
x,y,z = -1734.76, 879.55, 25.09
elseif kordy == 4 then
x,y,z = -1672.76, 1206.60, 32.94
elseif kordy == 5 then
x,y,z = -1954.63, 1229.69, 31.65
elseif kordy == 6 then
x,y,z = -2472.77, 1070.43, 55.79
elseif kordy == 7 then
x,y,z = 1087.37, -1764.54, 13.36
elseif kordy == 8 then
x,y,z = 1488.79, -1675.96, 14.05
elseif kordy == 9 then
x,y,z = -2534.11, 62.38, 9.16
elseif kordy == 10 then
x,y,z = 232.68, -1807.06, 4.48
elseif kordy == 11 then
x,y,z = -2508.71, -687.03, 139.32
elseif kordy == 12 then
x,y,z = -2345.68, 995.06, 50.90
elseif kordy == 13 then
x,y,z = -1777.59, 1308.74, 59.73
elseif kordy...
2. Zarobki do banku
Witam jak zrobi? zarobki do bankomatu z pracy
Kod pracy:
[lua]--[[
Praca wykonana na potrzeby GTAO
Wykonawca: Lucky
--]]

local Kursytramwaje = {
{-2264.67, 525.08, 35.60},
{-2264.86, 554.23, 35.50},
{-2264.88, 597.16, 39.83},
{-2264.91, 652.92, 49.75},
{-2264.96, 721.44, 49.79},
{-2264.89, 802.29, 49.86},
{-2264.88, 894.73, 66.91},
{-2264.88, 998.42, 79.29},
{-2264.86, 1113.39, 76.58},
{-2272.89, 1237.89, 46.27},
{-2160.05, 1274.23, 27.32},
{-2039.96, 1307.38, 7.62},
{-1908.19, 1321.76, 7.50},
{-1792.88, 1378.78, 7.50},
{-1686.27, 1299.39, 7.50},
{-1595.23, 1199.52, 7.50},
{-1584.13, 1065.85, 7.50},
{-1529.82, 947.67, 7.50},
{-1641.08, 921.13, 16.97},
{-1776.48, 921.13, 25.12},
{-1911.54, 921.00, 35.71},
{-2001.63, 869.91, 45.75},
{-1881.63, 848.88, 35.50},
{-1745.98, 848.88, 25.18},
{-1610.50, 848.89, 8.00},
{-1540.12, 782.52, 7.50},
{-1630.59, 728.75, 14.87},
{-1711.55, 670.22, 25.12},
{-1795.04, 603.25, 33.79},
{-1930.54, 603.25, 35.50},
{-2003.41, 534.35, 35.50},
{-2003.63, 399.12, 35.50},
{-2004.68, 263.58, 31.81},
{-2006.50, 128.35, 28.00},
{-2045.20, 30.38, 35.62},
{-2166.55, 12.10, 35.62},
{-2223.97, -70.08, 35.62},
{-2253.73, 38.59, 35.62},
{-2251.50, 170.32, 35.62},
{-2251.50, 302.33, 35.62},
{-2306.47, 417.18, 35.50},
{-2362.24, 507.33, 30.00},
{-2269.28, 511.57, 35.51},
}

local jobTarget
local jobMarker
local jobVehicle
...
3. Salony biorą kase z portfela a nie z banku
Siema, bawi?em si? z tym troch? i troch? nie ogarniam jak to zrobi?.
Przy zakupie auta w salonie bierze kase z portfela a chc? zrobi? ?eby z banku bra?o.

ElementData banku to bank:hajs
getElementData(localPlayer,"bank:hajs")

Kod:

addEvent("buyVehicle", true)
addEventHandler("buyVehicle", resourceRoot, function(model, mileage, cost, capacity)
cost=tonumber(cost)
if model and mileage and cost then
if cost <= client.money then
local uid = client:getData("player:uid")
if not uid then return false end

client:takeMoney(cost)
triggerClientEvent(client, "onClientAddNotification", client, "Zakupi?e?(a?) pojazd prywatny, znajdziesz go w przechowalni pojazd?w.", "success")
exports["ogrpg-db"]:dbGet("INSERT INTO ogrpg_vehicles (model, ownedPlayer, firstowner, mileage, parking, capacity) VALUES (?,?,?,?,1,?)", model, uid, client.name, mileage, capacity)
else
triggerClientEvent(client, "onClientAddNotification", client, "Nie posiadasz wystarczajacej kwoty pieni?dzy!n(Brakuje Ci: "..string.format("%.02fPLN", cost-client.money)..")", "error")
end
end
end)
4. Wyplata do banku
Tak jak w temacie!

[lua]local marker=createMarker(-3418.78, 394.06, 17.91-1, 'cylinder', 1.2, 255, 255, 0, 75)
setElementInterior(marker, 0)
setElementDimension(marker, 69)
local text=createElement('text')
setElementPosition(text, -3418.78, 394.06, 17.91)
setElementInterior(text, 0)
setElementDimension(text, 69)
setElementData(text,"name","Wyp?atynFrakcyjne")

mojeW,mojeH = 1280, 1024
sW,sH = guiGetScreenSize()
w, h = (sW/mojeW), (sH/mojeH)

local sx,sy = guiGetScreenSize()
local baseX = 1920
local zoom = 1
local minZoom = 2

if sx < baseX then
zoom = math.min(minZoom, baseX/sx)
end

panel = false
local minuty = getElementData(localPlayer, "player:workinjob") or "Brak"

function PanelWyplata()
dxDrawImage(785/zoom, 440/zoom, 350/zoom, 200/zoom, "img/wyplata-psrpg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
if cursorPosition(819/zoom, 564/zoom, 283/zoom, 48/zoom) then
dxDrawImage(785/zoom, 440/zoom, 350/zoom, 200/zoom, ":psrpg-frakcja-sapd/files/duty/button_on-psrpg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
else
dxDrawImage(785/zoom, 440/zoom, 350/zoom, 200/zoom, ":psrpg-frakcja-sapd/files/duty/button_off-psrpg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
dxDrawImage(785/zoom, 440/zoom, 350/zoom, 200/zoom, "img/odbierz-psrpg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText("Wyp?aty mog? odbier...
5. Limit hajsu w banku
Jak juz jest w opisie posiadam skrypt na bank i jesli sie ma 2147483647 to hajs wplacany do banku znika a kwota w banku sie nie zmienia oraz w bazie danych mozna miec w bankomacie maxymalnie 2147483647 hajsu, jak to naprawic bo mamy duze zarobki na serwerze?

ss: https://imgur.com/gallery/Qpgp7Uw

skrypt:

https://pastebin.com/6HuurtXv

bo sie nie miesci w 3500 znakach

doslownie nawet nie mam pojecia w ktorej linijce to sie blokuje

debugscript 3 nic nie mowi poniewaz skrypt odpisuje " wplata zostala dokonana pomyslnie " choc tylko hajs stracilismy
6. Jak zrobic zeby pobieralo kase z banku
Witam jak zrobic zeby kase pobieralo z bankomatu jak sie kupuje jakies auto? na dole macie kodzik

[lua]createBlip(1427.20, 228.42, 19.56, 55,2,0,0,0,0,0,275) -- Salon pojazd?w rekreacyjnych Palomino Crick | PC. -

createBlip(-505.93, 321.63, 2.73, 55,2,0,0,0,0,0,275) -- Cygan Las Barrancas | Tierra Robada. -
createBlip(-1661.34, 1212.81, 13.67, 55,2,0,0,0,0,0,275) -- Salon pojazd?w sportowych Downtown | San Fierro. -
createBlip(756.05, 381.31, 22.82, 55,2,0,0,0,0,0,275) -- Terenowe | BB. -
createBlip(-1362.44, -498.40, 14.17, 55,2,0,0,0,0,0,275) -- SAMOLOTOWE | SF. -
createBlip(-46.48, 70.10, 3.12, 55,2,0,0,0,0,0,275) -- Motor. -
createBlip(-145.62, 1027.16, 19.74, 55,2,0,0,0,0,0,275) -- Salon FC. -

local positionVehicles = {

-- Cygan Las Barrancas | Tierra Robada. - |SAPD|Bone
{'Syrenka', 466, 15000, 150000, 195.53, -239.30, 1.58, 0.0, 0.0, 270, 0},
{'Bobcat', 422, 83222, 150000, -904.93, 196.07, -251.45,1.58, 359.8, 270, 0},
{'Manana', 410, 77222, 200000, 196.20, -256.38, 1.58, 359.3, 0.0, 270, 0},
{'Clover', 542, 71312, 150000, 197.17, -264.05, 1.58, 359.5, 0.0, 270, 0},
{'Walton', 478, 77479, 130000, 200.18, -270.27, 1.58, 359.2, 360.0, 270, 0},
{'Perennial', 404, 25000, 300000, 196.49, -250.90, 1.58, 359.7, 359.9, 270, 0},
{'Golf 3', 496, 50000, 300000, 196.28, -242.92, 1.58, 359.7, 359.9, 270, 0},

-- Salon pojazd?w rekreacyjnych Doherty | San Fierro. - Marek
{'BF', 424, 0, 24500000, -501.39, 334.57, 2.36, 358.1, 360.0, 211....
7. Pobieranie pieniedzy z banku
if tonumber(cost) > getPlayerMoney(plr) then
outputChatBox("* Nie posiadasz tyle got?wki.", plr)
return
end

Chcia?bym aby z tego skryptu pobieralo kase z banku jest to gieilda
licze na szybka pomoc pls
8. Zwiekszenie limitu hajsu w banku
Tak jak w temacie to jak zmienic limit hajsu w banku o ile sie da
9. kasyno pobieranie hajsu z banku i dawanie kasy do banku
c.lua
[lua]

--[[
Casino - slot machine
@author Hyperion/R3fr3Sh <[email protected]>
@copyright 2017 Hyperion/R3fr3Sh <[email protected]>
@license GPLv3
]]


-- source of the background:http://www.freepik.com/free-vector/valentine-s-background-design_1024958.htm#term=slot (for both internal and external drum parts)
-- background edited by MrDadosz [email protected] using GIMP
local drum = "img/drum.png"
local druminteral = "img/cards.png"
-- general settings
local settings = {}
settings.drumColor = tocolor(0, 125, 255)
settings.stake = 30000000 -- starting stake
settings.stakeMax = 500000000 -- maximum stake
settings.stakeMin = 1000000 -- minimum stake
settings.stakeStep = 1000000 -- step of a stake
settings.font = "font/Roboto.ttf"
settings.language = "english"
settings.jackpotSound = "sounds/jackpot.ogg" -- SOURCE: https://www.freesound.org...6/sounds/51671/ "This work is licensed under the Attribution Noncommercial License."
settings.positionsCol = { -- slot machine colshape positions
-- {x, y, z, size, dimension, interior}
{1135.08, -3.87, 1000.68, 0.3, 0, 12},
{1132.90, -1.66, 1000.68, 0.3, 0, 12},
{1134.91, 0.61, 1000.68, 0.3, 0, 12},
{1127.99, 3.01, 1000.68, 0.3, 0, 12},
{1126.95, 3.01, 1000.68, 0.3, 0, 12},
{1125.90, 3.01, 1000.68, 0.3, 0, 12},
{1124.87, 3.01, 1000.68, 0.3, 0, 12},
}

-- don't modify these unless you...
10. kasyno pobieranie hajsu z banku i dawanie kasy do banku
c.lua
[lua]

--[[
Casino - slot machine
@author Hyperion/R3fr3Sh <[email protected]>
@copyright 2017 Hyperion/R3fr3Sh <[email protected]>
@license GPLv3
]]


-- source of the background:http://www.freepik.com/free-vector/valentine-s-background-design_1024958.htm#term=slot (for both internal and external drum parts)
-- background edited by MrDadosz [email protected] using GIMP
local drum = "img/drum.png"
local druminteral = "img/cards.png"
-- general settings
local settings = {}
settings.drumColor = tocolor(0, 125, 255)
settings.stake = 30000000 -- starting stake
settings.stakeMax = 500000000 -- maximum stake
settings.stakeMin = 1000000 -- minimum stake
settings.stakeStep = 1000000 -- step of a stake
settings.font = "font/Roboto.ttf"
settings.language = "english"
settings.jackpotSound = "sounds/jackpot.ogg" -- SOURCE: https://www.freesound.org...6/sounds/51671/ "This work is licensed under the Attribution Noncommercial License."
settings.positionsCol = { -- slot machine colshape positions
-- {x, y, z, size, dimension, interior}
{1135.08, -3.87, 1000.68, 0.3, 0, 12},
{1132.90, -1.66, 1000.68, 0.3, 0, 12},
{1134.91, 0.61, 1000.68, 0.3, 0, 12},
{1127.99, 3.01, 1000.68, 0.3, 0, 12},
{1126.95, 3.01, 1000.68, 0.3, 0, 12},
{1125.90, 3.01, 1000.68, 0.3, 0, 12},
{1124.87, 3.01, 1000.68, 0.3, 0, 12},
}

-- don't modify these unless you...
11. Wyplata z Frakcji do Banku
Witam chcialem zrobic by hajs zarobiony z frakcji trafial do banku
s.lua
[lua]
local Frakcje = { ----- ILOSC PLNOW ZA 1 PRZEPRACOWANA MINUTE!!!!!!!!!!!!!!!!!!
["SAPD"] = 500000,
["SARA"] = 300000,
["SAFD"] = 300000,
["SAMD"] = 800000,
}

local text=createElement('text')
setElementPosition(text,-2711.45, 328.15, 7491.5+1.2)
setElementData(text,"name","Odbi?r Wyp?aty")

function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end

function odbierz(el,md)
local sid = getElementData(el,"player:sid")
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_factions WHERE sid=?", sid)
if #result > 0 then
if Frakcje[result[1].code] then
if getElementData(el,"player:workinjob") and getElementData(el,"player:workinjob") >= 1 then
local money = (Frakcje[result[1].code] * getElementData(el,"player:workinjob"))
local czas = getElementData(el,"player:workinjob")
setElementData(el,"player:workinjob",0)
exports["pystories-db"]:dbSet("UPDATE ...
12. Praca hajs do banku
Witam pytanko da sie zrobic by hajs ktory sie nie miesci przy sobie wplacal sie do banku jezeli tak to przeslalby ktos linijke tego skryptu
13. kasa lecąca do banku
Sprawa wygl?da tak, ?e tworz? export kt?ry pobiera pieni?dze z bankomatu gracza, przy pr?bie dodawania pieni?dzy w pracy do bankomatu - po prostu tej kasy nie dodaje.
addEvent("givePlayerMoney"true)
addEventHandler("givePlayerMoney"root, function(value,value2)
    if 
not tonumber(valuethen return end
    
if not getElementData(source,"player:logged"then return end
    local bankmoney 
exports["pystories-db"]:dbGet("SELECT `bank_money` FROM `pystories_users` WHERE `id` = ?"sid)
    
local kasabank 0
    
for iv in ipairs(bankmoney) do
        
kasabank v["bank_money"]
    
end

    exports
["pystories-db"]:dbSet("UPDATE `pystories_users` SET `bank_money` = `bank_money` + ? WHERE `pystories_users`.`id` = ?"valuesid)
    if 
not value2 then
        local rnd
={math.random(1,10),math.random(1,3)}
        
local rep=getElementData(source,"player:reputation") or 0
        local xd
=rep+rnd[2]
        
setElementData(source,"player:reputation",xd)
        if 
rnd[1] == or rnd[1] == or rnd[1] == 9 then
            triggerClientEvent
(source"reputation:show"resourceRootrnd)
        
end
    end
end
)

Zero b??d?w, w 'zabieraniu' kasy z banku bez problemu dzia?o, po zmianie na dodawanie kasy do banku - nie dodaje.
14. Bot do banku
Cze?? wszystkim! Postawi?em z koleg? serwer i chcemy doda? bota do banku, lecz nikt z nas nie bawi? si? ze skryptami. Prosimy o pomoc. Koordynaty miejsca w kt?rym chcemy mie? bota podaje poni?ej:
Position: 359.62890625, 173.6669921875, 1008.3893432617
Rotation: 0, 0, 277.63150024414
Dimension: 87
Interior: 3
S? to skrypty z Owla bardzo prosimy o pomoc. :)
15. pobieranie z banku
witam pomo?e kto? uzupe?ni? lub pom?c jako? bo chcia?bym ustawi? w salonach aby nie pobiera?o z konta, tylko z bankomatu
[code]
--[[
Komisy samochodowe
@author value <[email protected]>
@Edit: DylemaT929 :)
Nie masz prawa u?y? tego kodu bez mojej zgody
]]
createBlip(-1959.59, 285.91, 35.47, 55,2,0,0,0,0,0,275) --- sf doherty zwykly
createBlip(-1641.25, 1203.88, 7.25, 55,2,0,0,0,0,0,275) --- sf downtown sportowy
createBlip(-936.90, -525.65, 25.95, 55,2,0,0,0,0,0,275) --- cygan

local vehicles = {}
local komis_shapes = {}
local slots = {

{-1953.35, 306.55, 40.64, 537.4, 0.0, 179.6, model=521, dmax=0, dmin=0, price=(25000000), gdzie="sf"}, -- FCR 900
{-1956.45, 306.28, 40.64, 537.4, 0.0, 179.8, model=581, dmax=0, dmin=0, price=(23000000), gdzie="sf"}, -- BF
{-1952.58, 300.26, 40.59, 89.1, 0.0, 91.0, model=463, dmax=0, dmin=0, price=(4000000), gdzie="sf"}, -- Freeway
{-1952.72, 295.79, 40.59, 89.1, 0.0, 88.4, model=471, dmax=0, dmin=0, price=(5000000), gdzie="sf"}, -- QuadBike
{-1952.91, 291.28, 40.59, 89.1, 0.0, 91.0, model=461, dmax=0, dmin=0, price=(3200000), gdzie="sf"}, -- PCJ

-- Salon LV Sportowy
{-1662.96, 1221.65, 13.26, 230, 0, 0, model=415, dmax=0, dmin=0, price=(79000000), gdzie="dohertysf2"}, -- cheetah
{-1649.00, 1207.89, 13.34,65, 0.0, 0.0, model=560, dmax=0, dmin=0, price=(45500000), gdzie="dohertysf2"}, -- Sultan
{-1649.99, 1207.60, 20.78,65, 0.0...
16. pobieranie hajsu z banku
jak ustawi? jak chc? kupi? auto to hajs pobiera z bankomatu

[code]


addEventHandler("onResourceStart", resourceRoot, function ()
for i,v in ipairs(slots) do
komis_shapes[i] = createColSphere(v[1], v[2], v[3], 3)
setElementData(komis_shapes[i], "i", i)
createKomisVehicle(i)

addEventHandler("onColShapeHit", komis_shapes[i], function (hit,dim)
if getElementType(hit) == "player" and getElementData(komis_shapes[i], "komis:veh") then
triggerClientEvent(hit, "onClientAddNotification", hit,"Zainteresowa? ci? ten pojazd? /kuppojazd", "info")
end
end)

end
end)

addCommandHandler("kuppojazd", function (plr, cmd)
local shape = isPlayerInVehicleColShape(plr)
if not shape then return end
local veh = getElementData(shape, "komis:veh")
if not veh then return end
local slot = getElementData(shape, "komis:slot")

local price = vehicles[slot].price
local money = getPlayerMoney(plr)
if price > money then
triggerClientEvent(plr, "onClientAddNotification", plr,"* Nie sta? ci? na kupno tego pojazdu. Id? zar?b na pracach dorywczych i wr?c p??niej!", "error")
return
end
takePlayerMoney(plr, price)

local x,y,z = getElementPosition(veh)
local rx,ry,rz = getElementRotation(veh)
local i = getElementInterior(veh)
local d = getElementDimension(veh)
local pos = x..", "..y.....
17. giełda, hajs do banku
siema, chcia?bym ?eby na gie?dzie hajs zabiera?o z banku i dawa?o do banku

[lua]
--[[
Developed by Yolos and Split
All rights reserved!
You cannot use this without permission!
--]]

function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end

local LIMIT=3 -- tylko gracz mo?e kupi? trzy pojazdy

local cmd="sprzedaj"
local cmd2="akceptuj"
local sprzedazPojazdu={}
local marker=nil
local timer=nil

function wczytaj(v)
v.pos=split(v.pos,",")
local mkr=createMarker(v.pos[1], v.pos[2], v.pos[3]-0.90, "cylinder", 2, 88, 88, 72, 212)
setElementDimension(mkr, v.dimension or 0)
setElementInterior(mkr, v.interior or 0)
setElementData(mkr, "sprzedaz:pojazd?w", true)
setElementData(mkr,"sprzedaz:typ",2)
setElementData(mkr,"sprzedaz:owner",tonumber(v.owner))

addEventHandler ("onMarkerHit", mkr, function(el,md)
if getElementType(el) ~= "player" then return end
if getPedOccupiedVehicle(el) then return end
outputChatBox("* Aby sprzeda? pojazd: ", el)
outputChatBox("* Wpisz /sprzedaj <nick/ID> <id pojazdu> <...
18. Nie wiem jak zmienić limit banku
Witam potrzebuje pomocy w zmianie limitu banku kto? mi tak napisa? : wystarczy strukture tabeli bank_money zmieni? z int 11 na bigint 20 . Ale nie wiem jaki to skrypt czy to baza danych prosze o pomoc za pomoc b?dzie piwko na gtao Dzi?kuje


Paczka PSRPG 1.0
19. Wyświetlanie kasy przechowywanej w banku
Chcia?bym wy?wietli? w hudzie ilo?? pieni?dzy posiadanych przez gracza w banku.
Tutaj mam kawalek kodu i nie wiem, dlaczego nie dzia?a. :/

Client Side
local bank convertNumber(getPlayerBankMoney(localPlayer()))

Server Side
function getPlayerBankMoney(player)
    
local uid getElementData(player"player:sid")
    
local result=exports["gl-db"]:dbGet("SELECT * from users where id=?"uid)
    if 
result and #result > 0 then
        
return result[1].bank_money
    end
    
return 0
end
20. Przelewanie pieniędzy z banku do banku
Witam ot??, pom?g?by mi kto? z tym. Chcia?bym aby da?o si? przelewa? hajs komendom, z banku do banku na nick/id gracza. Mam bankomaty z ogrpg, wi?c nic nowego, lecz nawet nie wiem, jak podstawi? exporty.
kod taki, kt?ry s?u?y do przelewania hajsu od gracza do gracza.

[lua]function onTransferMoney(plr, cmd, target, value)
if not target or not tonumber(value) then
outputChatBox('* U?yj: /przelej <nick/ID> <kwota>', plr)
return
end
value=string.match(value, "%d*")
value=tonumber(value)
local target=findPlayer(plr,target)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr)
--exports.rpg_noti:createNotification(plr, "error", "Nie znaleziono podanego gracza.")
return
end
if not (getElementData(target, "player:logged") == true) then
outputChatBox('* Gracz nie jest zalogowany!.', plr, 255, 0, 0)
--exports.rpg_noti:createNotification(plr, "error", "Gracz nie jest zalogowany !")
return end
if getPlayerMoney(plr) < value then
outputChatBox("* Nie masz wystarczajacych ?rodk?w.", plr)
--exports.rpg_noti:createNotification(plr, "error", "Nie masz wystarczajacych ?rodk?w.")
return
end
if value == 0 or value < 0 then
outputChatBox("* Poda?e?(a?) nie prawid?ow? warto??.", plr)
--exports.rpg_noti:createNotification(plr, "er...
21. Przelewanie pieniędzy z banku do banku
Witam ot??, pom?g?by mi kto? z tym. Chcia?bym aby da?o si? przelewa? hajs komendom, z banku do banku na nick/id gracza. Mam bankomaty z ogrpg, wi?c nic nowego, lecz nawet nie wiem, jak podstawi? exporty.
kod taki, kt?ry s?u?y do przelewania hajsu od gracza do gracza.

[lua]function onTransferMoney(plr, cmd, target, value)
if not target or not tonumber(value) then
outputChatBox('* U?yj: /przelej <nick/ID> <kwota>', plr)
return
end
value=string.match(value, "%d*")
value=tonumber(value)
local target=findPlayer(plr,target)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr)
--exports.rpg_noti:createNotification(plr, "error", "Nie znaleziono podanego gracza.")
return
end
if not (getElementData(target, "player:logged") == true) then
outputChatBox('* Gracz nie jest zalogowany!.', plr, 255, 0, 0)
--exports.rpg_noti:createNotification(plr, "error", "Gracz nie jest zalogowany !")
return end
if getPlayerMoney(plr) < value then
outputChatBox("* Nie masz wystarczajacych ?rodk?w.", plr)
--exports.rpg_noti:createNotification(plr, "error", "Nie masz wystarczajacych ?rodk?w.")
return
end
if value == 0 or value < 0 then
outputChatBox("* Poda?e?(a?) nie prawid?ow? warto??.", plr)
--exports.rpg_noti:createNotification(plr, "er...
22. Dawanie hajsu do banku
Witam ot??, mam spraw? zrobi?by mi kto?, ?e jak si? odbiera wyp?at? z frakcji daje ja do banku? element data banku bank_money
kod
local marker=createMarker(-2776.52, -376.177.44-0.955"cylinder"1.1255800)
setElementInterior(marker,0)
setElementDimension(marker,0)
local text=createElement('text')
setElementPosition(text,-2776.52, -376.177.44)
setElementData(text,"name","Wyp?atynFrakcyjne")
setElementInterior(text,0)
setElementDimension(text,0)

addEventHandler("onMarkerHit"marker, function(el,md)
    
local uid getElementData(el,"player:uid")
    
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_factions WHERE uid=?"uid)
    if 
#result > 0 then
        
if Frakcje[result[1].codethen
            
if getElementData(el,"player:workinjob") and getElementData(el,"player:workinjob") >= 1 then
                local money 
= (Frakcje[result[1].code] * getElementData(el,"player:workinjob"))
                
outputChatBox("* Otrzymujesz "..money.."  $ za przepracowanych "..getElementData(el,"player:workinjob").." minut!",el)
                
givePlayerMoney(el,money)
                
setElementData(el,"player:workinjob",0)
            else
                
outputChatBox("* Nie masz nic do odebrania!",el)
            
end
        
else
            
outputChatBox("* Nie jeste? w frakcji, kt?ra mo?e odbiera? wyp?aty!",el)
        
end
    end
end
)
23. [MAPA] Interior banku
Witam chcia?bym przedstawi? wam interior banku mojego autorstwa, nie powala on na kolana ale mo?e komu? przypadnie do gustu. Wszystkie pomieszczenia widoczne na Screenshotach s? ze sob? po??czone

Screeny: http://imgur.com/a/p5M08#0

LINK:
Ukryta wiadomość / Hidden message(aby ją zobaczyć musisz postawić użytkownikowi)
Wiadomość została ukryta, aby ją przeczytać należy się zalogować.
24. [OBIEKTY] Interior Banku

Nazwa: Interior Banku
Wykonane przez: Jobas
Czas pracy: 1h i 20min
Obiekt?w: 111
Usuni?te obiekty: 0
Dodatkowe Informacje: Dodaj? link do pastebina i download PWN.
Zdj?cia:

Download:

Ukryta wiadomość / Hidden message(aby ją zobaczyć musisz postawić użytkownikowi)
Wiadomość została ukryta, aby ją przeczytać należy się zalogować.
25. [DM] Źle dodaje kasę do banku
Zrobi?em co? takiego:

Kod:

if(dialogid == BANK_WPLAC)
{
if(!response)
return SendClientMessage(playerid, 0xB0B0B0AA, "Anulowa?e?...");
if(!IsNull(inputtext) && IsNumeric(inputtext))
{
new bankbufwplac[127];
format(bankbufwplac, sizeof(bankbufwplac), "UPDATE `Gracze` SET `Bank_kasa` = '%d' WHERE `Nick`='%s'", inputtext, PlayerName(playerid));
SendClientMessage(playerid, 0xFF0000, "Wp?aci?e? pieni?dze na konto!");
mysql_query(bankbufwplac);
}
if(IsNull(inputtext))
{
SendClientMessage(playerid, 0xFF0000FF, "To pole nie mo?e by? puste!");
return 0;
}
}


Nie wiem tylko dlaczego jak wp?ac? np. 10.000$ w bazie pojawia si? 49. Co jest nie tak?

[ Komentarz dodany przez: Sillence: 2013-11-11, 17:07 ]
// Kodu w znaczniku [.code][./code] nie mo?na wy?rodkowa?. Taka informacja na przysz?o?? :)
26. [INNE] Komenda w banku
Witam,

Przerobi?em sobie komend? w systemie bank?w, tak, ?eby komend? /rkonto da?o si? wpisa?, gdy zmienna BankIst wynosi 1 lub gdy jeste?my w pewnym punkcie. Problem w tym, ?e teraz ani w "pierwotnym banku", ani w tym punkcie komenda nie dzia?a. Zrobi?em sobie 2 kolory komendy i zawsze si? pokazuje ten bia?y (czyli, tu chodzi o zmienn? BankIst). G?owi? si? ju? 30 min i nic nie mog? na to poradzi?. Kod komendy:
Kod:

cmd(rkonto, playerid, params[])
{
if(BankIst[playerid] == 0 || !IsPlayerInRangeOfPoint(playerid, 4.0, 1278.6735, -1650.4340, 13.5859)) return SendClientMessage(playerid, WHITE, "»» Musisz by? w banku, aby zarejestrowa? swoje konto. ");
if(ZalogowanyBank[playerid] == 1) return SendClientMessage(playerid, WHITE, "»» Masz ju? konto bankowe. ");

ZalogowanyBank[playerid] = 1;
new string[128];
format(string, sizeof string, "INSERT INTO `Bank` (`nick`, `kasa`) VALUES ('%s', '0')", PlayerName(playerid));
db_free_result(db_query(DataBase, string));
SendClientMessage(playerid, ORANGE, "»» Zarejestrowa?e? swoje konto bankowe !. ");
return 1;
}
27. [INNE] Ustawianie pozycji np banku
Witam,mam problem z pozycj? banku,po wej?ciu na serwer wpisa?em /save,wysz?o mi co? takiego:

Kod:

AddPlayerClass(188,1436.1909,-999.1743,57.5156,272.5065,0,0,0,0,0,0); //


W GM natomiast mam tak:
Kod:

if(!DoInRange(5.5,playerid,2308.6497,-13.2815,26.7422))


I gdy dodam to GM tak:

if(!DoInRange(5.5,playerid,188,1436.1909,-999.1743,57.5156,272.5065))

Kompiluje si? normalnie ale podczas odpalania serwera nawet na dom?wce,
pisz?
File function....
czyli mapa jest uszkodzona,

Co poradzicie?

jak zrobi? aby np na stacji paliw auto podje?d?a?o pod dystrybutor i tankowa?o?



Kod:


AddStaticVehicle(599,1007.0029,-940.4518,42.3194,95.9243,123,40); //


Tutaj jest m?j kord pod stacj?,tylko jak go doda? do gm?

Za pomoc Piwa :piwo: :piwo: