Thread: Kick all command [PI]

Results 1 to 4 of 4
  1. #1 Kick all command [PI] 
    Registered Member Treq's Avatar
    Join Date
    Aug 2010
    Posts
    463
    Thanks given
    71
    Thanks received
    65
    Rep Power
    22
    Base: Project Insanity
    Problem: Need a kick all command
    Errors(Compiling Errors):none
    Other Information/Media(Pictures, etc):

    Hey guys, Please don't freak out on me for posting this but I have looked everywhere and could not find a tutorial or snippet explaining how to add this. I bet it's really easy but I just cannot get it! help would be appreciated.
    Reply With Quote  
     

  2. #2  
    Registered Member
    gomomo11's Avatar
    Join Date
    May 2010
    Posts
    2,379
    Thanks given
    268
    Thanks received
    196
    Rep Power
    177
    if (playerCommand.startsWith("kickall")) {
    for (int j = 0; j < Server.playerHandler.players.length; j++) {
    if (Server.playerHandler.players[j] != null) {
    Client c2 = (Client)Server.playerHandler.players[j];
    c.sendMessage("You have kicked everyone..");
    c2.disconnected = true;
    }
    }
    }
    You're welcome
    Attached image
    no external links without affiliate
    Reply With Quote  
     

  3. #3  
    Registered Member Treq's Avatar
    Join Date
    Aug 2010
    Posts
    463
    Thanks given
    71
    Thanks received
    65
    Rep Power
    22
    Thanks bro I'll try it / rep++ you when I get home.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jul 2013
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    doesnt work man
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI]Kick command
    By erde0 in forum Snippets
    Replies: 9
    Last Post: 12-23-2010, 09:39 PM
  2. Replies: 4
    Last Post: 12-21-2010, 09:36 PM
  3. Replies: 4
    Last Post: 12-19-2010, 11:46 PM
  4. [PI] Kick Command?
    By Aristotle in forum Help
    Replies: 4
    Last Post: 07-28-2010, 08:22 AM
  5. ::kick command
    By cavallers in forum Configuration
    Replies: 17
    Last Post: 03-07-2009, 06:01 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •