Blockland Forums > Modification Help

Could someone tell me EXACTLY what this will do?more

Pages: (1/2) > >>

wizzlemanizzle:

well i got a bit of code from a friend who says it will do something in particular, but he says he's not sure if it is quite right, will someone tell me what this does?
for(%i = 0; %i < clientGroup.getCount(); %i++)
{
%client = clientGroup.getObject(%i);
// Do stuff.
}
And what you can do with it?

Placid:

it cycles through all clients on your server
and you can do stuff like adding %client.player.kill(); to the end of it will kill all players on your server.

wizzlemanizzle:

thanks for the fast response, and you answered EXACTLY how i was hoping someone would.

wizzlemanizzle:

now i must ask another question; would adding
if(%client.isAdmin)
check to see if the player was JUST admin, or would it come out true for super admins and the host aswell?


Placid:

No, it would only come out as admin.
Type if(%client.isAdmin || %c.isSuperAdmin), || meaning OR. If you wanted to do something that both have to be true, then try &&.

Pages: (1/2) > >>

Go to full version