Author Topic: [v2.0.1] Global Help  (Read 3074 times)

Global Help

Instead of having a bunch of help commands, why not just categorize them into one? This command allows add-on creators to add their server commands into one global help command. Instead of having a bunch of '/tdmhelp' or '/rphelp' commands, why not just pack them into one, easy-to-remember command?

Commands (Only one!):
/help - Will list all help functions.

Download on Blockland Glass[blocklandglass.com]

Planned features:
  • Scanning enabled addons for old help functions
  • Organizing function lists by addon name (Will be case sensitive) Done!
  • Alphabetical sorting

Add-On Coders, look here:
Use this code in your server.cs to add functions to the help servercmd.
Code: [Select]
if(!isObject(ServHelp) && $AddOn__Support_GlobalHelp) {
  Exec("add-ons/server_globalhelp/server.cs");
  addGlobalHelp("NAME","ADDON DESCRIPTION","ADDON NAME");
} else {
  if($AddOn__Support_GlobalHelp) {
    addGlobalHelp("NAME","ADDON DESCRIPTION","ADDON NAME");
  }
}
Please note that ADDON NAME is case-sensitive. For example, if I add av function with the addon name of "Test", and I add another function that has the name of "test", then two separate categories will be created.
« Last Edit: March 11, 2016, 03:33:10 PM by RTBARCHIVE »

all help functions.
  • Scanning enabled addons for old help functions
  • Organizing function lists by addon name (Will be case sensitive)
  • Alphabetical sorting
someone already made something that did this so you could probably rip the code from that

You need to use forceRequiredAddon.

someone already made something that did this so you could probably rip the code from that
It wouldnt be any fun then, lol
Ill just recreate it, as I dont really like using code from other addons unless absolutely necessary


???
please elaborate. Where should I put it? What are the arguments required? (I have  never used this function)

please elaborate. Where should I put it? What are the arguments required? (I have  never used this function)
http://forum.blockland.us/index.php?topic=147039.0

Hey dude, how about my idea? Is it real?

Hey dude, how about my idea? Is it real?
I'll definently consider adding a heavily modified version of the GUI seen in the topic you linked if enough people request it.
As for now, there is no reason adding something no one wants.

Version 2.0.1
Quote from: https://blocklandglass.com/addon.php?id=301
v2.0.1 | MARCH 11, 2016 | 2:25 PM
+ Added category feature

Hey dude, how about my idea? Is it real?
Alright. I have been talking to Pecon and Boodals about acquiring all commands in a server. There is basically only one logical way (That I could think of) to acquire all commands in a server.

Here is a theory that will not work:
Spamming all commands rapidly in the sequence of /a /b /c ... /ab /ac ... /hsatf ... etc you get the point
This will not work, because if you could only use words and numbers (36 characters), without any of the specials(' ] [ ; , . / etc) and it would be a max of a 10 word phrase, there are 254,186,856 possible combinations, which if you could send the commands at 1000 commands per second(which you can't, unless you have 0 ping which you don't.), it would take about 3 days. SO BASICALLY forget THAT IDEA

An idea that in theory would work:
Since you cannot check for all commands in a server, by spamming them. How about you have a list of stored commands? As in, a notepad would contain all Server_x / Script_x commands from RTB archives, or from the Add-Ons section, or just requested Add-Ons. The commands would be stored in a fashion of something like:
Code: [Select]
function getCommandsServer_NewDup()
{
   ADD COMMAND STUFF HERE
}

function getCommandsScript_Copymod()
{
   ADD COMMAND STUFF HERE
}

How would I know what addons are on a server? Well, there is a default listdatablocks(); console command, that lists all datablocks.. obviously. So with this, you can find what Server / Script mods are on a server, and from the notepad, you can get the commands from the notepad.
Mod made to be client-sided only.

Idea if this method would work:
The ability for the client to track what servers have what commands(Another notepad that records the commands on the server).



Questions? Thoughts? Problems?
« Last Edit: March 11, 2016, 04:36:51 PM by Dragonoid.Slayer »

Alright. I have been talking to Pecon and Boodals about acquiring all commands in a server. There is basically only one logical way (That I could think of) to acquire all commands in a server.

etc
another idea, probably VERY possible and the fastest/most reliable way to do this:
setlogmode(0); setlogmode(2);
dumpconsolefunctions();
setlogmode(0); setlogmode(2);
parse the console.log file for all commands that start with serverCmd.

this will be how the textfile looks like:

Can't read console.log from script, and doesn't give you any info about which mod it belongs to or what it even does.

Can't read console.log from script, and doesn't give you any info about which mod it belongs to or what it even does.
that seems kinda absurd that you can't read console.log from a script. are you sure you can't read it because its being written to? i've made the mistake of trying to open it a couple times while logmode was on 2.

You can only access files in these subfolders: add-ons, base, config, editor, saves, screenshots.