I'm making a command to force an act to a target
but when ranned, i'm getting "[ERROR] addons/ulx/lua/ulx/modules/sh/tbox_fun.lua:7: attempt to call method 'ConCommand' (a nil value)"
function ulx.forceact(calling_ply,target_ply,act)
if act=="dance" then
target_ply:ConCommand("act dance")
else
ULib.tsayError(calling_ply,act.." is not an act")
end
ulx.fancyLogAdmin(calling_ply,false,"#A forced acted #s upon #T",act,target_ply)
end
local forceact = ulx.command(CATEGORY_NAME, "ulx forceact", ulx.forceact, "!forceact", false)
forceact:addParam{ type=ULib.cmds.PlayersArg }
forceact:addParam{ type=ULib.cmds.StringArg, hint="act", ULib.cmds.takeRestOfLine }
forceact:defaultAccess(ULib.ACCESS_ADMIN)
forceact:help("Forces target to act input Eg: !force ^ dance")
Edit: nvm had PlayersArg not PlayerArg