Author Topic: Commands Manager GUI [My First Add-On Ever]  (Read 10608 times)

Wasnt there something like this on RTB

Wasnt there something like this on RTB
I think it was for the commonly used tools, like hammer, d-wand, duplicator etc, not every command


Wasnt there something like this on RTB

yeah, it was pretty poor quality though



I love this! Great first add-on!

Cool first Add-On. Most people's first add-ons aren't even good enough to be released, but this is.

-Tell you if you have access to the command or not (If you are admin / SA)
For this, just check $IAmAdmin. If it's 1, you're an admin. If it's 2, you're a super admin.
-Tell you if the server has the tools (Fillcan / Dup / Fillprinter)
You'd need to make a for statement using getDataBlockGroupSize(); and getDataBlock(%number); and then check if the dataBlock name matches the fillCan's, duplicator's or fillPrinter's.
-Add options to tell you the command you did in chat
Not 100% sure what you mean by this.
« Last Edit: July 15, 2015, 08:28:44 AM by jes00 »

hey guys, I edited it to remove the name

no it doesn't actually have my name there

hey guys, I edited it to remove the name

no it doesn't actually have my name there
I really hope you are kidding.

You'd need to make a for statement using getDataBlockGroupSize(); and getDataBlock(%number); and then check if the dataBlock name matches the fillCan's, duplicator's or fillPrinter's.
Datablock names aren't sent to clients.

I really hope you are kidding.
it's just a small edit to remove the name that they added in (it doesn't actually add mine)
and it's downloadable if you click the image

Datablock names aren't sent to clients.
Really? Hm.
UI names are though? No?

It only sends the important stuff for the client to recognize. I haven't seen UI names sent. Just checked it, it seems things can have UI names, that's how the client uses the tool menu for names.
Tested some code by messing with default functions, it worked.
Echoes the group id found, class name and the UI name.
for(%i=0;%i<getDatablockGroupSize();%i++)if(getDataBlock(%i).uiName !$= "") echo(%i @ "(" @ getDataBlock(%i).getClassName() @ ") - " @ getDataBlock(%i).uiName);

Datablock UI names are sent, but not the actual name. You can still see if the duplicator/fill can exists on the server, though.

Edit #2: Yep!

function WeaponExists(%name)
{
   for(%i=0;%i<getDatablockGroupSize();%i++)
      if(getDataBlock(%i).uiName $= %name)
         return true;
   return false;
}


« Last Edit: July 15, 2015, 11:28:50 PM by Kyuande »

i like it, and i like summet's skin, but i will never download anything from summet. good job dragon