Author Topic: Could someone tell me EXACTLY what this will do?more  (Read 424 times)

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?
« Last Edit: March 28, 2011, 04:21:43 PM by wizzlemanizzle »

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.

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

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?

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 &&.

thankyou again placid, you are amazing

ill just PM you the next question, im locking this now