Author Topic: Preferred way to get the owner of a brick  (Read 976 times)

I did this
Code: [Select]
%brick.getGroup().bl_id
Whats the preffered way?

I think %brick.client?

What you used should work fine

I think %brick.client?
Shutup. What if the client isn't there?


%brick.getGroup().bl_id
ThHat's good.

maybe when you start a server go to advanced config and put in a number at lsoe ownership of brick after ___ minutes.

maybe when you start a server go to advanced config and put in a number at lsoe ownership of brick after ___ minutes.
Not what he's asking.



%brick.dump();

shows all variables, and functions to do with that class/brick


No.
would you read the rest of the loving post, he explains that this is not a way to find the owner but it is the list of variables. read more next time.

No.
If you're so new to coding you shouldn't really be posting outside of your own topics. You're just making a fool of yourself.

Code: [Select]
function getBrickOwner(%brick)
{
   if(isObject(%brick.client))
      return %brick.client.name;
   else
      return "BL_ID:" SPC %brick.getGroup().bl_id;
}

NINJA: Too late, already answered. :c

%brick.dump();

shows all variables, and functions to do with that class/brick
That will only be useful if you want to do something with the console. A script will have to call the specific variable to work.