Results 1 to 3 of 3
  1. #1

    Insane Limits: public/private Squad

    I would like to receive the squad chat command to private or public place. But I have PapaCharlie9's Insane Limits: join player (move to team / squad of players) command script taken and some rebuilt.
    So far I have:
    Code:
    Match m = Regex.Match(player.LastChat, @"^\s*[!/@]private\s+([^\s]+)", RegexOptions.IgnoreCase);
    if (!m.Success)
        return false;
    List<String> vips = plugin.GetReservedSlotsList();
    if (!vips.Contains(player.Name)) {
        plugin.SendPlayerMessage(player.Name, "You are not a VIP, you can't use the !join command!");
        return false;
    }
    String p.Name = m.Groups[1].Value;
    List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
    all.AddRange(team1.players);
    all.AddRange(team2.players);
    all.AddRange(team3.players);
    all.AddRange(team4.players);
    PlayerInfoInterface source = null;
    
    
    foreach (PlayerInfoInterface p in all) {
        if (Regex.Match(p.Name, name, RegexOptions.IgnoreCase).Success) {
            source = p;
    	}
    }
    // Force the squad to be locked
    plugin.ServerCommand("squad.private", source.TeamId.ToString(), source.SquadId.ToString(), "true");
    
    // Work the magic
    plugin.SendPlayerMessage(player.Name, "Your squad is PRIVATE now!");
    return false;
    So far I have /private Lucky567 enter to the squad from public to private enforce. But I only want to use the command.
    I want to use /public set the squad back on public.

    Can anyone here help me?
    Last edited by Lucky567; 28-02-2015 at 19:25.

  2. #2
    Quote Originally Posted by Lucky567 View Post
    I would like to receive the squad chat command to private or public place. But I have PapaCharlie9's Insane Limits: join player (move to team / squad of players) command script taken and some rebuilt.
    So far I have:
    Code:
    Match m = Regex.Match(player.LastChat, @"^\s*[!/@]private\s+([^\s]+)", RegexOptions.IgnoreCase);
    if (!m.Success)
        return false;
    List<String> vips = plugin.GetReservedSlotsList();
    if (!vips.Contains(player.Name)) {
        plugin.SendPlayerMessage(player.Name, "You are not a VIP, you can't use the !join command!");
        return false;
    }
    String p.Name = m.Groups[1].Value;
    List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
    all.AddRange(team1.players);
    all.AddRange(team2.players);
    all.AddRange(team3.players);
    all.AddRange(team4.players);
    PlayerInfoInterface source = null;
    
    
    foreach (PlayerInfoInterface p in all) {
        if (Regex.Match(p.Name, name, RegexOptions.IgnoreCase).Success) {
            source = p;
    	}
    }
    // Force the squad to be locked
    plugin.ServerCommand("squad.private", source.TeamId.ToString(), source.SquadId.ToString(), "true");
    
    // Work the magic
    plugin.SendPlayerMessage(player.Name, "Your squad is PRIVATE now!");
    return false;
    So far I have /private Lucky567 enter to the squad from public to private enforce. But I only want to use the command.
    I want to use /public set the squad back on public.

    Can anyone here help me?
    It might be better to use the new Squad Manager plugin:

    https://forum.myrcon.com/showthread....-1-11-Jan-2015
    Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.

  3. #3

    Dead plugin?

    Like title says, there is anyone who know how to manipulate with forcing public squads, also reducing the maximum number of squads per time? (6 to be exact)

 

 

Posting Permissions

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