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
...
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...
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...
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]
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
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...
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??
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
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!
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
[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...
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.
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.
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.
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);