[lua]addCommandHandler ( "lban", function ( plr, cmd, gracz, czas, rodzaj, ... )
if not isObjectInACLGroup ( "user."..getPlayerName ( plr ), aclGetGroup ( "RCON" ) ) then return end
if not gracz and not rodzaj and not czas and not ... or not gracz == nil or rodzaj == nil or czas == nil then
return outputChatBox ( "U?yj: /lban <gracz> <czas> <rodzaj : s,m,d,h> <pow?d>", plr ) end
player = getPlayerFromName(gracz)
if not player then return end
txt = table.concat ( {...}, " " )
outputChatBox ( "Gracz "..getPlayerName(player).." zosta?/a zbanowany/a przez "..getPlayerName(plr).."", root, 255, 0, 0 )
outputChatBox ( "Pow?d : "..txt, root, 255, 0, 0 )
if rodzaj == "s" then
rodzaj = "sekund"
czas1 = czas * 1
elseif rodzaj == "m" then
rodzaj = "minut"
czas1 = czas * 60
elseif rodzaj == "d" then
rodzaj = "dni"
czas1 = czas * 360
elseif rodzaj == "h" then
rodzaj = "godzin"
czas1 = czas * 60 * 60
end
outputChatBox ( "Czas: "..czas.." "..rodzaj.."", root, 255, 0, 0 )
banPlayer ( player, true, true, true, plr, txt, czas1 )
end)[/lua]
Je?eli dobrze wpisze komende na chacie sie all wy?wietla lecz w db3 jest...
WARRNING: Access den... |