Author Topic: Ulx respawn  (Read 1506 times)

0 Members and 1 Guest are viewing this topic.

Offline Gigabait

  • Newbie
  • *
  • Posts: 13
  • Karma: -2
Ulx respawn
« on: October 20, 2015, 09:20:20 PM »
Hello, when I revived I can not attack what is problem?
Code: [Select]
local CATEGORY_NAME = "Deathrun"

function ulx.respawn( calling_ply, target_ply )
    if not target_ply:Alive() then
        target_ply:Spawn()
        ulx.fancyLogAdmin( calling_ply, true, "#A respawned #T", target_ply )
    end
end

local respawn = ulx.command( CATEGORY_NAME, "ulx respawn", ulx.respawn, "!respawn", true )
respawn:addParam{ type=ULib.cmds.PlayerArg }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:help( "Respawns a player" )

An Error Has Occurred!

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