Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2020-09-28, 15:20


JanekBiznesu







Wiek: 38
Na forum: 2368 dni
Posty: 19
Nick w MP: JanekBiznesu



Respekt: 50

Witam, jest ktos w stanie mi pom?c z komendami? Gdy je wpisuje to na dole pokazuje ze osoba zostala wyrzucona z serwera/ dostala bana ale dalej jest na serwerze i tego bana nie ma. Na dole daje kody. Za pomoc stawiam zimne piwo.

function cmd_pkick(plr, cmd, target, ...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) then
if not target or not ... then
outputChatBox("Ⓘ #FFFFFFPrawid?owe u?ycie: /k <nick/ID> <pow?d>", plr, 255, 255, 0, true)
return
end
local player = exports["pystories-core"]:findPlayer(plr,target)
local text = table.concat({...}, " ")
if player then
--outputChatBox("*Nie mo?esz wykopa? RCON") then
triggerClientEvent(getRootElement(), "notiBig", getRootElement(), "Gracz "..getPlayerName(player):gsub("#%x%x%x%x%x%x","").." zostaje wykopany/a przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..text, text)
outputConsole(" ", player)
outputConsole("Zosta?e? wykopany z serwera!", player)
outputConsole("Osoba wyrzucaj?ca: "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), player)
outputConsole("Pow?d: "..text, player)
outputConsole(" ", player)
kickPlayer(player, getPlayerName(plr), "Sprawd? swoj? konsol? (~)")
end
end
end
addCommandHandler("k", cmd_pkick)





---------------------------------------------------------------------

addCommandHandler("pb", function(plr,cmd,cel,...)
if getAdmin(plr,3) or getAdmin(plr,2) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("Ⓘ #FFFFFFPrawid?owe u?ycie: /pb <nick/ID> <pow?d>", plr, 255, 255, 0, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("✘ #FFFFFFNie znaleziono podanego gracza.", plr, 255, 0, 0, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if getAdmin(target,3) then
outputChatBox(""..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."",target,255,0,0)
outputChatBox(""..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."",plr,255,0,0)
return end
local query=string.format("SELECT * FROM pystories_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban", getPlayerSerial(target))
local result=exports["DB2"]:pobierzWyniki(query)
if (result) then
return outputChatBox("* Gracz Posiada Bana do "..result["time"]..", za: "..result["reason"], plr, 255, 0, 0)
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_ban WHERE type=? AND active=1 AND serial=?", "ban", getPlayerSerial(target))
end

triggerClientEvent(getRootElement(), "notiBig", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zosta? zbanowany permanentnie przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..reason, reason)
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSerial(target), reason,"2030-12-31 23:59:59", "ban")
outputConsole("Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zosta? permanentnie zbanowany przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..", pow?d: "..reason)
kickPlayer(target,reason)
end
end)

----------------------------------

addCommandHandler("b", function(plr,cmd,cel,x,bantype,...)
if getAdmin(plr,3) or getAdmin(plr,2) then
local reason=table.concat({...}, " ")
if not cel or not tonumber(x) or not bantype or not reason then
outputChatBox("Ⓘ #FFFFFFPrawid?owe u?ycie: /b <nick/ID> <ilo??> <m/h/d> <pow?d>", plr, 255, 255, 0, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("✘ #FFFFFFNie znaleziono podanego gracza.", plr, 255, 0, 0, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if getAdmin(target,3) then
outputChatBox(""..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." Otrzyma?e? bana, je?li nie zgadzasz sie z nim napisz apelacje na naszym discordzie https://discord.gg/KhRdvXr ",target,255,0,0)
outputChatBox(""..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." Zosta? zbanowany.",plr,255,0,0)
return end
if bantype=="m" or bantype=="h" or bantype=="d" then
if bantype=="m" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),reason, x, "ban")
end
if bantype=="h" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),reason, x, "ban")
end
if bantype=="d" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),reason, x, "ban")
end
end
triggerClientEvent(getRootElement(), "notiBig", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zosta? zbanowany przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..reason.." na "..x.." "..bantype, text)
kickPlayer(target,plr,"Zosta?e?(a?) zbanowany(a), po??cz si? ponownie.")
outputConsole("Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zosta? zbanowany przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." ("..x .. bantype ..") pow?d: "..reason)
end
end)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-09-28, 15:35


TOPLik







Wiek: 36
Na forum: 3748 dni
Posty: 10

Piwa: 1

Respekt: 10

do acl w grupie Admin musisz dodac <object name="resource.*"></object> i powinno dzialac

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
JanekBiznesu
Wysłany: 2020-09-28, 15:48


vAnimo

Zielony w luła






Wiek: 19
Na forum: 2312 dni
Posty: 165
Nick w MP: vAnimo

Piwa: 882

Respekt: 70

do acl.xml w grupie admins dodaj <object name="resource.pystories-admins">
lub mo?esz te? doda? to przez panel admina nie zapomnij o podpi?ciu bazy danych!

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
JanekBiznesu
Wysłany: 2020-09-28, 15:51


JanekBiznesu







Wiek: 38
Na forum: 2368 dni
Posty: 19
Nick w MP: JanekBiznesu



Respekt: 50

Baza danych i wgl podpi?ta, wystarczy?o do ACL dopisa?. Dzieki panowie z pomoc, piwo postawione! Temat do zamkni?cia.

Postaw piwo autorowi tego posta
 

 
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku