Blockland Forums > Modification Help

is this Possible?

Pages: (1/3) > >>

xcruso:

Hey is it possible if i make a serverCmdadmins(%client)
And when i do the command all admin names will popup some where?
Is that possible?

Not by making all names of admins in a text command and make that popup.

Blocker Ctgr:

Why not just open Server Control and look in the list?

On Topic: It is possible. I have no clue how to do it though.

wizzlemanizzle:


--- Quote from: xcruso on September 11, 2011, 05:30:13 PM ---Hey is it possible if i make a serverCmdadmins(%client)
And when i do the command all admin names will popup some where?
Is that possible?

Not by making all names of admins in a text command and make that popup.

--- End quote ---
where do you want them to pop up?

I think
for(%i = 0; %i < clientGroup.getCount(); %i++)
{
%i = %client;
if(%client.isAdmin())
{
echo(%client)
}
}
will work (could be wrong, been a while since I have done much with blockland or torque)
replace echo with whatever you want to do to find out the list of names, might I suggest using fileobject to write it into a txt doc?

Placid:


--- Quote from: wizzlemanizzle on September 11, 2011, 06:21:15 PM ---for(%i = 0; %i < clientGroup.getCount(); %i++)
{
%i = %client;
if(%client.isAdmin || %client.isSuperAdmin)
{
echo(%client)
}
}

--- End quote ---
no, that won't work.

--- Code: ---for(%i=0;%i<clientGroup.getCount();%i++) {
    %client = clientGroup.getObject(%i);
    if(isObject(%client)) {
        //do stuff here
    }
}
--- End code ---

clientGroup.getObject gets the actual object of the client. and, of course this is serverside, which is not exactly what i think the OP is asking for.
yes, i know the formatting is frowned upon, shut up.

infiniteLoop:


--- Quote from: wizzlemanizzle on September 11, 2011, 06:21:15 PM ---where do you want them to pop up?

I think
for(%i = 0; %i < clientGroup.getCount(); %i++)
{
%i = %client;
if(%client.isAdmin())
{
echo(%client)
}
}
will work (could be wrong, been a while since I have done much with blockland or torque)
replace echo with whatever you want to do to find out the list of names, might I suggest using fileobject to write it into a txt doc?

--- End quote ---

function serverCmdAdmin(%client)
{
     for(%i=0;%i<clientGroup.getCount();%i++)
     {
          %cl = clientGroup.getObject(%i);
          if(%cl.isAdmin || %cl.isSuperAdmin)
          {
               %add = (%add $= "") ? %add = %cl SPC %cl.name : %add = %add @ "\n" @ %cl SPC %cl.name;
          }
     }
     messageBoxOk("Admins",%add);
}

Pages: (1/3) > >>

Go to full version