#Suggestion: View registered commands

1 messages · Page 1 of 1 (latest)

heavy void
#

In txAdmin menu, under Resources tab, It would be useful to view all the registered commands under each script in a dropdown

drowsy dew
#

I fw that idea

azure minnow
#

since all keybinds are commands

#

so, with ESX for example, es_extended would have the keybinds of every esx script, listed with it

heavy void
#

no way to exclude keybind commands?

#

even if it includes, at worst case there would be 100 or so commands for in each script?

azure minnow
#

theres also no way to know which resource registered which command

#

the native only returns the name

#

not whom registered it

heavy void
#

ah well. here it goes to the bottomless pit

foggy parcel
azure minnow
#

it has the resource in scope of register command native, it just doesnt store it

foggy parcel
#

Something like GetResourceMetadata(res, 'commands') and GetResourceMetadata(res, 'events') would be pretty cool.

azure minnow
#

which is alot more work than just using the current natives

foggy parcel
#

I mean, I wouldn't complain of using a GetResourceCommands(res) instead, just used the metadata as it's an existing api

azure minnow
#

that native has access to the resource name in source, its just not stored

foggy parcel
#

uhh weird format to return just a single parameter, maybe it was planned to also include resource name or something like that?

azure minnow
#

docs are wrong

foggy parcel
#

what else is returned?

azure minnow
#

arity

#

no idea what that is

foggy parcel
azure minnow
#

lol

azure minnow
#

oh

#

its actually, really easy to add resource name into this

foggy parcel
# azure minnow no idea what that is

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.

azure minnow
#

literally just a case of adding an extra param here, and passing in the already known resource name

foggy parcel
#

PR when

azure minnow
#

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

foggy parcel
#

too bad convars are not really registered by resources, because it would also be cool to show all convars associated to a resource

azure minnow
#

i also gotta actually setup the env, otherwise this will only be tested on libertyM kekW

solemn matrixBOT
# heavy void Great!

:rocket: Congratulations @heavy void, you leveled up to <@&828359841512816671>!

heavy void
drowsy dew
#

Fuck yeah

#

Huge

minor pond
drowsy dew
#

Via F8 -> some option

minor pond
#

Really? Damn didn't know that

drowsy dew
#

Yeah

minor pond
#

But only client registered events or also server registered events?

drowsy dew
#

not sure

#

all

minor pond
#

Wtf

drowsy dew
#

Just don't use bad code and write secure code shrug

minor pond
#

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

foggy parcel
minor pond
#

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

solemn matrixBOT
solemn matrixBOT