addEventHandler ("onPlayerJoin", root,function()
local query=string.format("SELECT * FROM ogrpg_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban", getPlayerSerial(source))
local result=exports["ogrpg-db"]:pobierzWyniki(query)
if (result) then
outputConsole("***********************",source)
outputConsole(string.format("Zostales zbanowany na serwerze! "),source)
outputConsole(string.format("Posiadasz Bana do "..result["time"]),source)
outputConsole(string.format("Posiadasz Bana za: "..result["reason"]),source)
outputConsole("***********************",source)
kickPlayer(source,string.format("Kliknij f8 aby zobaczyc wiecej informacji!"))
else
exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_ban WHERE type=? AND active=1 AND serial=?", "ban", getPlayerSerial(source))
end
B??d znalaz?em w ogrpg-core.
|