Author Topic: Trigger ULX Command with Command  (Read 1912 times)

0 Members and 1 Guest are viewing this topic.

Offline BLEEP_BLOOP

  • Newbie
  • *
  • Posts: 14
  • Karma: 1
Trigger ULX Command with Command
« on: February 23, 2015, 07:01:23 PM »
I am trying to make a simple code that allows me to do !build in-game to put the player in god and !kill to ungod the player. This is what I got so far:

Code: [Select]
local CATEGORY_NAME = "Utility"

timer.Create( "build", .3, 1, function( target_plys )
if Player:Alive() then
    RunConsoleCommand( "ulx god", Player:Name() ) end
end )
end

timer.Create( "kill", .3, 1, function( target_plys )
        RunConsoleCommand( "ulx ungod", playername) end
end )
end
)

It throws out the error: '<eof>' expected near 'end'. Can someone please explain why? Any help would be appreciated.

Thanks,
BLEEP_BLOOP :D

An Error Has Occurred!

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