• Nutscript bodygroup for clockwork
    5 replies, posted
Ok so I am trying to get the Nutscript command for setting bodygroups to work with nutscript, I have gotten it so there are no errors but have no clue how to actually get it working.
Here is the code [code]local Clockwork = Clockwork; local COMMAND = Clockwork.command:New("Charsetbodygroup"); COMMAND.tip = "Set a charater's bodygroup."; COMMAND.text = "<string name> <string bodyGroup> [number value]"; COMMAND.flags = CMD_DEFAULT; COMMAND.access = "a"; COMMAND.arguments = 1; -- Called when the command has been run. function COMMAND:OnRun(player, arguments) local target = Clockwork.player:FindByID(arguments[1]) if (target) then local value = tonumber(arguments[3]); if (IsValid(target) and target:getChar()) then local index = target:FindBodygroupByName(arguments[2]); if (index > -1) then if (value and value < 1) then value = nil end; local groups = target:getChar():getData("groups", {}); groups[index] = value target:getChar():setData("groups", groups); target:SetBodygroup(index, value or 0) Clockwork.util.notifyLocalized("cChangeGroups", nil, client:Name(), target:Name(), arguments[2], value or 0); else return "@invalidArg", 2 end; end; end; end; COMMAND:Register(); [/code]
Can anyone help?
Bump
You should probably try their forums rather than here given that you have to pay conna 20 shekels for the "privilege" of developing for his gamemode, It's unlikely that many people here have a dev subscription
Considering there are functions that don't exist in the cw framework I wouldn't expect it to work. I'm assuming its for nutscript and thats not going to cut it.
Sorry, you need to Log In to post a reply to this thread.