I have been trying to change the ULX votebanning system to work with SourceMod I changed
local function voteBanDone2( t, target, time, ply )
local shouldBan = false
if t.results[ 1 ] and t.results[ 1 ] > 0 then
ulx.logUserAct( ply, target, "#A approved the voteban against #T (" .. time .. " minutes)" )
shouldBan = true
else
ulx.logUserAct( ply, target, "#A denied the voteban against #T" )
end
if shouldBan then
ULib.kick( target, "Vote ban successful." )
ULib.ban( target, time )
end
end
To
local function voteBanDone2( t, target, time, ply )
local shouldBan = false
if t.results[ 1 ] and t.results[ 1 ] > 0 then
ulx.logUserAct( ply, target, "#A approved the voteban against #T (" .. time .. " minutes)" )
shouldBan = true
else
ulx.logUserAct( ply, target, "#A denied the voteban against #T" )
end
if shouldBan then
game.ConsoleCommand("sm_ban "..target.." 10 Votebanned\n")
ULib.kick( target, "Vote ban successful." )
--ULib.ban( target, time )
end
end
Hoping it would work but unfortunately it didnt. I am not familiar with LUA scripting and any help doing this would be much appreciated.