I tried making a fake ban ulx command, and it worked out really smooth (Considering all I had to do was remove the ban function and keep the echo)
But then I wanted to make it so that you can "ban" multiple players (Mainly for !fakeban *), but I couldn't get it to work. What am I doing wrong?
function ulx.fakeban( calling_ply, target_plys, minutes, reason )
if target_ply:IsBot() then
ULib.tsayError( calling_ply, "Cannot ban a bot", true )
return
end
local time = "for #i minute(s)"
if minutes == 0 then time = "permanently" end
local str = "#A banned #T " .. time
if reason and reason ~= "" then str = str .. " (#s)" end
ulx.fancyLogAdmin( calling_ply, str, target_plys, minutes ~= 0 and minutes or reason, reason )
end
local fakeban = ulx.command( CATEGORY_NAME, "ulx fban", ulx.fakeban, "!fakeban" )
fakeban:addParam{ type=ULib.cmds.PlayersArg }
fakeban:addParam{ type=ULib.cmds.NumArg, hint="minutes, 0 for perma", ULib.cmds.optional, ULib.cmds.allowTimeString, min=0 }
fakeban:addParam{ type=ULib.cmds.StringArg, hint="reason", ULib.cmds.optional, ULib.cmds.takeRestOfLine, completes=ulx.common_kick_reasons }
fakeban:defaultAccess( ULib.ACCESS_ADMIN )
fakeban:help( "Perform a fake ban on your target. User will not be banned, a chat message of the ban will pop up however" )
Basically nothing is happening