Page 319 of 319 FirstFirst ... 219269309317318319
Results 3,181 to 3,189 of 3189
  1. #3181
    Hi, i'm trying to make a script that will give the k/d ratio of the targeted player to player that request it.
    Everything is working except... except the most important part of the script, it give the k/d of the player that request it instead of the targeted player.
    If somone can help me, could be great!
    It's just the player.Kdr who give me problem in the last line of the code.

    Code:
    Match m = Regex.Match(player.LastChat, @"^\s*[/[email protected]]kd\s+([^\s]+)", RegexOptions.IgnoreCase);
    if (!m.Success)
        return false;
    List<String> vips = plugin.GetReservedSlotsList();
    if (!vips.Contains(player.Name)) {
        plugin.SendPlayerMessage(player.Name, "You Can't use this command.");
        return false;
    }
    // Match target player name
    String 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 target = null;
    int count = 0;
    foreach (PlayerInfoInterface p in all) {
        if (Regex.Match(p.Name, name, RegexOptions.IgnoreCase).Success) {
            target = p;
            ++count;
        }
    }
    if (count == 0 || target == null) {
        plugin.SendPlayerMessage(player.Name, "No player name matches '" + name + "'");
        return false;
    } else if (count > 1) {
        plugin.SendPlayerMessage(player.Name, "Too many names match '" + name + "', try again");
        return false;
    }
    
                                                                            //NEED HELP HERE PLEASE.
    plugin.SendPlayerMessage(player.Name, target.Name + " Has a K/D of: " + player.Kdr );
    return false;
    Last edited by tchum; 01-02-2019 at 08:30.

  2. #3182
    Senior Member
    Join Date
    Oct 2015
    Location
    Germany
    Posts
    312
    Code:
    plugin.SendPlayerMessage(player.Name, target.Name + " Has a K/D of: " + target.Kdr );
    Developer of the VIP Slot Manager Plugin

  3. #3183
    Quote Originally Posted by maxdralle View Post
    Code:
    plugin.SendPlayerMessage(player.Name, target.Name + " Has a K/D of: " + target.Kdr );
    Thank you for your help maxdrelle.

  4. #3184
    Procon Addict
    Join Date
    Mar 2014
    Location
    Russia, Moscow
    Posts
    512
    Hi guys, please show me how to do whitelist just for 1 limit, i want whitelist by EA_GUID or PB_GUID if it possible:
    199ccb0ea0.jpg

  5. #3185
    Senior Member
    Join Date
    Oct 2015
    Location
    Germany
    Posts
    312
    @hodor
    everything is possible with insane limits. its the best plugin.
    IL expression for KD limit with ea guid whitelist:
    Code:
    (player.Kills/player.Deaths > 5) && (player.EAGuid != "EA_123...")

    or IL expression for KD limit with vip whitelist:
    Code:
    (player.Kills/player.Deaths > 5) && (!plugin.GetReservedSlotsList().Contains(player.Name))
    Last edited by maxdralle; 04-02-2019 at 18:19.
    Developer of the VIP Slot Manager Plugin

  6. #3186
    Procon Addict
    Join Date
    Mar 2014
    Location
    Russia, Moscow
    Posts
    512
    Thank you man!

    Work:
    Code:
    (player.Kills/player.Deaths > 5) && (player.EAGuid != "EA_123...")
    Doesnt work:
    Code:
    (player.Kills/player.Deaths > 5) && (!plugin.GetReservedSlotsList().Contains(player.Name))
    Last edited by Hodor; 05-02-2019 at 03:48.

  7. #3187
    Senior Member
    Join Date
    Oct 2015
    Location
    Germany
    Posts
    312
    it works. there is just an delay in insane limit to get a new reserved slot player.
    Developer of the VIP Slot Manager Plugin

  8. #3188
    Can I get player's PersonaId with InsaneLimits?

  9. #3189
    Can someone tell me why this is not working for the map Flood Zone and the little bird
    // chopper kill farm limit
    //////////////////////////////
    // info > settings for insane limits: limit_evaluation: OnKill ; limit_first_check: Code ; limit_action: none

    // SETTINGS
    int MaxHeliKillsInfo = 40; // single info player yell
    int MaxHeliKillsPyell = 45; // warning player yell
    int MaxHeliKillsAdminKill = 50; // auto admin kill
    int MaxHeliKillsAutoKick = 60; // auto admin kick / 15 minute time ban

    bool useWhitelist = true;
    bool PutReservedSlotsInWhitelist = true;

    // SETTINGS - END


    if (useWhitelist && plugin.isInList(killer.Name, "Player_Whitelist")) { return false; }
    if ((PutReservedSlotsInWhitelist) && (plugin.GetReservedSlotsList().Contains(killer.Nam e))) { return false; }

    int iHeliKills = 0;
    if (server.PlayerCount <= 64) {
    if ((server.MapFileName == "MP_Siege") || (server.MapFileName == "MP_Tremors") || (server.MapFileName == "MP_Flooded")) {
    if (kill.Category == "VehicleAir") {
    if (server.RoundData.issetInt("chopper_kills_" + killer.Name)) iHeliKills = server.RoundData.getInt("chopper_kills_" + killer.Name);
    iHeliKills++;
    server.RoundData.setInt("chopper_kills_" + killer.Name, iHeliKills);
    if (iHeliKills >= MaxHeliKillsAutoKick) {
    // kick
    plugin.SendGlobalMessage("HELI-FARM-LIMIT: " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.");
    plugin.ConsoleWrite("^8^HELI-FARM-LIMIT:^8^n " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - Heli Kills: " + iHeliKills.ToString());
    plugin.PRoConChat("^8^bHELI-FARM-LIMIT:^8^n " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - Heli Kills: " + iHeliKills.ToString());
    plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 15, "TIME-BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (K/D/K.Heli: " + killer.KillsRound + "/" + killer.DeathsRound + "/" + iHeliKills.ToString() + ")");
    } else if (iHeliKills >= MaxHeliKillsAdminKill) {
    // kill
    plugin.PRoConChat("^8^bHELI-FARM-LIMIT:^8^n " + killer.Name + " KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.");
    plugin.SendGlobalMessage("HELI-FARM-LIMIT: " + killer.Name + " KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.");
    plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [WARNING]\n" + killer.Name +" KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.\n Change your vehicle!", 10);
    plugin.KillPlayer(killer.Name);
    } else if (iHeliKills >= MaxHeliKillsPyell) {
    // warning yell
    plugin.PRoConChat("(Psay + Pyell " + killer.Name + ") ^8^bHELI-FARM-LIMIT:^8^n [WARNING] " + killer.Name + " only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");
    plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [WARNING]\n" + killer.Name + " only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")", 4);
    plugin.SendPlayerMessage(killer.Name, "HELI-FARM-LIMIT: [WARNING] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");
    } else if (iHeliKills >= MaxHeliKillsInfo) {
    // info yell

    plugin.PRoConChat("(Psay + Pyell " + killer.Name + ") [HELI-FARM-LIMIT] [INFO] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");
    plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [INFO]\n" + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")", 10);
    plugin.SendPlayerMessage(killer.Name, "HELI-FARM-LIMIT: [INFO] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");
    }
    }
    }
    }

 

 

Posting Permissions

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