Author Topic: Call halo.add in ulx?  (Read 3407 times)

0 Members and 1 Guest are viewing this topic.

Offline Aharon Tager

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
    • Barely Legal Gaming
Call halo.add in ulx?
« on: March 28, 2015, 06:31:02 PM »
Hey guys,
I've been working on this command for a little over a week, and I can't figure out how to fix this.
The purpose for the command was for calling out traitors who are delaying and making them glow like a wallhack to end the round faster.
I have a couple other ideas that I plan on developing and then releasing a command pack for TTT.

local CATEGORY_NAME = "Illuminati"
 
function ulx.illuminati( calling_ply, target_plys)
 
        for i=1, #target_plys do
                local v = target_plys[ i ]
 
                if v:IsRole(ROLE_TRAITOR) then
                local health = v:Health()
                v:SetHealth(health-5)
            //halo.Add({v}, Color(255, 0, 0), 0, 0, 2, true, true) This is where the error is

                ulx.fancyLogAdmin( calling_ply, "#A has prayed to the illuminati confirming #T as a Traitor!", target_plys )
 
                end
        end
end
local illuminati = ulx.command( CATEGORY_NAME, "ulx illuminati", ulx.illuminati, "!illuminati", true)
illuminati:addParam{ type=ULib.cmds.PlayersArg }
illuminati:defaultAccess( ULib.ACCESS_ADMIN )
illuminati:help( "Use on delaying traitors." )

An Error Has Occurred!

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