ULX

Author Topic: Changing ULX Voteban to work with SourceMod  (Read 3148 times)

0 Members and 1 Guest are viewing this topic.

Offline Rambomst

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
Changing ULX Voteban to work with SourceMod
« on: June 13, 2010, 03:35:29 AM »
I have been trying to change the ULX votebanning system to work with SourceMod I changed
Code: [Select]
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
Code: [Select]
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.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given