Results 1 to 5 of 5
  1. #1

    Tournaments Player Organisator

    Hello-
    is there a Plugin that auto devides Players into Teams by theire Playername according to a list which is created before,
    so if Players are joining they get automatically in the right team?

  2. #2
    Senior Member
    Join Date
    Nov 2011
    Location
    Germany
    Posts
    154
    Hey,

    u can use insane limits for that. here is a small script to manage a clanmatch. player will automatic switched to the right team (without squad)

    SETUP LIMIT#1
    limit_evaluation: OnJoin
    limit_first_check: Code
    limit_first_check_code: paste the CODE#1 here

    CODE#1
    Code:
    // Set Playernames without clantag
    bool team1 = (Regex.Match(player.Name, @"(?:Playername1|Playername2|Playername3|Playername4|Playername5)", RegexOptions.IgnoreCase).Success);
    bool team2 = (Regex.Match(player.Name, @"(?:Playername1|Playername2|Playername3|Playername4|Playername5)", RegexOptions.IgnoreCase).Success);
    
    if (team1) {
    	plugin.MovePlayer(player.Name, 1, 0, true);
    } else if (team2) {
    	plugin.MovePlayer(player.Name, 2, 0, true);
    }
    
    return false;
    Last edited by Grovax; 28-01-2016 at 08:59.

  3. #3
    THankS!! So i only have to type the playernames for each team and its assigning automatically?
    Last edited by mambochambo; 09-02-2016 at 06:26.

  4. #4
    Sorry to bother u, but the Script isnt working,
    the following Error messages are in German, ill try to translate:


    [Insane Limits] Thread(delayed_comp): ERROR: (CS0136, line: 28, column: 18): Die lokale Variable team1 kann in diesem Bereich nicht deklariert werden, weil team1 eine andere Bedeutung erhalten würde, die bereits in einem übergeordnet oder aktuell-Bereich für einen anderen Zweck verwendet wurde.

    The local variable Team1 couldnt be defined, because it would get another meaning, its already used in a uper Area and used for another Purpose.


    [04:41:32 94] [Insane Limits] Thread(delayed_comp): ERROR: (CS0029, line: 28, column: 27): Der Typ bool kann nicht implizit in PRoConEvents.TeamInfoInterface konvertiert werden.

    The Type book could be converted into ProconEvents Teaminfointerface.


    [04:41:32 94] [Insane Limits] Thread(delayed_comp): ERROR: (CS0136, line: 29, column: 18): Die lokale Variable team2 kann in diesem Bereich nicht deklariert werden, weil team2 eine andere Bedeutung erhalten würde, die bereits in einem übergeordnet oder aktuell-Bereich für einen anderen Zweck verwendet wurde.

    same error as in no. 1 for team 2


    [04:41:32 94] [Insane Limits] Thread(delayed_comp): ERROR: (CS0029, line: 29, column: 27): Der Typ bool kann nicht implizit in PRoConEvents.TeamInfoInterface konvertiert werden.

    same error like in no. 2


    [04:41:32 94] [Insane Limits] Thread(delayed_comp): ERROR: (CS0029, line: 31, column: 17): Der Typ PRoConEvents.TeamInfoInterface kann nicht implizit in bool konvertiert werden

    The Type Proconevents.teaminfointerface couldnt be converted into bool


    Can u please help me out, your help is much appriciated.


    ##Problem solved
    Nevermind,
    i typed Team1 with a capital letter instead of team1 like its writen in your code, then i clicked on compile, and now its working!
    Best Regards and special Thanks to you, you did me a big Favor!
    Last edited by mambochambo; 10-02-2016 at 04:51.

  5. #5
    Senior Member
    Join Date
    Nov 2011
    Location
    Germany
    Posts
    154
    oh ok, i did not know that team1 a fixed variable of insane limits. but you have already found the problem

 

 

Posting Permissions

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