Witam. M?j problem pochodzi o tym ?e... na serwerze dzia?a premka a org nie a jak zabiore komus prawo jazdy to moze wsiadac do pojazdu wszystko wgra?em modu? tez owszem mam wgrany nwm o co chodzi a acl itd mam tez dodane /k i /b tez dziala :?
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
-- Settings
function pobierzDate(type,time)
realTime=getRealTime()
type=tostring(type)
time=tonumber(time)
if time < 0 then return end
if type == "m" then if time > 59 then return end value1=realTime.minute+time else value1=realTime.minute end
if type == "h" then if time > 23 then return end value2=realTime.hour+time else value2=realTime.hour end
if type == "d" then if time > 31 then return end value3=realTime.monthday+time else value3=realTime.monthday end
if type == "w" then if time > 11 then return end value4=realTime.month+time else value4=realTime.month end
if value1 >= 60 then value1 = value1-60; value2=value2+1 end
if value2 >= 24 then value2 = value2-24; value3=value3+1 end
if value3 >= 31 then value3 = value3-31; value4=value4+1 end
date=string.format("%04d-%02d-%02d ", realTime.year+1900, value4+1, value3)
time=string.format("%02d:%02d:%02d", value2, value1, realTime.second)
--outputChatBox(date..time,root)
return date..time
end
rangi = {
[5] = "Developer",
[4] = "Zalozyciel NLife",
[3] = "Administrator RCON",
[2] = "Administrator",
[1] = "Support",
}
addCommandHandler('e', function(plr,cmd, ...)
if getAdmin(plr,1) or getAdmin(plr,2) or getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5) then
if not ... then
local x = getElementData(plr,"player:ekipaoff")
if x == false then
outputChatBox("Wy??czy?e? czat ekipy",plr, 255, 255, 0, true)
setElementData(plr,"player:ekipaoff",true)
end
if x == true then
outputChatBox("W??czy?e? czat ekipy",plr, 255, 255, 0, true)
setElementData(plr,"player:ekipaoff",false)
end
return end
if ... then
if getElementData(plr,"player:ekipaoff") == true then outputChatBox("Posiadasz wy??czone wiadomo?ci tego czatu, nie mo?esz na nim pisa?!", plr, 255, 255, 255) return end
local msg=table.concat({...}, " ")
ranga = nil
local rank = getVisualRank(plr)
if rank then
ranga = rank
else
ranga = rangi[tonumber(getLevel(plr))]
end
for _, p in pairs(getElementsByType('player')) do
if getAdmin(p,1) or getAdmin(p,2) or getAdmin(p,3) or getAdmin(p,4) or getAdmin(p,5) and not getElementData(p,"player:ekipaoff") then
outputChatBox("[Czat ekipy]"..getPlayerName(plr).." ("..tonumber(getElementData(plr,"id"))..")".."|"..ranga..": #ffffff"..msg,p,60,172,120,true)
end
end
end
end
end)
-- Truj
addCommandHandler("syrena", function(plr,cmd)
if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5) then
local vehicle=getPedOccupiedVehicle(plr)
if not vehicle then return end
removeVehicleSirens(vehicle)
addVehicleSirens(vehicle, 4, 2, true, false, true, false )
setVehicleSirens(vehicle, 1, -0.600, -2.100, 0.400, 255, 0, 0, 255, 255 )
setVehicleSirens(vehicle, 2, 0.600, -2.100, 0.400, 0, 0, 255, 255, 255 )
setVehicleSirens(vehicle, 3, -0.600, 1.100, 0.400, 255, 0, 0, 255, 255 )
setVehicleSirens(vehicle, 4, 0.600, 1.100, 0.400, 0, 0, 255, 255, 255 )
end
end)
addCommandHandler("c", function(plr,cmd,...)
if getAdmin(plr,4) or getAdmin(plr,5) then
local text=table.concat({...}, " ")
outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 64, 96, 224,true)
end
end)
addCommandHandler("r", function(plr,cmd,...)
if getAdmin(plr,3) or getAdmin(plr,4) then
local text=table.concat({...}, " ")
outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 100, 0, 0,true)
end
end)
addCommandHandler("a", function(plr,cmd,...)
if getAdmin(plr,2) or getAdmin(plr,3) or getAdmin(plr,4) then
local text=table.concat({...}, " ")
outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 255, 0, 0,true)
end
end)
addCommandHandler("s", function(plr,cmd,...)
if getAdmin(plr,1) or getAdmin(plr,3) or getAdmin(plr,4) then
local text=table.concat({...}, " ")
outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 0, 102, 0,true)
end
end)
addCommandHandler("notification", function(plr,cmd,tyr,...)
if getAdmin(plr,3) or getAdmin(plr,4) then
if not ... or not tyr then triggerClientEvent(plr,"addNotification",root,"Wpisz /notification [error/success/warning/info] (tekst) ","error") return end
local text=table.concat({...}, " ")
for _, p in pairs(getElementsByType('player')) do
triggerClientEvent(p,"addNotificatione",root,text,tyr)
end
end
end)
addCommandHandler("ninfo", function(plr,cmd,...)
if getAdmin(plr,3) or getAdmin(plr,4) then
if not ... then triggerClientEvent(plr,"addNotification",root,"Wpisz /ninfo (tekst) ","error") return end
local text=table.concat({...}, " ")
for _, p in pairs(getElementsByType('player')) do
triggerClientEvent(p,"addNotificatione",root,text,"info")
end
end
end)
-- Komendy rcon?w
addCommandHandler("przepisz.gracz", function(plr,cmd,value)
if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5) then
local veh=getPedOccupiedVehicle(plr)
if not veh then
outputChatBox("* Nie siedzisz w poje?dzie.", plr, 255, 0, 0)
return
end
setElementData(veh,"vehicle:ownedPlayer",tonumber(value))
outputChatBox("* Przepisa?e?(a?) pojazd do gracza: "..value, plr)
end
end)
addCommandHandler("przepisz.offline", function(plr,cmd,pojazd,uid)
if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5) then
if not pojazd or not tonumber(pojazd) then
outputChatBox("U?yj: /przepisz.offline <id pojazdu><uid>", plr)
return
end
if not uid or not tonumber(uid) then
outputChatBox("U?yj: /przepisz.offline <id pojazdu><uid>", plr)
return
end
pojazd=tonumber(pojazd)
uid=tonumber(uid)
local result = exports['ogrpg-db']:dbGet("SELECT ogrpg_vehicles.*,ogrpg_users.login FROM ogrpg_vehicles left join ogrpg_users on ogrpg_users.id=ogrpg_vehicles.ownedPlayer WHERE ogrpg_vehicles.id=? and parking=1",pojazd)
if not result or #result < 1 then
outputChatBox("*Nie znaleziono pojazdu lub nie jest w przechowalni!",plr)
return end
local model = exports['ogrpg-db']:dbGet("UPDATE ogrpg_vehicles set ownedPlayer=? where id=?",uid,pojazd)
exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_logs (name,data) VALUES (?,NOW())", "Przepiszanie pojazdu o id >"..pojazd.." na gracza uid > "..uid)
outputChatBox("**Przepisanie auta o id"..pojazd.." na gracza "..uid,plr)
end
end)
addCommandHandler("daj.kase", function(plr,cmd,cel,value)
if getAdmin(plr,4) or getAdmin(plr,5) then
if not cel or not tonumber(value) then
outputChatBox("* U?ycie: /daj.kase <nick/ID> <koszt>", plr)
return
end
local target=exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
givePlayerMoney(target, value)
outputChatBox("* Otrzyma?e?(a?) od systemu "..value.." PLN", target)
outputChatBox ("Nada?e? "..value.." PLN dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
end
end)
addCommandHandler("daj.ogp", function(plr,cmd,cel,value,...)
if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5) then
local reason=table.concat({...}, " ")
if not cel or not tonumber(value) then
outputChatBox("* U?ycie: /daj.ogp <nick/ID> <ilosc>", plr)
return
end
local target=exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET reputation=? WHERE id=?", getElementData(target,"player:reputation")+value, getElementData(target, "player:uid"))
setElementData(target,"player:reputation", getElementData(target,"player:reputation")+value)
outputChatBox("* Otrzyma?e?(a?) "..value.." Reputacji!", target)
outputChatBox ("Nada?e? "..value.." reputacji dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
triggerClientEvent(root, "admin:rendering2", root, "* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") zosta?(a) nagrodzony punktami REPUTACJI(+"..value..") przez ' "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." ' z powodu: "..reason.."")
exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_reputa (uid,kto_dostal,kto_dal,ilosc,powod) VALUES (?,?,?,?,?)", getElementData(target,"player:uid"), getPlayerName(target):gsub("#%x%x%x%x%x%x",""), getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), value, reason)
end
end)
-- Komendy admin?w
addCommandHandler("jp", function(plr,cmd)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) then
if isPedInVehicle(plr) then
removePedFromVehicle(plr)
end
if doesPedHaveJetPack(plr) then
removePedJetPack(plr)
else
givePedJetPack(plr)
end
end
end)
-- komendy support?w
addCommandHandler("przeladuj", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("* U?ycie: /przeladuj <nick/ID>", plr)
return
end
local target=exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
triggerEvent("save:player",root,target)
triggerEvent("load:player",root,target)
end
end)
addCommandHandler("wczytaj", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("* U?ycie: /wczytaj <nick/ID>", plr)
return
end
local target=exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
triggerEvent("load:player",root,target)
end
end)
addCommandHandler("zapisz", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("* U?ycie: /wczytaj <nick/ID>", plr)
return
end
local target=exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
triggerEvent("save:player",root,target)
end
end)
addCommandHandler("przeladujall", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,3) 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 przeladowal wszystkim statystyki", root, 21,0,170,true)
end
end)
addCommandHandler("zapiszall", function(plr,cmd)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5) then
for i,v in ipairs(getElementsByType("player")) do
if isElement(v) then
triggerEvent("save:player",root,v)
end
end
outputChatBox("* Administrator zapisal wszystkim statystyki", root, 21,0,170,true)
end
end)
addCommandHandler("rozdajpienionzki", function(plr,cmd,pinion)
if not pinion then return end
if not tonumber(pinion) then return end
if getAdmin(plr,4) or getAdmin(plr,5) then
for i,v in ipairs(getElementsByType("player")) do
if isElement(v) then
givePlayerMoney(v,pinion)
end
end
outputChatBox("* Administrator doda? ka?demu graczowi "..pinion.." PLN", root, 255,0,0,true)
end
end)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach