#Suggestion: View registered commands
1 messages · Page 1 of 1 (latest)
I fw that idea
that would get messy very quickly
since all keybinds are commands
so, with ESX for example, es_extended would have the keybinds of every esx script, listed with it
no way to exclude keybind commands?
even if it includes, at worst case there would be 100 or so commands for in each script?
nope
theres also no way to know which resource registered which command
the native only returns the name
not whom registered it
ah well. here it goes to the bottomless pit
I really like this idea.
not necessarily, if cfx likes the idea there might be a chance
it doesnt seem like it would be too much work tbh
it has the resource in scope of register command native, it just doesnt store it
Something like GetResourceMetadata(res, 'commands') and GetResourceMetadata(res, 'events') would be pretty cool.
that would mean linking those systems lol
which is alot more work than just using the current natives
I mean, I wouldn't complain of using a GetResourceCommands(res) instead, just used the metadata as it's an existing api
https://docs.fivem.net/natives/?_0xD4BEF069 - returns all commands register to that environment
that native has access to the resource name in source, its just not stored
uhh weird format to return just a single parameter, maybe it was planned to also include resource name or something like that?
its more than 1
docs are wrong
what else is returned?

lol
oh
its actually, really easy to add resource name into this
The term "arity" refers to the number of arguments a function, command, or operation takes. In other words, if a command is said to have an arity of 2, it requires exactly two arguments.
literally just a case of adding an extra param here, and passing in the already known resource name
not as simple
theres some adhesive commands in that list
and idk if they raw dog the call or not xD
id assume they are just convars though
which, should be quite simple to fix
oh yeah, thats also a point
all convars are commands xD
too bad convars are not really registered by resources, because it would also be cool to show all convars associated to a resource
i could just set their registrar to "convar"
i also gotta actually setup the env, otherwise this will only be tested on libertyM 
https://github.com/citizenfx/fivem/pull/3012 - lets see 👀
Great!
:rocket: Congratulations @heavy void, you leveled up to <@&828359841512816671>!
Cool
Doing it for events is not a good idea imo, at least if that native is accessible client side. There are too many people using events unsafe in their scripts so being able to see ALL events would create a huge security risk probably for these bad resources
You can see that anyways
Via F8 -> some option
Really? Damn didn't know that
Yeah
But only client registered events or also server registered events?
Wtf
Just don't use bad code and write secure code 
But it only registers events that are triggered while this is true, so no events that are not triggered while not listening, right? Just using secure code is easier said than done, you know how many insanely bad resources there are. I don't want to know how many could be exploited by just triggering the events
That's a server side thing only, I don't really care about client side, just the server <> client events, as that's what weights down the network
Yeah that would be a cool thing, if you had a list to all events you might even be able to monitor all of them including how many times they are triggered with what amounts of data to identify resources with bad networking
:rocket: Congratulations @minor pond, you leveled up to <@&828359841512816671>!
events would be harder
:rocket: Congratulations @azure minnow, you leveled up to <@&1005551490636722177>!
