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łaty
1. Przy odbieraniu wypłaty z frakcji wyskakuje takie cos
[code]local Frakcje = {
["SAPD"] = 1000,
["SAFD"] = 1000,
["SARA"] = 1000,
}


local marker=createMarker(-1602.06, 775.84, 6.83, "cylinder", 1.2, 0,128,255,75)

addEventHandler("onMarkerHit", marker, function(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[0].code] then
if getElementData(el,"player:workinjob") and getElementData(el,"player:workinjob") >= 1 then
local money = (Frakcje[result[1].code] * getElementData(el,"player:workinjob"))
outputChatBox("?“?#ffffff Otrzymujesz "..money.." PLN za przepracowanych "..getElementData(el,"player:workinjob").." minut (Pieni?…dze trafi?‚y do bankomatu)!", el, 0, 144, 255, true)
exports["DB2"]:zapytanie("UPDATE pystories_users SET bank_money=bank_money+"..(tonumber(money) or 0).." WHERE id="..tonumber(sid).." LIMIT 1")
setElementData(el,"player:workinjob",0)
else
outputChatBox("?“?#ffffff Nie masz nic do odebrania!", el, 255, 0, 0, true)
end
else
outputChatBox("?“?#ffffff Nie jeste?› w frakcji, ktĂłra moĹĽe odbiera?‡ wyp?‚aty!", el, 255, 0, 0, true)
end
else
...
2. Wypłaty frakcyjne.
Witam umia?by kto? tak przerobi? skrypt, aby wyp?ata z frakcji zamiast i?? na konto do nas, aby sz?a na konto bankowe.

Baza danych: pystories

Skrypt:

[lua]local Frakcje = { ----- ILOSC PLNOW ZA 1 PRZEPRACOWANA MINUTE!!!!!!!!!!!!!!!!!!
["SAPD"] = 250000,
["SARA"] = 250000,
["CZF"] = 750000,
["SAMD"] = 250000,
}

local text=createElement('text')
setElementPosition(text,709.15,-117.29,4545.40+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,"playe...
3. Wypłaty frakcyjne
Siemka wyskakuje mi b??d kiedy pr?buje wyp?aci? kase pomoze ktos?

[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)
if result and #result > 0 then
local resulted...
4. brak doswiadczenia z zmiana wypłaty
Witam mam taki problem ze nie wiem gdzie jest zmiana wyp?aty frakcja mowie naprzyk?ad, ?e teraz sapd ma 1kk na minute a chce zeby by?o 5kk na minute w frakcjach typu [sapd,sara,safd] nie wiem gdzie to zmieni? za podpowiedz daje dobre zimne piwko,respekt
mi?ego <3 pozdrawiam -Carl
Napiszcie jaki folder i dalej se poradz? chyba, ?e wiecie co 5 to napiszcie tez plik
---------------------------------------------------------------------------------------------
https://zapodaj.net/036fa336b0347.png.html[color=orange][/color]
5. Wypłaty coś jest nie tak
Witam,napisa?em kod na wyp?aty z frakcji,gdy wgrywam jest wszystko dobrze nie ma ?adnego faila. Ale gdy ju? wejd? do urz?du pr?buj? nacisn?? przycisk "odbierz"
wtedy po prostu klikam ale nic mi nie daje do banko,ani do tzw. "portfela"
po prostu przycisk nie dzia?a
PS: robi?em aby wyp?aty sz?y do banku

[lua]local Frakcje = { ----- Ilosc pieniazkow za 1 przepracowana minute!!!!!!!
["SAPD"] = 750000,
["SARA"] = 750000,
["SAFD"] = 750000,
["SAMD"] = 750000,
["CZF"] = 750000,
}

local text=createElement ('text')
setElementPosition(text,709.15,-117.29,4545.40+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 nill
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 get...
6. Niedziałające wypłaty frakcyjne
Nie dzia?aj? mi wyp?aty frakcyjne
Db3:WARNING: [glowne]qg-wyplatyc.lua:55: Bad argument @ 'dxdrawtext' [Expected dx-font at argument 8, got boolean
7. Liczenie czasu i wydawanie wypłaty
Siemka, ot?? robie pewien skrypt i mam problem jak zrobi? aby liczy?o czas na "duty" i w markerze wydawalo hajs np. 10$ za 60sekund
A to duty nie jest takie normalne, tylko to jest tak ?e wchodz? w pickupa i daje mi skina i nadaje element date "SkinDuty"
Wie kto? jak pom?c, bo nie mam poj?cia jak sie za to zabra??
8. Wypłaty frakcyjne
Witam posiadam paczk? ITS'a t? najnowsz?.Chc? zrobi? wyp?aty dla frakcji zale?ne od rangi.Czyli np ranga inspektor zarabia 1000 a posterunkowy 100.Chodzi mi o taki system frakcji.Je?li kto? zna jakiego? GM z takim systemem to prosz? da? zna?.Najlepiej na GM itsa to zrobi?.Za pomoc browar :D
9. ban i wypłaty
Witam! Mam problem odno?nie Bana i Wyp?at z frakcji. Kiedy kogo? zbanuje np.

/b 1 1 m test

wyrzuca wtedy kogo? ale jak go wyrzuci pisze Zosta?es wyrzucony (zbanowany) czy jakos tak "Zosta?es Zbanowany po??cz sie ponownie" i mozna dalej wchodzi?

ogrpg-core
dutyadmin
wpisa?em do acl

i dalej nie dziala

a co do wyp?at z frakcji kiedy przepracuje za???my 1h nie dostaje wyp?aty pisze wtedy nie jestes w frakcji kt?ra mo?e otrzymywa? wyp?aty!


Jak to naprawi?? za dobre odpowiedzi daje :piwo:
10. Wypłaty w urzedzie za prace dorywcze
Witam chcialbym zrobic tak ze jak mam prace dorywcze np Magazynier to po pracy ide do urzedu wchodze w marker i dostaje kase kt?ra zarobi?em i nie wiem jak to zrobi? dok?adnie. Prosze o pomoc
11. Wypłaty dla Frakcji
Witam mam problem , ot?? wywala mi tak? b??d gdy chc? odebra? wyp?at?.
http://imgur.com/a/E2oWM

[lua]
local Frakcje = { ----- ILOSC PLNOW ZA 1 PRZEPRACOWANA MINUTE!!!!!!!!!!!!!!!!!!
["SAFD"] = 40,
}




local marker=createMarker(358.86,187.70,1007.2, "cylinder", 2, 255, 255, 0)
setElementInterior(marker,3)
setElementDimension(marker,1561)
local text=createElement('text')
setElementPosition(text,358.86,187.70,1008.2)
setElementData(text,"name","Tutaj odbierzesz wyp?ate z frakcji!")
setElementInterior(text,3)

addEventHandler("onMarkerHit", marker, function(el,md)
local uid = getElementData(el,"player:uid")
local result=exports["og-db"]:dbGet("SELECT * FROM og_factions WHERE uid=?", uid)
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"))
outputChatBox("Dostajesz "..money.." PLN 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)
e...
12. Timer, a skrypt wypłaty
Mam konkretne pytanie, czy taki skrypt b?dzie dzia?a? dla serwera w sensie, ?e gdy ustawi? tam czas na 1h to gracz kt?ry wejdzie b?dzie musia? czeka? t? godzin? czy wystarczy i? poczeka to co zosta?o, w jaki spos?b funkcjonuje timer.
Kod ten znajduje si? w S-side.
function payday()
    
outputChatBox("Nadszed? czas wyp?aty"getRootElement(), 255255255true)
end
setTimer
(payday50000)


Je?eli jednak nie dzia?a to w ten spos?b to w jaki m?g?bym to wykona? poniewa? chc? by co okre?lony czas dla ka?dego gracza przydziela?a si? okre?lona kwota a pojazdy kt?re okre?l? si? respawnowa?y. Pozdrawiam.

[ Dodano: 2016-04-12, 11:39 ]
mo?e event onResourceStart a w nim p?tla kt?ra co 60s dodaje 1 i gdy b?dzie 3600 wyzeruje si? wszystko i tak ca?y czas
13. Wypłaty dla frakcji w urzedzie
Witam chcia?bym zrobic skrypt na wyp?acanie kasy,np mam prace mech i co jeden dzien w realu jak wejd? do urzedu w marker pojawi mi sie informacja ze dosta?es wyp?ate 200e,tylko np ze jak nie jestem zatrudniony w zadnej frakcji mech/lakiernik to mi nie da wyplaty.

Za pomoc :piwo:
14. Wypłaty
Siemka, zrobi?em wyp?aty, lecz mam problem z ustaleniem gdzie wsadzi? timera, wpierdzieli?em go od tak, wi?c pokierujcie mnie co z nim zrobi?, a czy mo?e sam kod jest ?le.

Kod:

function hajsy(thePlayer)
wyplata = setTimer ( function()
for id, player in ipairs(getElementsByType("player")) do
local hajs = math.random(50,150)
outputChatBox("[System] Nadszed? czas wyp?aty ! Wyp?ata jest r?wna:"..hajs.."$")
givePlayerMoney ( thePlayer, amount )
function fnews ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Urzad" ) ) then
outputChatBox("[System] Dosta?e? dodatkowe 500$ i? jeste? Urz?dnikiem w Fort Carson Town Hall")
givePlayerMoney ( thePlayer, amount+500 )
else
function snews ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Urzad" ) ) then
outputChatBox("[System] Dosta?e? dodatkowe 500$ i? jeste? reporterem w Fort Carson News")
givePlayerMoney ( thePlayer, amount+500 )
else
killTimer(wyplata)
end
end,60000,0)
end
15. [INNE] Wypłaty dla danej frakcji
Witam tak jak w temacie chcia?bym wam pokaza? kod na wyp?ate dla dane frakcji jednak nie dzia?a on mi na serwerze nie wyskakuje mi ?aden komunikat
[code]SetTimer("botpts", 200000 , 1);
SetTimer("bottaxi", 240000 , 1);
SetTimer("botczysto", 240000 , 1);
SetTimer("botmed", 240000 , 1);
SetTimer("botptn", 240000 , 1);




forward botpts();
public botpts()
{
for(new playerid; playerid != GetMaxPlayers(); playerid++)
{
if(gTeam[playerid] == TEAM_POLICJA)
{
if(GetPVarInt(playerid, "policja") == 1)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, " {FFFFFF}Otrzymujesz wyp?at? za prac? w wysoko?ci {00E800}2 Score i 400$");
GivePlayerMoney(playerid, 400);
SetPlayerScore(playerid, GetPlayerScore(playerid)+2);
}
}
}
return 1;
}
forward botmed();
public botmed()
{
for(new playerid; playerid != GetMaxPlayers(); playerid++)
{
if(GetPVarInt(playerid, "policja") == 1)
{
if(gTeam[playerid] == TEAM_MEDYK)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "{FFFFFF}Otrzymujesz wyp?at? za prac? w wysoko?ci {00E800}2 Score i 400$");
GivePlayerMoney(playerid, 400);
SetPlayerScore(playerid, GetPlayerScore(playerid)+2);
}
}}
return 1;
}
forward bottaxi();
public bottaxi()
{
for(new playerid; playerid != GetMaxPlayers(); playerid++)
{
if(GetPVarInt(playerid, "poli...