Blockland Forums > Modification Help

admin/unadmin through scripting?

Pages: << < (2/2)

-=>RR<=-MasterCE:


--- Quote from: Aloshi on June 09, 2007, 03:07:06 PM ---No. Doing %client.isadmin = 1; etc. does NOT work. It just messes up the GUIs etc. To admin it's easiest to do ServerCmdSAD(%client,$Pref::Server::AdminPassword);. De-admining I dunno about. Yes, you CAN do %client.isadmin = 1; but all the GUIs will be wrong-y...

--- End quote ---
I know that, I don't script or play anymore, I'm taking a break from BL, so I didn't care to go into the files and get the commands needed.

Mr. Wallet:

1. so, the magic function that makes it work is clientcmdadminsuccess()?

2. I've never seen getplayer() before, can you tutorialize me and tell me what the parameters are for that thing? I've been using an annoying-as-hell FOR loop to find BL_IDs by reading through the clientgroup.

 :cookie: for you space guy

Space Guy:

clientcmdadminsuccess() is the one used when you enter the admin password correctly. It simply allows the client to open the Admin GUI (instead of password box) and instantly opens it for the client. When you remove admin they will still be able to access the GUI, unchangable, but none of the buttons on it (kick, ban, etc) will function unless they are given it again.

getPlayer(%mode,%player,%id) is a custom function by me -

%mode - 0 = %id uses BL_ID (ex. 130); 1 = %id uses Whole Name (ex. "Space Guy")
%player - 0 = Return Player object (things like inventory, bricks, health); 1 = Return Client object (Things like score, isAdmin, minigame join/leave)
%id - Uses %mode to determine what it checks for - name or BL_ID.

Basically, if you want to kill a certain player then use: getPlayer(0,1,130).kill(); - where my ID is 130.

Also, the function does use a for() loop it's just in a function instead of you having to write the whole loop in the console.

Mr. Wallet:

Great idea Space Guy! I'll make a version myself.  :cookieMonster:

And thanks again for the admin help.

Pages: << < (2/2)

Go to full version