Witam serdecznie, co mo??e by?? nie tak z zpj poniewa?? gdy chce komus da? prawko to pisze ,,Nie mo?na ?abrac prawa jazdy graczowi o SID 1"
addCommandHandler("zpj", function(plr,cmd,cel,time,type,...)
if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) then
local reason=table.concat({...}, " ")
if not cel or not tonumber(time) or not type or not reason then
exports['al_notify']:addNotification(plr, 'admin', 'Komendy Administracyjne', "/zpj [nick/id] [czas] [m/h/d] [powod]", {25, 175, 255})
return
end
local target=exports["dmta_core"]:findPlayer(plr,cel)
if not target then
exports['al_notify']:addNotification(plr, 'admin', 'Komendy Administracyjne', "Nie znaleziono gracza", {25, 175, 255})
return
end
if isPedInVehicle(target) then
removePedFromVehicle(target)
end
if getAdmin(target, 5) then
target = plr
end
if getElementData(target,"player:uid") == 1 or 2 then exports['al_notify']:addNotification(plr, 'admin', 'Komendy Administracyjne', "Nie można zabrać prawo jazdy graczowi o SID: 1 !", {25, 175, 255}, plr) return end
result=pobierzDate(type,time)
exports["dmta_db"]:dbSet("INSERT INTO dmta_punish (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSerial(target), reason, result, "A")
exports["dmta_db"]:dbSet("INSERT INTO dmta_punis... |