Results 1 to 1 of 1
  1. #1

    [Insane Limits] Join Restriction for Clan Match Servers

    Heres a limit(2 limit and 3 lists actually) to restrict joins in a server for either whitelisted players or whitelisted clan tags. This is good for servers that are used for ESL type of matches. You can ensure only the players from both clans that will have a match against eachother can join the server (as well as whitelisted or admins by default)

    There are 2 limits to make, one is for in-game on/off command for the limit. The other is for the actual on join trigger.
    Also need to make 3 list: admin,whitelistNAME,whitelistCLANTAG

    What it does and how it works:
    Basicly, if the status of the limit is "On", firstly, it checks every player who joins if theyre in any of the 3 list: admin,whitelistNAME,whitelistCLANTAG. If in any of these list, limit will show the player is in one of those lists in procon chat tab and halt.

    If player is not in any of those lists, they simply get kicked with a notifying msg. Also the kicks are shown in Chat tab of Procon.

    This limit will also notify any admin who joins the server if its status is set to "on" and that they can use "!JR" command to toggle it on or off.

    This IL script can be used with "ESL Server Plugin (ProconRulz Script)" by QuadPrime



    In-Game Command:

    !JR: Enables or disables the limit





    First, lets make 3 lists:


    "admins" list:
    List Manager>new_list>True
    list_name: admins
    list_comparison: CaseSensitive
    list_data: name, name, name (enter admins name here exactly the way it shows the example in plugin)

    "whitelistNAME" list:
    Same as above, only change list_name to "whitelistNAME" (also case sensitive)

    "whitelistCLANTAG list:
    Same as above. Only, use clan tags instead of player names (Ex: HoC, TOA ...). Also change list_name to "whitelistCLANTAG" (also case sensitive)




    Now we make a limit for in-game on/off switch:
    Only Admins in the "admins" list can use this command.

    Limit Manager>new_limit>True
    Limit_name: Join Restriction On/Off Switch
    Limit_evaluation: OnAnyChat
    Limit_first_check: Expression
    Limit_first_check_expression:
    Code:
    
    ( plugin.isInList(player.Name, "admins") && Regex.Match(player.LastChat, @"^\s*[@!]JR", RegexOptions.IgnoreCase).Success )
    Limit_second_check: Code
    Limit_action: None
    Limit_second_check_code:
    Code:
    
    if (!plugin.Data.issetString("JRstatus")) {
        plugin.Data.setString("JRstatus", "off"); 
        plugin.SendPlayerMessage(player.Name, plugin.R("Configuring [JR]Join Restriction for first use."));
        plugin.SendPlayerMessage(player.Name, plugin.R("Use !JR to turn on/off Join Restriction."));
        plugin.SendPlayerMessage(player.Name, plugin.R("JR: off"));
    }
    if (plugin.Data.issetString("JRstatus")) {
        if (plugin.Data.getString("JRstatus") == "on") {
            plugin.Data.setString("JRstatus", "off");
            plugin.SendPlayerMessage(player.Name, plugin.R("JR is now: "+ plugin.Data.getString("JRstatus") +""));
            return false;
        }
        if (plugin.Data.getString("JRstatus") == "off") {
            plugin.Data.setString("JRstatus", "on");
            plugin.SendPlayerMessage(player.Name, plugin.R("JR is now: "+ plugin.Data.getString("JRstatus") +""));
            return false;
        }
    }
    




    Now, the limit to check on join:

    Limit Manager>new_limit>True
    Limit_name: Join Restriction
    Limit_evaluation: OnJoin
    Limit_first_check: Expression
    Limit_first_check_expression:
    Code:
    (plugin.Data.getString("JRstatus") == "on")
    Limit_second_check: Code
    Limit_action: None
    Limit_second_check_code:
    Code:
    
    if (plugin.isInList(player.Name, "admins")) {
        plugin.SendPlayerMessage(player.Name, plugin.R("Join Restriction is on."));
        plugin.SendPlayerMessage(player.Name, plugin.R("Type !JR to switch Join Restriction on or off."));
    }
    String JRplayerfullname = player.FullName;
    String JRplayername = player.Name;
    if (!plugin.isInList(player.Tag, "whitelistCLANTAG") && !plugin.isInList(player.Name, "whitelistNAME")) {
      plugin.KickPlayerWithMessage(player.Name, plugin.R("%l_n%: Access denied for clan matches."));
      plugin.PRoConChat(plugin.R("^b%l_n%:^n KICKED " + JRplayerfullname + ""));
    }
    
    if (plugin.isInList(player.Tag, "whitelistCLANTAG")) {
        plugin.PRoConChat(plugin.R("^b%l_n%:^n " + JRplayerfullname + " is in whitelistCLANTAG"));
    }
    if (plugin.isInList(player.Name, "whitelistNAME")) {
        plugin.PRoConChat(plugin.R("^b%l_n%:^n " + JRplayername + " is in whitelistNAME"));
    }
    

 

 

Posting Permissions

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