That helped the server recognize it as a command but I'm still getting errors. So far I have:
local CATEGORY_NAME = "Danker"
function ulx.rpname( calling_ply, target_ply, name )
if name and name ~= "" then
target_ply:SetRPName(name)
ulx.fancyLogAdmin( calling_ply, true, "#A renamed #T", target_ply )
else
name = nil
end
ULib.queueFunctionCall( ULib.rpname, target_ply, name, calling_ply )
end
local rpname = ulx.command( CATEGORY_NAME, "ulx rpname", ulx.rpname, "!rpname", true )
rpname:addParam{ type=ULib.cmds.PlayerArg }
rpname:addParam{ type=ULib.cmds.StringArg, hint="Name to rename player to", ULib.cmds.takeRestOfLine }
rpname:defaultAccess( ULib.ACCESS_ADMIN )
rpname:help( "Renames a player" )
I keep getting an error in console that says:
attempt to call method "SetRPName (a nil value)