• Nutscript commands for ULX?
    0 replies, posted
I have been working on ULX commands for nutscript. I used to just have the ulx command route through chat. Now I'm working on making it work with RCON. Here is what I have, but it is not seeming to work. [CODE] local flags = { "p", "e", "t", "c", "C", "n", "r" } function ulx.flaggive(client, arguments) local target = nut.command.findPlayer(client, arguments[1]) if (IsValid(target) and target:getChar()) then local flags = arguments[2] if (!flags) then local available = "" for k, v in SortedPairs(nut.flag.list) do if (!target:getChar():hasFlags(k)) then available = available..k end end return client:requestString("@flagGiveTitle", "@flagGiveDesc", function(text) nut.command.run(client, "flaggive", {target:Name(), text}) end, available) end target:getChar():giveFlags(flags) nut.util.notifyLocalized("flagGive", nil, client:Name(), target:Name(), flags) end end local flaggive = ulx.command("Test Commands", "ulx flaggive", ulx.flaggive, "!flaggive",true) flaggive:addParam{ type=ULib.cmds.PlayerArg } flaggive:addParam{ type=ULib.cmds.StringArg, hint="flags", completes=flags, ULib.cmds.optional } flaggive:defaultAccess( ULib.ACCESS_ADMIN ) flaggive:help( "Assigns the selected flags for a player." )[/CODE] [editline]8th April 2016[/editline] I'm not 100% sure if this is the correct place to post this.
Sorry, you need to Log In to post a reply to this thread.