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: wypłata
1. Wypłata frakcyjna
Wywala mi b??d przy wej?ciu w blipa od wyp?at: s_money_from_job.lua:72: attempt to perform arithmetic on local 'money' (a nil value)

Kod

[code]
local pension = { --za 1 minute
["SAPD"] = {
[1] = 800,
[2] = 850,
[3] = 900,
[4] = 950,
[5] = 1000,
[6] = 1050,
[7] = 1100,
[8] = 1150,
[9] = 1200,
[10] = 1250,
[11] = 1500,
},
["SAFD"] = {
[1] = 800,
[2] = 850,
[3] = 900,
[4] = 950,
[5] = 1000,
[6] = 1050,
[7] = 1100,
[8] = 1150,
[9] = 1200,
[10] = 1250,
[11] = 1500,
},
["SARA"] = {
[1] = 800,
[2] = 850,
[3] = 900,
[4] = 950,
[5] = 1000,
[6] = 1050,
[7] = 1100,
[8] = 1150,
[9] = 1200,
[10] = 1250,
[11] = 1500,
},

}

local mnoznik = 1

local markersFactionPayment={
{-2636.63, -9.21, 6.13},

}

for i,v in ipairs(markersFactionPayment) do
local marker=createMarker(v[1], v[2], v[3]-1, "cylinder", 1.2, 255, 255, 255)
setElementData(marker,'marker:text','#00C645WYPŁATA')
setElementData(marker,'marker:downtext','Tutaj odbierzesz wyp?‚at?™ z frakcji')
setElementData(marker,'marker:icon','job')
setElementInterior(marker, v[4] or 0)
setElementDimension(marker, v[5] or 0)
end
...
2. Wypłata Frakcyjna
Gdy pr?buj? wyp?aci? wyskakuj? b??d

[img]https://i.imgur.com/WzpQpdQ.png[/img]

[code]local pension = { --za 1 minute
["SAPD"] = {
[1] = 1175,
[2] = 1200,
[3] = 1225,
[4] = 1250,
[5] = 1300,
[6] = 1325,
[7] = 1350,
[8] = 1400,
[9] = 1425,
[10] = 1450,
[11] = 1500,
},
["SAFD"] = {
[1] = 1175,
[2] = 1200,
[3] = 1225,
[4] = 1250,
[5] = 1300,
[6] = 1325,
[7] = 1350,
[8] = 1400,
[9] = 1425,
[10] = 1450,
[11] = 1500,
},
["SARA"] = {
[1] = 1175,
[2] = 1200,
[3] = 1225,
[4] = 1250,
[5] = 1300,
[6] = 1325,
[7] = 1350,
[8] = 1400,
[9] = 1425,
[10] = 1450,
[11] = 1500,
},
}

local markersFactionPayment={
{-1867.68, 812.64, 35.17,0,0},
}

for i,v in ipairs(markersFactionPayment) do
local marker=createMarker(v[1], v[2], v[3]-1, "cylinder", 2, 0, 144, 255,255)
setElementInterior(marker, v[4])
setElementDimension(marker, v[5])
setElementData(marker,"marker:text","frakcje")
setElementData(marker,"marker:downtext","Odbieranie pensji")
end

addEventHandler("onMarkerHit", resourceRoot, function(el,md)
if not md or getElementType(el) ~= "player" then return end
local uid=getElementData(el,"player:uid")
if not uid then return end
local result=exports["dmta_db"]:dbGet("SELECT * FROM dmta_factions WHERE uid=? LIMIT 1;", uid...
3. Wypłata
[lua]function wyplata()
local allPlayers = getElementsByType("player")
for index,value in ipairs(allPlayers) do
givePlayerMoney(value,100)
dxDrawRectangle(1454, 28, 441, 446, tocolor(9, 0, 0, 111), false)
dxDrawLine(1453, 63, 1895, 63, tocolor(226, 219, 46, 244), 2, false)
dxDrawText("Wyp?‚ata", 1477, 31, 1862, 63, tocolor(255, 255, 255, 255), 2.00, "sans", "center", "top", false, false, false, false, false)
dxDrawText("Wyp?‚ata dla ciebie wynosi:n 100$", 1457, 70, 1885, 112, tocolor(255, 255, 255, 255), 1.70, "default-bold", "center", "center", false, false, false, false, false)
dxDrawImage(1454, 399, 85, 75, ":SL-Marker/shrp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText("Op?‚ata za Nieruchomo?›?‡:n 0$", 1457, 140, 1885, 182, tocolor(255, 255, 255, 255), 1.70, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Op?‚ata za Pojazdy:n 0$", 1457, 201, 1885, 243, tocolor(255, 255, 255, 255), 1.70, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Op?‚ata za Ubezpieczenie:n 0$", 1457, 268, 1885, 310, tocolor(255, 255, 255, 255), 1.70, "default-bold", "center", "center", fal...
4. Wypłata frakcji
Przy odebraniu wyplaty kasa idzie do eq (99mln tego) a chce zeby sz?a do banku ;/

S:
[lua]local factions = {
["SAPD"] = 800000,
["SAFD"] = 800000,
["SAMD"] = 800000,
["SARA"] = 800000,
}

function getwyplata(el,md)
local uid = getElementData(el,"player:sid")
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_factions WHERE sid=?", uid)
if #result > 0 then
if factions[result[1].code] then
if getElementData(el,"player:workinjob") and getElementData(el,"player:workinjob") >= 60 then
local money = (factions[result[1].code] * getElementData(el,"player:workinjob"))
local czas = getElementData(el,"player:workinjob")
setElementData(el,"player:workinjob",0)
exports["pystories-db"]:dbSet("UPDATE pystories_users SET worker=? WHERE id=?", "0", getElementData(el, "player:sid"))
outputChatBox("Trwa przetwarzanie twoich danych...", el)
setTimer ( function()
setElementData(el,"player:workinjob",0)
exports["pystories-db"]:dbSet("UPDATE pystories_users SET worker=? WHERE id=?", "0", getElementData(el, "player:sid"))
exports["pystories-db"]:dbSet("UPDATE pystories_factions SET wyplat=wyplat+?, ostatnia_wyplata=now() WHERE sid=?", money, getElementData(el, "player:...
5. Wypłata z pracy i punkty GP
Witam ot?? mam taki problem ze za jedno paczk? powinno mi dawa? 15 euro + 1 GP
i pieni?dze si? powinny odbiera? w urz?dzie a GP powinno dawa? odrazu a nie daje.
[b]Kawa?ek kodu(c)[/b]
[lua]
destroyElement(blip)
setElementFrozen(el, true)
setTimer(function()
setElementFrozen(el, false)
outputChatBox("[ Informacja ] Skrzynia dostarczona, swoje pieni?dze mo?esz odebra? w urzedzie.( +15 euro oraz 1 GP )")
destroyElement(skrzynia)
destroyElement(cel)
setPedAnimation(localPlayer, false)
toggleControl("sprint", true)
setElementData(el, "gracz_praca", false)
local pkt = getElementData(el, "szacunek")
local wyplata = getElementData(el,"gracz_wyplata")
setElementData(el,"gracz_wyplata", wyplata + 15)
setElementData(el, "szacunek", pkt + 1)
end, 9000, 1)
end)
else
outputChatBox(" Posiadasz aktywn? prac?.")
end
end)
[/lua]
[b]Kod na wyp?aty w urz?dzie(s)[/b]
[lua]
local wyplaty = createMarker(-169.84,-6694.25,14.24, "cylinder", 2.0, 255, 0, 0, 0)
setElementDimension(wyplaty, 0)
setElementInterior(wyplaty, 0)

function Wyplatyxd(source)
if getElementType(source) ~= "player" then return end
local pieniadze = getElementData(sourc...
6. Nie dziala panel i wypłata
Witam mam paczk? OwnWorld i tak sobi? testuje ale mam problem z panelem frakcji i wyp?at? z frakcji

Kod na panel frakcji ze strony clienta:

...


Kod na panel frakcji ze strony servera:

...


Kod na wyp?aty strona servera:

...


Kod podam na priv jak b?dzie trzeba
Prosz? o pomoc! Stawiam zimne :piwo: i respekt!
7. Wypłata z frakcji
Witam mam problem z tym kodem chodzi o to ?eby graczowi si? wyp?ata nalicza?a od momentu wej?cia na serwer
[lua]function kasa1() --Policja
local accName = getAccountName(getPlayerAccount(source))
if isObjectInACLGroup("user."..accName, aclGetGroup("Policja")) then
setTimer(function()
givePlayerMoney(source, 5000)
outputChatBox("[FRAKCJA] Otrzymujesz 5000z? z grupy SAPD!",source, 255,255,255, true)
end,3600000,0)
end
end
addEventHandler("onPlayerJoin", getRootElement(), kasa1)

function kasa2() --Pogotowie
local accName = getAccountName(getPlayerAccount(source))
if isObjectInACLGroup("user."..accName, aclGetGroup("SAMC")) then
setTimer(function()
givePlayerMoney(source, 5000)
outputChatBox("[FRAKCJA] Otrzymujesz 5000z? z grupy SAMC!",source, 255,255,255, true)
end,3600000,0)
end
end
addEventHandler("onPlayerJoin", getRootElement(), kasa2)

function kasa2() --PSP
local accName = getAccountName(getPlayerAccount(source))
if isObjectInACLGroup("user."..accName, aclGetGroup("PSP")) then
setTimer(function()
givePlayerMoney(source, 5000)
outputChatBox("[FRAKCJA] Otrzymujesz 5000z? z grupy PSP!",source, 255,255,255, true)
end,3600000,0)
end
end
addEventHandler("onPlayer...
8. Wypłata
Witam mam pytanie/problem czy da si? przerobi? ten skrypt:
function kasa1() 
for 
_,v in ipairs getElementsByType("player") ) do 
local accName getAccountName getPlayerAccount ) )
if 
isObjectInACLGroup ("user."..accNameaclGetGroup "Policja" ) ) then  
givePlayerMoney 
(v5000
outputChatBox("[FRAKCJA] Otrzymujesz 5000z? z grupy SAPD!",v0,0,0true
end 
end 
end 
setTimer 
kasa13600000)

function 
kasa2() 
for 
_,v in ipairs getElementsByType("player") ) do 
local accName getAccountName getPlayerAccount ) )
if 
isObjectInACLGroup ("user."..accNameaclGetGroup "SAMC" ) ) then  
givePlayerMoney 
(v5000
outputChatBox("[FRAKCJA] Otrzymujesz 5000z? z grupy SAMC!",v0,0,0true
end 
end 
end 
setTimer 
kasa23600000)

chodzi mi o to ?eby mo?na by?o bra? wyp?at? w markerze
9. Wypłata
Witajcie jak doda? ?eby w pracy dostawa?o si? wyp?at?, kt?r? mo?na odebra? w urz?dzie w markerze?

Kod na wyp?at?:
[lua]
--[[
Resource: OURGame
Developers: Split <[email protected]>
Copyright <[email protected]> 2015-2016
You have no right to use this code without my permission.
]]

local marker=createMarker(361.830078125, 173.5615234375, 1008.3828125-1.00, "cylinder", 1, 255, 0, 0)
setElementDimension(marker, 1561)
setElementInterior(marker, 3)

local t=createElement("text")
setElementData(t,"name","Odbieranie wyp?aty.")
setElementDimension(t, 1561)
setElementInterior(t, 3)
setElementPosition(t, 362.03515625, 173.6376953125, 1008.3828125)

local sx,sy=guiGetScreenSize()
local w,h=1280,720
local office_value=nil

function onRenderWeave()
if not office_value then return end
dxDrawRectangle(348/w*sx, 123/h*sy, 629/w*sx, 43/h*sy, tocolor(45, 114, 209, 212), false)
dxDrawRectangle(348/w*sx, 166/h*sy, 629/w*sx, 342/h*sy, tocolor(0, 0, 0, 212), false)
dxDrawText("Odbieranie wyp?aty", 350/w*sx, 122/h*sy, 977/w*sx, 166/h*sy, white, 1.00, "bankgothic", "center", "center", false)
dxDrawText("Twoja wyp?ata wynosi: "..office_value.." PLNnAby j? odebrac kliknij SPACJE", 360/w*sx, 180/h*sy, 967/w*sx, 494/h*sy, white, 2.00, "default-bold", "center", "center", false)
end

function onSelected...
10. Wypłata
Witam ponownie, napisa?em sobie skrypcior na wyp?aty jednak?e mam pewien problem.. chcia?em doda? takie co? ?e je?li gracz wbija to po prostu startuje mu timer godzinny.. jednak?e je?li wbije jakikolwiek gracz to grupa SAPD otrzymuje wyp?ate.
kodzik:
[lua]
function kasa1()
for _,v in ipairs ( getElementsByType("player") ) do
local accName = getAccountName ( getPlayerAccount ( v ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Posterunkowy" ) ) then
givePlayerMoney (v, 1500)
outputChatBox("[FRAKCJA] Otrzymujesz 1500$ z grupy SAPD!",v, 255,255,255, true)
end
end
end
setTimer ( kasa1, 3600000, 0 )
addEventHandler ( "onPlayerJoin", getRootElement(), kasa1 )

function kasa2()
for _,v in ipairs ( getElementsByType("player") ) do
local accName = getAccountName ( getPlayerAccount ( v ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Sierzant" ) ) then
givePlayerMoney (v, 1800)
outputChatBox("[FRAKCJA] Otrzymujesz 1800$ z grupy SAPD!",v, 255,255,255, true)
end
end
end
setTimer ( kasa2, 3600000, 0 )
addEventHandler ( "onPlayerJoin", getRootElement(), kasa2 )

function kasa3()
for _,v in ipairs ( getElementsByType("player") ) do
local accName = getAccountName ( getPlayerAccount ( v ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "StarszySierzant" ) ) then
givePlayerMoney (v, ...
11. [INNE] Blokowanie aut na firmę i automatyczna wypłata i poli
Witam czy mo?ecie mi powiedzie? jak zablokowa? pojazdy ?eby dana firma mog?a je?dzi? nimi?


Czy macie mo?e jaki? skrypt albo tut jak go napisa?:
Dany gracz gra na skinie np. 1h dostaje wyp?at? np. 5 score 1000$
a gdy nie gra na skinie to nie zalicza mu czasu.


i plugin dla policji ?e po wpisaniu np. /kajdanki gracz zostaje skuty i poda?? za policjantem. i jak policjant wsiada do auta to gracz gracz ?eby m?g? zawie?? go do wiezienia.