Advertisement
Dannu

getNextClient

Oct 19th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. function getNextClient(%client)
  2. {
  3. %count = clientgroup.getcount();
  4. for(%i=0;%i<%count;%i++)
  5. {
  6. %cur = clientgroup.getobject(%i); if(%turndownforwhat)
  7. {
  8. return %cur;
  9. }
  10. if(%cur == %client)
  11. {
  12. %turndownforwhat = 1;
  13. }
  14. if(%i == (%count - 1))
  15. {
  16. return %client;
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement