Thread: ::vote command problems

Results 1 to 8 of 8
  1. #1 ::vote command problems 
    Registered Member
    Ninja assassin's Avatar
    Join Date
    Oct 2008
    Posts
    1,961
    Thanks given
    217
    Thanks received
    115
    Rep Power
    77
    this is my vote command:

    Code:
    if (playerCommand.equals("vote")) {
    				for (int j = 0; j < Server.playerHandler.players.length; j++)
    					if (Server.playerHandler.players[j] != null) {
    						Client c2 = (Client)Server.playerHandler.players[j];
    						c2.getPA().sendFrame126("www.linkremoved.com", 12000);
    					}
    			}
    When player dose that command it opens My browser too...
    Btc: 1tpWTbAznzWYh6YpoUJeQ3MDVK56GGJ
    Reply With Quote  
     

  2. #2  
    Registered Member Richie's Avatar
    Join Date
    Sep 2009
    Age
    28
    Posts
    791
    Thanks given
    81
    Thanks received
    18
    Rep Power
    6
    Code:
    if (playerCommand.equals("vote")) {
    				for (int j = 0; j < Server.playerHandler.players.length; j++)
    					if (Server.playerHandler.players[j] != null) {
    						//Client c2 = (Client)Server.playerHandler.players[j];
    						c.getPA().sendFrame126("www.linkremoved.com", 12000);
    					}
    			}
    Use that
    Reply With Quote  
     

  3. #3  
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    31
    Posts
    2,779
    Thanks given
    974
    Thanks received
    411
    Rep Power
    0
    Quote Originally Posted by Richie View Post
    Code:
    if (playerCommand.equals("vote")) {
    				for (int j = 0; j < Server.playerHandler.players.length; j++)
    					if (Server.playerHandler.players[j] != null) {
    						//Client c2 = (Client)Server.playerHandler.players[j];
    						c.getPA().sendFrame126("www.linkremoved.com", 12000);
    					}
    			}
    Use that
    Usefull! is it in all pi clients & servers?

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣



    Reply With Quote  
     

  4. #4  
    Registered Member Richie's Avatar
    Join Date
    Sep 2009
    Age
    28
    Posts
    791
    Thanks given
    81
    Thanks received
    18
    Rep Power
    6
    Yeah i use PI and it worked for me, i had same prob as you
    Reply With Quote  
     

  5. #5  
    Registered Member
    Ninja assassin's Avatar
    Join Date
    Oct 2008
    Posts
    1,961
    Thanks given
    217
    Thanks received
    115
    Rep Power
    77
    Quote Originally Posted by Linus View Post
    Usefull! is it in all pi clients & servers?
    Yh, its in all PI


    And thanks Richie i Just relied that the command was ::massvote
    Btc: 1tpWTbAznzWYh6YpoUJeQ3MDVK56GGJ
    Reply With Quote  
     

  6. #6  
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    31
    Posts
    2,779
    Thanks given
    974
    Thanks received
    411
    Rep Power
    0
    Thanks for the release then

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣



    Reply With Quote  
     

  7. #7  
    Registered Member
    Ninja assassin's Avatar
    Join Date
    Oct 2008
    Posts
    1,961
    Thanks given
    217
    Thanks received
    115
    Rep Power
    77
    Linus use this because it will open too many browser depending now many players online, for example if 60 players online then When you do ::vote it will open 60 browser tab l0l!

    so use this:

    Code:
    if (playerCommand.equals("vote")) {
    				//for (int j = 0; j < Server.playerHandler.players.length; j++)
    					//if (Server.playerHandler.players[j] != null) {
    						//Client c2 = (Client)Server.playerHandler.players[j];
    						c.getPA().sendFrame126("www.linkremoved.com", 12000);
    					//}
    			}
    and ::massvote

    Code:
    if (playerCommand.equals("massvote")) {
    				for (int j = 0; j < Server.playerHandler.players.length; j++)
    					if (Server.playerHandler.players[j] != null) {
    						Client c2 = (Client)Server.playerHandler.players[j];
    						c2.getPA().sendFrame126("www.linkremoved.com", 12000);
    					}
    			}
    Btc: 1tpWTbAznzWYh6YpoUJeQ3MDVK56GGJ
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Sep 2010
    Age
    29
    Posts
    430
    Thanks given
    11
    Thanks received
    19
    Rep Power
    23
    lmao thats nice to know. have fun closing 60 browsers whoever used the previous code
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •