smigi
Wiek: 23 Na forum: 3367 dni Posty: 60
Nick w MP: smigi
Piwa : 2
Witam nie dziala mi zabieranie prawka niby w bazie sie zapisuje ale nadal mozna wsiadac do auta pystories-core i pystories-admin dodane do acl
tabela bazy sql
Cytat:
--
-- Struktura tabeli dla tabeli `pystories_punish`
--
CREATE TABLE `pystories_punish` (
`kolejnosc` int(11) NOT NULL,
`serial` text NOT NULL,
`reason` text CHARACTER SET utf8 NOT NULL,
`time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`type` text NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
funckja zpj
Cytat:
addCommandHandler("zpj", function(plr,cmd,cel,time,type,...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) then
local reason=table.concat({...}, " ")
if not cel or not tonumber(time) or not type or not reason then
outputChatBox("#ff0000✘ #ffffff- /zpj <ID> <czas> <m/h/y/w> <pow?d>", plr, 255, 252, 51,true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#ff0000✘ #ffffff- Nie znaleziono podanego gracza.", plr, 255, 252, 51,true)
return
end
if isPedInVehicle(target) then
removePedFromVehicle(target)
end
--if getElementData(target,"player:sid") == 2 then outputChatBox("* Nie mo?na zabra? prawo jazdy graczowi o SID: 1 !",plr) return end
result=pobierzDate(type,time)
triggerClientEvent(root, "admin:rendering", root, "* ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." otrzyma?(a) zakaz prowadzenia pojazd?w kat(ABC) od ["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..": "..reason.."("..time .. type ..")")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSerial(target), reason, result, "A")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSerial(target), reason, result, "B")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSerial(target), reason, result, "C")
outputChatBox(" ", target, 255, 252, 51)
outputChatBox(" ", target, 255, 252, 51)
outputChatBox("Otrzyma?e?(a?) zakaz prowadzenia pojazd?w od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."", target, 255, 0, 0)
outputChatBox(" ", target, 255, 252, 51)
outputChatBox("Pow?d: "..reason:gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255)
outputChatBox(" ", target, 255, 252, 51)
outputChatBox("Czas: "..time .. type .."", target, 255, 255, 255)
outputChatBox(" ", target, 255, 252, 51)
outputChatBox(" ", target, 255, 252, 51)
punishToDiscord('zpj', plr, target, reason, time, type)
outputConsole("[KARY] ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." otrzyma?(a) zakaz prowadzenia pojazd?w kat(ABC) od ["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..": "..reason.."("..time .. type ..")")
end
end)
Ostatnio zmieniony przez smigi 2020-03-27, 10:19, w całości zmieniany 1 raz