Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addCommandHandler("p", function(plr,cmd,...)
- if getAdmin(plr,6) or getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,2) or getAdmin(plr,1) then
- local text=table.concat({...}, " ")
- outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 16, 255, 0,true)
- outputServerLog('Chat /p> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
- end
- end)
- addCommandHandler("s", function(plr,cmd,...)
- if getAdmin(plr,4) then
- local text=table.concat({...}, " ")
- outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 66, 119, 244,true)
- outputServerLog('Chat /ü> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
- end
- end)
- addCommandHandler("o", function(plr,cmd,...)
- if getAdmin(plr,5) or getAdmin(plr,4) then
- local text=table.concat({...}, " ")
- outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 153, 190, 229,true)
- outputServerLog('Chat /o> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
- end
- end)
- -- Komendy rconów
- addCommandHandler("przepisz.gracz", function(plr,cmd,value)
- if getAdmin(plr,4) or getAdmin(plr,5) then
- local veh=getPedOccupiedVehicle(plr)
- if not veh then
- outputChatBox("#bf0101(✖) #FFFFFFNie siedzisz w pojeździe.", plr, 255,255,255, true)
- return
- end
- setElementData(veh,"vehicle:ownedPlayer",tonumber(value))
- outputChatBox("#06B200(✔) #FFFFFFPrzepisałeś(aś) pojazd do gracza: "..value, plr, 255,255,255, true)
- --outputServerLog('Komenda /przepisz.gracz> Gracz '..getPlayerName(plr):gsub('#%x%x%x%x%x%x','')..' przepisał pojazd na Gracza o UID: '..value..' '))
- end
- end
- addCommandHandler("aconf", function(plr,cmd,name,value)
- if getAdmin(plr,4) and name and value then
- setServerConfigSetting(tostring(name),tostring(value),false)
- end
- end)
- function pobierzOrga (plr,cmd,cel,nazwa)
- if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 3 or getElementData(plr,"player:sid") == 433 then
- if not cel or not nazwa then outputChatBox("* Użyj /stworz.organizacje <id/nick lidera> <nazwa>", plr) return end
- local target=exports["pystories-core"]:findPlayer(plr,cel)
- if not target then
- outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
- return
- end
- outputChatBox("#06B200(✔) #FFFFFFZałożono organizacja dla "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." o nazwie "..nazwa.."",plr, 255,255,255, true)
- outputChatBox("#06B200(✔) #FFFFFFOtrzymałeś organizacje "..nazwa.." od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..".",target, 255,255,255, true)
- local name = getPlayerName(target):gsub("#%x%x%x%x%x%x","")
- exports["pystories-db"]:dbSet("INSERT INTO ms_organizacje (code,uid,login,rank) VALUES (?,?,?,4)", nazwa, getElementData(target,"player:sid"), name)
- setElementData(target,"player:organization",nazwa)
- --takePlayerMoney(target,25000)
- end
- end
- addCommandHandler("stworz.organizacje",pobierzOrga)
- function pobierzDomki (plr,cmd,id,nazwa)
- if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 4 or getElementData(plr,"player:sid") == 44 then
- if not id or not nazwa then outputChatBox("* Użyj /dom <id> <nazwa>", plr) return end
- local x,y,z=getElementPosition(plr)
- kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
- outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
- exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,221,15000)", id, nazwa, id, kordy, kordy)
- end
- end
- addCommandHandler("dom",pobierzDomki)
- function pobierzDomki (plr,cmd,id,nazwa)
- if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 538 or getElementData(plr, "player:sid") == 162 then
- if not id or not nazwa then outputChatBox("* Użyj /dom.1 <id> <nazwa>", plr) return end
- local x,y,z=getElementPosition(plr)
- kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
- outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
- exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,31,25000)", id, nazwa, id, kordy, kordy)
- end
- end
- addCommandHandler("dom.1",pobierzDomki)
- -- Komendy adminów
- function xd(gracz)
- local rep = getElementData(gracz, "player:rep")
- outputDebugString("Ilość REP: "..tonumber(rep))
- end
- addCommandHandler("checkrp", xd)
- addCommandHandler("jp", function(plr,cmd)
- if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,6) then
- if isPedInVehicle(plr) then
- removePedFromVehicle(plr)
- end
- if doesPedHaveJetPack(plr) then
- removePedJetPack(plr)
- outputChatBox ("#bf0101(✖) #FFFFFFZabrałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
- else
- givePedJetPack(plr)
- outputChatBox ("#007aff(ⓘ) #FFFFFFOtrzymałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
- end
- end
- end)
- addCommandHandler("ch.niewidka", function(plr,cmd)
- if getAdmin(plr,4) or getAdmin(plr, 5) then
- if not getElementData(plr, "p:inv") then
- setElementData(plr, "p:inv", true)
- outputChatBox("* Włączyłeś system niewidki, nikt Cię nie widzi !", plr, 255,255,255)
- else
- setElementData(plr, "p:inv", false)
- outputChatBox("* Wyłączyłeś system niewidki, każdy Cię widzi !", plr, 255,255,255)
- end
- end
- end)
- addCommandHandler("tune", function(plr,cmd,cel,value)
- if getAdmin(plr,4) or getAdmin(plr,3) then
- if not cel or not tonumber(value) then
- outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /tune <nick/ID> <id>", plr, 255,255,255, true)
- return
- end
- local target=exports["pystories-core"]:findPlayer(plr,cel)
- if not target then
- outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255,255,255, true)
- return
- end
- local veh=getPedOccupiedVehicle(target)
- addVehicleUpgrade(veh,value)
- outputChatBox("#007aff(ⓘ) #FFFFFFDo twojego pojazdu dodano tuning, o id: "..value.."", target, 255,255,255, true)
- outputChatBox("#06B200(✔) #FFFFFFDodałeś(aś) tuning ID "..value.." do pojazdu gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
- end
- end)
- addCommandHandler("przeladuj", function(plr,cmd,cel,...)
- if getAdmin(plr,4) or getAdmin(plr,5) then
- local reason=table.concat({...}, " ")
- if not cel or not reason then
- outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /przeladuj <nick/ID>", plr,255,255,255, true)
- return
- end
- local target=exports["pystories-core"]:findPlayer(plr,cel)
- if not target then
- outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
- return
- end
- triggerEvent("save:player",root,target)
- triggerEvent("load:player",root,target)
- outputChatBox("#06B200(✔) #FFFFFFPrzeładowano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr,255,255,255, true)
- end
- end)
- addCommandHandler("psr.all", function(plr,cmd)
- if getAdmin(plr,4) then
- for i,v in ipairs(getElementsByType("player")) do
- if isElement(v) then
- triggerEvent("save:player",root,v)
- end
- end
- outputChatBox("#06B200(✔) #FFFFFFAdministrator zapisał wszystkim statystyki.", root, 255,255,255, true)
- end
- end)
- addCommandHandler("przeladuj.all", function(plr,cmd,cel,...)
- if getAdmin(plr,4) or getAdmin(plr,5) then
- for i,v in ipairs(getElementsByType("player")) do
- if isElement(v) then
- triggerEvent("save:player",root,v)
- triggerEvent("load:player",root,v)
- end
- end
- outputChatBox("* Administrator przeładował wszystkim statystyki.", root, 21,0,170,true)
- end
- end)
- addCommandHandler("wczytaj", function(plr,cmd,cel,...)
- if getAdmin(plr,4) or getAdmin(plr,5) then
- local reason=table.concat({...}, " ")
- if not cel or not reason then
- outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /wczytaj <nick/ID>", plr, 255,255,255, true)
- return
- end
- local target=exports["pystories-core"]:findPlayer(plr,cel)
- if not target then
- outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
- return
- end
- triggerEvent("load:player",root,target)
- outputChatBox("* Wczytano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr)
- end
- end)
- addCommandHandler("zapiszall", function(plr,cmd)
- if getAdmin(plr,4) or getAdmin(plr,3) then
- for i,v in ipairs(getElementsByType("player")) do
- if isElement(v) then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement