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
...
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...
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:...
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...
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...
Witam mam pytanie/problem czy da si? przerobi? ten skrypt:
function kasa1()
for _,v in ipairs ( getElementsByType("player") ) do local accName = getAccountName ( getPlayerAccount ( v ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
givePlayerMoney (v, 5000) outputChatBox("[FRAKCJA] Otrzymujesz 5000z? z grupy SAPD!",v, 0,0,0, true) end
end
end
setTimer ( kasa1, 3600000, 0 )
function kasa2()
for _,v in ipairs ( getElementsByType("player") ) do local accName = getAccountName ( getPlayerAccount ( v ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "SAMC" ) ) then
givePlayerMoney (v, 5000) outputChatBox("[FRAKCJA] Otrzymujesz 5000z? z grupy SAMC!",v, 0,0,0, true) end
end
end
setTimer ( kasa2, 3600000, 0 )
chodzi mi o to ?eby mo?na by?o bra? wyp?at? w markerze
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.
]]
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, ...
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.