[Release] Command Processor

The commands aren’t going through for me. When I type “/whatever” it just goes in as a regular message. Am I suppose to put the client and server folders into each resource folder that I have or just the fivem-map-skater?

The server / client folder doesn’t really matter. What does matter is whether you set the downloaded script(s) as a server script or client script using the client_script reserved word or the server_script one.

your-custom-resource basically connotes you have to drag the downloaded scripts into your custom resource folder.

I attached an example resource, you may want to see how it’s implemented in there.
example-cmd-resource.zip (27.1 KB)

This function shall be called, if it is not, then the implementation in your resource is wrong (note the highlighted line).

If there’s any more questions, let me know.

cant u just add that to the chat main resource ???

There seems to be a problem with the server script.

Error parsing script server/commands.lua in resource gamemode: server/commands.lua:316: no visible label ‘failure’ for at line 296

					else --We're not on the last one but on the first one being "d"
						if failCount > 0 then
							::failure::
							matched = false
							if CMDDEBUG_MODE then
								print('[parseInput] number of args (1): ' .. #args .. ' does not equal specifier ' .. #specifiers ..  ' failCount: ' .. failCount .. ' spIndex: ' .. spIndex .. '.')
							end
							break
						else
							if #args < #specifiers then
								failCount = failCount + 1
								goto failure -- line 296
								--Cannot have less args than specifiers, which would mean one of the next args is unset
							end
						end
					end

The label has to be in the same scope as goto, that’s why there is an error for this. If I could understand the code, I would solve it myself, but I would need some time to actually get it.

By the way, are you still continuing to develop this resource?

1 Like