Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by HexaCanon*:

 

How can I add a "white list" with players excluded from that limit ?

in procon make a list and name it "White_List", and add the names you want in them.

 

use this expression

 

Code:

(  player.Kdr > 4.0   ||  player.Accuracy > 50  ) && !plugin.isInList(player.Name, "White_List")
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by shadow2k1*:

 

can someone tell me how i can go about making a shame list?

its for inner clan humor really and i would like it to work like the yell next map announcer code

where a player would type in

!douchebag

and a list would pop up with some names on it

 

thanks

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

can someone tell me how i can go about making a shame list?

its for inner clan humor really and i would like it to work like the yell next map announcer code

where a player would type in

!douchebag

and a list would pop up with some names on it

 

thanks

can do it if you give me more details on exactly how you want it to run.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Rucki*:

 

end of round report for procon chat.

 

Posted Image

 

evaluation : OnRoundOver

 

first check expression

 

Code:

(true)
Code:
TimeSpan Duration = TimeSpan.FromSeconds(server.TimeRound);

---cut---
---Edit---

Here the working code wits "good game" and "bad game" from HexaCanon

 

Code:

TimeSpan Duration = TimeSpan.FromSeconds(server.TimeRound);
String winner = "US";
if (server.WinTeamId == 2) winner = "RU";

String kMaxPlayers = "PCT_max"; // PCT = Player Count Tracker
String kMinPlayers = "PCT_min";
String kPlayers = "PCT_players";
String kTime = "PCT_time";
String kMapRound = "PCT_map_round";

if (!server.Data.issetInt(kPlayers)) {
    server.Data.setInt(kPlayers, 0);
}
if (!server.RoundData.issetInt(kMaxPlayers)) {
    server.RoundData.setInt(kMaxPlayers, 0);
}
if (!server.RoundData.issetInt(kMinPlayers)) {
    server.RoundData.setInt(kMinPlayers, 64);
}
if (!server.RoundData.issetObject(kTime)) {
	server.RoundData.setObject(kTime, DateTime.Now);
}
if (!server.RoundData.issetString(kMapRound)) {
	server.RoundData.setString(kMapRound, server.MapFileName + server.CurrentRound.ToString());
}

int level = 2;

try {
    level = Convert.ToInt32(plugin.getPluginVarValue("debug_level"));
} catch (Exception e) {}

/* Check for change */

int lastPlayers = server.Data.getInt(kPlayers);
int currentPlayers = server.PlayerCount;


/* Calculate net change */

int maxPlayers = server.RoundData.getInt(kMaxPlayers);
int minPlayers = server.RoundData.getInt(kMinPlayers);

int netChange = currentPlayers - lastPlayers;

if (maxPlayers < currentPlayers) {
	server.RoundData.setInt(kMaxPlayers, currentPlayers);
	maxPlayers = currentPlayers;
}
if (minPlayers > currentPlayers) {
	server.RoundData.setInt(kMinPlayers, currentPlayers);
	minPlayers = currentPlayers;
}
server.Data.setInt(kPlayers, currentPlayers);
server.RoundData.setObject(kTime, DateTime.Now);

/* BF3 friendly map names, including B2K */
Dictionary<String, String> maps = new Dictionary<String, String>();
maps.Add("MP_001", "Grand Bazaar");
maps.Add("MP_003", "Teheran Highway");
maps.Add("MP_007", "Caspian Border");
maps.Add("MP_011", "Seine Crossing");
maps.Add("MP_012", "Operation Firestorm");
maps.Add("MP_013", "Damavand Peak");
maps.Add("MP_017", "Noshahr Canals");
maps.Add("MP_018", "Kharg Island");
maps.Add("MP_Subway", "Operation Metro");
maps.Add("XP1_001", "Strike at Karkand");
maps.Add("XP1_002", "Gulf of Oman");
maps.Add("XP1_003", "Sharqi Peninsula");
maps.Add("XP1_004", "Wake Island");
maps.Add("XP2_Factory", "Scrapmetal");
maps.Add("XP2_Office", "Operation 925");
maps.Add("XP2_Palace", "Donya Fortress");
maps.Add("XP2_Skybar", "Ziba Tower");
maps.Add("XP3_Desert", "Bandar Desert");
maps.Add("XP3_Alborz", "Alborz Mountains");
maps.Add("XP3_Shield", "Armored Shield");
maps.Add("XP3_Valley", "Death Valley");

/* BF3 friendly game modes, including B2K */
Dictionary<String, String> modes = new Dictionary<String, String>();    
modes.Add("ConquestLarge0", "CQ64");
modes.Add("ConquestSmall0", "CQ");
modes.Add("ConquestSmall1", "CQA");
modes.Add("RushLarge0", "Rush");
modes.Add("SquadRush0", "SQRush");
modes.Add("SquadDeathMatch0", "SQDM");
modes.Add("TeamDeathMatch0", "TDM");
modes.Add("Domination0", "CQD");
modes.Add("GunMaster0", "GM");
modes.Add("TeamDeathMatchC0", "TDMC");
modes.Add("TankSuperiority0", "TankS");

String mapName = (maps.ContainsKey(server.MapFileName)) _ maps[server.MapFileName] : server.MapFileName;
String modeName = (modes.ContainsKey(server.Gamemode)) _ modes[server.Gamemode] : server.Gamemode;
String color = (netChange >= 0) _ "^2+" : "^8";
String time = DateTime.Now.ToString("HH:mm:ss");
String currMapRound = server.MapFileName + server.CurrentRound.ToString();

String ticket = "US : " + team1.Tickets + "/" + server.TargetTickets + " | RU : " + team2.Tickets + "/" + server.TargetTickets;
if (server.Gamemode == "ConquestLarge0" ||
server.Gamemode == "ConquestSmall0" ||
server.Gamemode == "ConquestSmall1" ||
server.Gamemode == "Domination0" ||
server.Gamemode == "TankSuperiority0") ticket = "US : " + team1.Tickets  + " | RU : " + team2.Tickets ;
String tCheck = null;

if (server.WinTeamId == 1 &&
(server.Gamemode == "ConquestLarge0" ||
server.Gamemode == "ConquestSmall0" ||
server.Gamemode == "ConquestSmall1" ||
server.Gamemode == "Domination0" ||
server.Gamemode == "TankSuperiority0") &&
team1.Tickets <= 100) tCheck = "^8This was a ^2 ^bGood^8 ^n Game^0";
if (server.WinTeamId == 2 &&
(server.Gamemode == "ConquestLarge0" ||
server.Gamemode == "ConquestSmall0" ||
server.Gamemode == "ConquestSmall1" ||
server.Gamemode == "Domination0" ||
server.Gamemode == "TankSuperiority0") &&
team2.Tickets <= 100) tCheck = "^8This was a ^2 ^bGood^8 ^n Game^0";
if (server.WinTeamId == 1 &&
(server.Gamemode == "SquadDeathMatch0" ||
server.Gamemode == "TeamDeathMatch0" ||
server.Gamemode == "TeamDeathMatchC0") &&
(team1.Tickets - team2.Tickets) <= 50) tCheck = "^8This was a ^2 ^bGood^8 ^n Game^0";
if (server.WinTeamId == 2 &&
(server.Gamemode == "SquadDeathMatch0" ||
server.Gamemode == "TeamDeathMatch0" ||
server.Gamemode == "TeamDeathMatchC0") &&
(team2.Tickets - team1.Tickets) <= 50) tCheck = "^8This was a ^2 ^bGood^8 ^n Game^0";
if (server.WinTeamId == 1 &&
(server.Gamemode == "ConquestLarge0" ||
server.Gamemode == "ConquestSmall0" ||
server.Gamemode == "ConquestSmall1" ||
server.Gamemode == "Domination0" ||
server.Gamemode == "TankSuperiority0") &&
team1.Tickets > 100) tCheck = "^8This was a ^1 ^bBad^8 ^n Game^0";
if (server.WinTeamId == 2 &&
(server.Gamemode == "ConquestLarge0" ||
server.Gamemode == "ConquestSmall0" ||
server.Gamemode == "ConquestSmall1" ||
server.Gamemode == "Domination0" ||
server.Gamemode == "TankSuperiority0") &&
team2.Tickets > 100) tCheck = "^8This was a ^1 ^bBad^8 ^n Game^0";
if (server.WinTeamId == 1 &&
(server.Gamemode == "SquadDeathMatch0" ||
server.Gamemode == "TeamDeathMatch0" ||
server.Gamemode == "TeamDeathMatchC0") &&
(team1.Tickets - team2.Tickets) > 50) tCheck = "^8This was a ^1 ^bBad^8 ^n Game^0";
if (server.WinTeamId == 2 &&
(server.Gamemode == "SquadDeathMatch0" ||
server.Gamemode == "TeamDeathMatch0" ||
server.Gamemode == "TeamDeathMatchC0") &&
(team2.Tickets - team1.Tickets) > 50) tCheck = "^8This was a ^1 ^bBad^8 ^n Game^0";


List<String> LogLines = new List<String>();
LogLines.Add("^8Time : " + time +"^0");
LogLines.Add("^8Duration : " + Duration +"^0");
LogLines.Add("^8Map Name : " + mapName +"^0");
LogLines.Add("^8Mode Name : " + modeName +"^0");
LogLines.Add("^8Round : " + (server.CurrentRound+1) + "/" + server.TotalRounds +"^0");
LogLines.Add("^8winner : " + winner +"^0");
if (server.Gamemode == "ConquestLarge0" ||
server.Gamemode == "ConquestSmall0" ||
server.Gamemode == "ConquestSmall1" ||
server.Gamemode == "Domination0" ||
server.Gamemode == "TankSuperiority0" ||
server.Gamemode == "SquadDeathMatch0" ||
server.Gamemode == "TeamDeathMatch0" ||
server.Gamemode == "TeamDeathMatchC0") {
LogLines.Add("^8Tickets : " + ticket +"^0");
LogLines.Add(tCheck);}
LogLines.Add("^8Players : "  + currentPlayers + "/" + server.MaxPlayers +"^0");
LogLines.Add("^8Minimum players on round : " + minPlayers +"^0");
LogLines.Add("^8Maximum players on round : " + maxPlayers +"^0");

if (true) {
    plugin.PRoConChat("^8>>>>RoundOver Report<<<<^0");
    foreach(string Line in LogLines) {
        plugin.PRoConChat(Line);
    }
return false;
}
This is working perfect!

Thanks again!

 

And now, pls dont hit me HexaCanon! :mad:

 

What i am looking for:

If it was a "good game" ->

Twitter "This was a good game! Tickets: x/y"

 

If it was a "bad game" ->

Twitter nothing.

 

Thx,

Rucki

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by shadow2k1*:

 

can do it if you give me more details on exactly how you want it to run.

hi,

I would like it to work the same way this yell next map code works

https://github.com/Singh400/insane-l...xt-Map-Command

 

the only difference is, when the command is entered it gives me a static list of player names

 

thanks for your help

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

hi,

I would like it to work the same way this yell next map code works

https://github.com/Singh400/insane-l...xt-Map-Command

 

the only difference is, when the command is entered it gives me a static list of player names

 

thanks for your help

on any chat

 

first check code

 

Code:

List<String> douchebags = new List<String>();
douchebags.Add("Player1Name");
douchebags.Add("Player2Name");
douchebags.Add("Player3Name");
douchebags.Add("Player4Name");
douchebags.Add("ETC..");



if (!Regex.Match(player.LastChat, @"^\s*!douchebags_", RegexOptions.IgnoreCase).Success) return false;

foreach(string douchebag in douchebags) {
plugin.SendGlobalMessage(douchebag);
plugin.ServerCommand("admin.yell", douchebag, "8", "player", player.Name);
}


return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Dear developer. Whether there is a possibility of determination of accuracy on the weapon of the player in a round? Using ShotsFired and ShotsHit?

No, that is not possible. That information is not available from the game server during a round.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by shadow2k1*:

 

on any chat

 

first check code

 

Code:

List<String> douchebags = new List<String>();
douchebags.Add("Player1Name");
douchebags.Add("Player2Name");
douchebags.Add("Player3Name");
douchebags.Add("Player4Name");
douchebags.Add("ETC..");



if (!Regex.Match(player.LastChat, @"^\s*!douchebags_", RegexOptions.IgnoreCase).Success) return false;

foreach(string douchebag in douchebags) {
plugin.SendGlobalMessage(douchebag);
plugin.ServerCommand("admin.yell", douchebag, "8", "player", player.Name);
}


return false;
shouldnt fist check be

 

Code:

player.LastChat.StartsWith("!douchbag")
and then your code?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

on any chat

 

first check code

 

Code:

foreach(string douchebag in douchebags) {
plugin.SendGlobalMessage(douchebag);
plugin.ServerCommand("admin.yell", douchebag, "8", "player", player.Name);
}
The yells will overwrite each other. It would work better to build up one message and just send it once.

 

Code:

String msg = "*** ";
bool first = true;
foreach(string douchebag in douchebags) {
    if (first) {
        msg = msg + douchebag;
        first = false;
    } else {
        msg = msg + "," + douchebag;
    }
}
plugin.SendGlobalMessage(msg);
plugin.ServerCommand("admin.yell", msg, "15", "player", player.Name);
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

shouldnt fist check be

 

Code:

player.LastChat.StartsWith("!douchbag")
and then your code?
Doesn't have to be like that. Hexa's code using ! which means not equal to or something like that.

 

I would have just gone for:-

Code:

List<string> douchebags = new List<string>();
douchebags.Add("Player1Name");
douchebags.Add("Player2Name");
douchebags.Add("Player3Name");
douchebags.Add("Player4Name");

if (Regex.Match(player.LastChat, @"^\s*!douchebags_", RegexOptions.IgnoreCase).Success)
	{	
		foreach (string douchebag in douchebags) 
			{
				plugin.SendGlobalMessage(douchebag);
				plugin.ServerCommand("admin.yell", douchebag, "8", "player", player.Name);
			}
	}

return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

The yells will overwrite each other. It would work better to build up one message and just send it once.

 

Code:

String msg = "*** ";
bool first = true;
foreach(string douchebag in douchebags) {
    if (first) {
        msg = msg + douchebag;
        first = false;
    } else {
        msg = msg + "," + douchebag;
    }
}
plugin.SendGlobalMessage(msg);
plugin.ServerCommand("admin.yell", msg, "15", "player", player.Name);
yeah, thats why i was asking him how exactly he wanted it. it was not clear and just give him an example.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Itz_cujo666*:

 

Hi,

 

I used this example limit* as a base.

 

I made minor modifications:

-changed timing

-modified so it works with 4 teams (we run SQDM)

-changed it so say only once.

 

How can I modify it so it works as is (say top scoring platoon only once), but also yells the top scoring platoon and it's members. example "Top Scoring platoon [XXX] - [XXX]playera, [XXX]playerb, [XXX]playerc", and so on...good if it's clear how to make it yell once, twice, or three times, depending on if I think it looks spammy...

 

Thanks if you can help, that's beyond my very small ability.. :smile:

-cujo

 

first check code

Code:

if (server.TimeRound < (3*60)) return false;
double t1 = 100;
double t2 = 100;
double t3 = 100;
double t4 = 100;
if (team1.players.Count > 0) t1 = team1.RemainTicketsPercent;
if (team2.players.Count > 0) t2 = team2.RemainTicketsPercent;
if (team3.players.Count > 0) t3 = team3.RemainTicketsPercent;
if (team4.players.Count > 0) t4 = team4.RemainTicketsPercent;

return(t1 < 8 || t2 < 8 || t3 < 8 || t4 < 8);
Second check code

Code:

double count = limit.Activations();
    
    if (count > 1)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
        if(player_info.Tag.Length == 0)
            continue;
        
        if (!clan_stats.ContainsKey(player_info.Tag))
            clan_stats.Add(player_info.Tag, 0);
        
        clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;
    
    foreach(KeyValuePair<String, double> pair in clan_stats)
        if (pair.Value > best_score)
        {
             best_clan = pair.Key;
             best_score = pair.Value;
        }
    
    if (best_clan.Length > 0)
	{
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
                plugin.SendGlobalMessage(message); 
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }   
    return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by aduh*:

 

in procon make a list and name it "White_List", and add the names you want in them.

 

use this expression

 

Code:

(  player.Kdr > 4.0   ||  player.Accuracy > 50  ) && !plugin.isInList(player.Name, "White_List")
Thank you
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by aduh*:

 

I have install Killers & Victims Tracker but it doesnt do anything beyond tracking.

I would like to compile new limit for announcing when a victim has been killed more than 10 times by a single player.

Any help please ?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Hi,

 

I used this example limit* as a base.

 

I made minor modifications:

-changed timing

-modified so it works with 4 teams (we run SQDM)

-changed it so say only once.

 

How can I modify it so it works as is (say top scoring platoon only once), but also yells the top scoring platoon and it's members. example "Top Scoring platoon [XXX] - [XXX]playera, [XXX]playerb, [XXX]playerc", and so on...good if it's clear how to make it yell once, twice, or three times, depending on if I think it looks spammy...

 

Thanks if you can help, that's beyond my very small ability.. :smile:

-cujo

 

first check code

Code:

if (server.TimeRound < (3*60)) return false;
double t1 = 100;
double t2 = 100;
double t3 = 100;
double t4 = 100;
if (team1.players.Count > 0) t1 = team1.RemainTicketsPercent;
if (team2.players.Count > 0) t2 = team2.RemainTicketsPercent;
if (team3.players.Count > 0) t3 = team3.RemainTicketsPercent;
if (team4.players.Count > 0) t4 = team4.RemainTicketsPercent;

return(t1 < 8 || t2 < 8 || t3 < 8 || t4 < 8);
Second check code

Code:

double count = limit.Activations();
    
    if (count > 1)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
        if(player_info.Tag.Length == 0)
            continue;
        
        if (!clan_stats.ContainsKey(player_info.Tag))
            clan_stats.Add(player_info.Tag, 0);
        
        clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;
    
    foreach(KeyValuePair<String, double> pair in clan_stats)
        if (pair.Value > best_score)
        {
             best_clan = pair.Key;
             best_score = pair.Value;
        }
    
    if (best_clan.Length > 0)
	{
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
                plugin.SendGlobalMessage(message); 
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }   
    return false;
second check code

Code:

double count = limit.Activations();
    
    if (count > 1)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
        if(player_info.Tag.Length == 0)
            continue;
        
        if (!clan_stats.ContainsKey(player_info.Tag))
            clan_stats.Add(player_info.Tag, 0);
        
        clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;
    
    foreach(KeyValuePair<String, double> pair in clan_stats)
        if (pair.Value > best_score)
        {
             best_clan = pair.Key;
             best_score = pair.Value;
        }
    
    if (best_clan.Length > 0)
	{
		String playerTag = best_clan;

	List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

	foreach (PlayerInfoInterface p in players) {
		String clanTag = p.Tag;
		if (String.IsNullOrEmpty(clanTag)) continue;
		if (clanTag != playerTag) continue;
		// Found a clan member!
		clan.Add(p);
	}
	
	String msg = "*** ";
	bool first = true;
	foreach(string clan_member in clan) {
		if (first) {
			msg = msg + clan_member;
			first = false;
		} else {
			msg = msg + "," + clan_member;
		}
	}
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
                plugin.SendGlobalMessage(message);
				foreach(string clan_member in clan) {
				plugin.SendGlobalMessage("["+best_clan+"]"+clan_member);
				}
		String message = "TOP PLATOON this round is ["+ best_clan + "] -" + msg + " with " + best_score + " points!";
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }
return false;
did not compile or test it yet.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

Yeah, that's good. Technically, you could simplify ? to s_, the square brackets are for a list of characters. Also, if you want to match any number of ! or ? at the end, so you could catch for example paki!!!!!!!_!!_!_!!!, use * instead of _. * means zero or more matches, while ? means zero or one match.

 

So:

 

Code:

if (Regex.Match(chatword, "^"+racism+@"s_[!_]*$", RegexOptions.IgnoreCase).Success)
Finally, if you want to invert the list, meaning, match everything except for what's in the list, you add ^ to the front of the list. So [^a-z0-9]* will match everything that isn't a letter or digit. That would catch nigga$ or paki_________, etc., as well as nigger!!! and paki___!_.
I went for

Code:

if (Regex.Match(chatword, "^"+racism+"[s]*[!_.]*$", RegexOptions.IgnoreCase).Success)
In the end.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by shadow2k1*:

 

Doesn't have to be like that. Hexa's code using ! which means not equal to or something like that.

 

I would have just gone for:-

Code:

List<string> douchebags = new List<string>();
douchebags.Add("Player1Name");
douchebags.Add("Player2Name");
douchebags.Add("Player3Name");
douchebags.Add("Player4Name");

if (Regex.Match(player.LastChat, @"^\s*!douchebags_", RegexOptions.IgnoreCase).Success)
	{	
		foreach (string douchebag in douchebags) 
			{
				plugin.SendGlobalMessage(douchebag);
				plugin.ServerCommand("admin.yell", douchebag, "8", "player", player.Name);
			}
	}

return false;
I got Hexa's installed and it works nice. thanks Hexacanon.

i changed the yell to a say though.

 

Singh, whats the difference between your code and his? does yours popup each name 1 at a time?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by MDV666*:

 

Dear colleagues. Whether prompt please everything correctly in my code? Or give other code for permanent Ban.

 

Code:

{	
		plugin.Log("Logs/InsaneLimits_PKA2.csv", plugin.R("%date%,%time%,%p_n%,%l_n%,%p_pg%," + p_ka + "")) ;
                plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Permanent, player.Name, 0, " Cheat v.6 ");
	}

return false ;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Dear colleagues. Whether prompt please everything correctly in my code? Or give other code for permanent Ban.

 

Code:

{	
		plugin.Log("Logs/InsaneLimits_PKA2.csv", plugin.R("%date%,%time%,%p_n%,%l_n%,%p_pg%," + p_ka + "")) ;
                plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Permanent, player.Name, 0, " Cheat v.6 ");
	}

return false ;
i see nothing wrong.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Itz_cujo666*:

 

Hi HexaCanon,

 

Thanks for your help, from below, I got these errors...

[17:53:29 26] [insane Limits] ERROR: 4 errors compiling Code

[17:53:29 26] [insane Limits] ERROR: (CS0162, line: 33, column: 13): Unreachable code detected

[17:53:29 26] [insane Limits] ERROR: (CS0030, line: 97, column: 14): Cannot convert type 'PRoConEvents.PlayerInfoInterface' to 'string'

[17:53:29 26] [insane Limits] ERROR: (CS0030, line: 107, column: 17): Cannot convert type 'PRoConEvents.PlayerInfoInterface' to 'string'

[17:53:29 26] [insane Limits] ERROR: (CS0128, line: 110, column: 22): A local variable named 'message' is already defined in this scope

 

Any help appreciated! :smile:

 

second check code

Code:

double count = limit.Activations();
    
    if (count > 1)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
        if(player_info.Tag.Length == 0)
            continue;
        
        if (!clan_stats.ContainsKey(player_info.Tag))
            clan_stats.Add(player_info.Tag, 0);
        
        clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;
    
    foreach(KeyValuePair<String, double> pair in clan_stats)
        if (pair.Value > best_score)
        {
             best_clan = pair.Key;
             best_score = pair.Value;
        }
    
    if (best_clan.Length > 0)
	{
		String playerTag = best_clan;

	List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

	foreach (PlayerInfoInterface p in players) {
		String clanTag = p.Tag;
		if (String.IsNullOrEmpty(clanTag)) continue;
		if (clanTag != playerTag) continue;
		// Found a clan member!
		clan.Add(p);
	}
	
	String msg = "*** ";
	bool first = true;
	foreach(string clan_member in clan) {
		if (first) {
			msg = msg + clan_member;
			first = false;
		} else {
			msg = msg + "," + clan_member;
		}
	}
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
                plugin.SendGlobalMessage(message);
				foreach(string clan_member in clan) {
				plugin.SendGlobalMessage("["+best_clan+"]"+clan_member);
				}
		String message = "TOP PLATOON this round is ["+ best_clan + "] -" + msg + " with " + best_score + " points!";
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }
return false;
did not compile or test it yet.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Hi HexaCanon,

 

Thanks for your help, from below, I got these errors...

[17:53:29 26] [insane Limits] ERROR: 4 errors compiling Code

[17:53:29 26] [insane Limits] ERROR: (CS0162, line: 33, column: 13): Unreachable code detected

[17:53:29 26] [insane Limits] ERROR: (CS0030, line: 97, column: 14): Cannot convert type 'PRoConEvents.PlayerInfoInterface' to 'string'

[17:53:29 26] [insane Limits] ERROR: (CS0030, line: 107, column: 17): Cannot convert type 'PRoConEvents.PlayerInfoInterface' to 'string'

[17:53:29 26] [insane Limits] ERROR: (CS0128, line: 110, column: 22): A local variable named 'message' is already defined in this scope

 

Any help appreciated! :smile:

first check code

 

Code:

if (server.TimeRound < (3*60)) return false;
double t1 = 100;
double t2 = 100;
double t3 = 100;
double t4 = 100;
if (team1.players.Count > 0) t1 = team1.RemainTicketsPercent;
if (team2.players.Count > 0) t2 = team2.RemainTicketsPercent;
if (team3.players.Count > 0) t3 = team3.RemainTicketsPercent;
if (team4.players.Count > 0) t4 = team4.RemainTicketsPercent;

if (t1 < 8 || t2 < 8 || t3 < 8 || t4 < 8) return true;
else return false;
second check code

Code:

double count = limit.Activations();
    
    if (count > 1)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
        if(player_info.Tag.Length == 0)
            continue;
        
        if (!clan_stats.ContainsKey(player_info.Tag))
            clan_stats.Add(player_info.Tag, 0);
        
        clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;
    
    foreach(KeyValuePair<String, double> pair in clan_stats)
        if (pair.Value > best_score)
        {
             best_clan = pair.Key;
             best_score = pair.Value;
        }
    
    if (best_clan.Length > 0)
	{
		String playerTag = best_clan;

	List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

	foreach (PlayerInfoInterface p in players) {
		String clanTag = p.Tag;
		if (String.IsNullOrEmpty(clanTag)) continue;
		if (clanTag != playerTag) continue;
		// Found a clan member!
		clan.Add(p);
	}
	
	String msg = "["+best_clan+"]";
	bool first = true;
	foreach(PlayerInfoInterface clan_member in clan) {
		if (first) {
			msg = msg + clan_member.Name;
			first = false;
		} else {
			msg = msg + " ,[" + best_clan +"]" + clan_member.Name;
		}
	}
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
                plugin.SendGlobalMessage(message);
				foreach(PlayerInfoInterface clan_member in clan) {
				plugin.SendGlobalMessage("["+best_clan+"]"+clan_member.Name);
				}
		message = "TOP PLATOON this round is ["+ best_clan + "] -" + msg + " with " + best_score + " points!";
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }
return false;
this is compiled , please test it to see if it is working as intended.

 

Edit : i am testing it now, found some mistakes i will replace the code in few minutes, when i do i will add a new edit message telling you about it.

 

Edit 2 : should work now hopefully.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

Is it possible to setup a plug in for Jets and Helicopters only. I want to set this up on a scrim server for air to air combat only

No, I don't think so. As all vehicle kills are reported as [DEATH].
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by droopie*:

 

i have asked this before but cant find it. dont think it was ever made. i want to use the grant vip's limited kick/ban limit but to earn that status, i would like players to stay idle in the server. for example, for every 12 hours of being idle in the logs, ill add you as a vip to get admin. something like that.

 

i dont know how to approach this logging system of players. even if it takes a snapshot of people that havnt spawned. maybe like every 10min do a check and write the people down who have 0-0-0 (score-kills-deaths) would be easier?

 

like

1:00am check

player1

player2

player3

 

1:10am check

player2

player4

 

etc...

 

from that i can see player2 was the most idle and not just a bathroom break. it would also allow me to see that player was idle for over 10min in my example and not just a player that just joined and has a score of 0-0-0 when the log started. like i said im not sure but just trying to show what i need.

 

 

 

 

if that is not possible at all (logging idlers) then what about logging time connected for every 12 or 24 hours?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

i have asked this before but cant find it. dont think it was ever made. i want to use the grant vip's limited kick/ban limit but to earn that status, i would like players to stay idle in the server. for example, for every 12 hours of being idle in the logs, ill add you as a vip to get admin. something like that.

 

i dont know how to approach this logging system of players. even if it takes a snapshot of people that havnt spawned. maybe like every 10min do a check and write the people down who have 0-0-0 (score-kills-deaths) would be easier?

 

like

1:00am check

player1

player2

player3

 

1:10am check

player2

player4

 

etc...

 

from that i can see player2 was the most idle and not just a bathroom break. it would also allow me to see that player was idle for over 10min in my example and not just a player that just joined and has a score of 0-0-0 when the log started. like i said im not sure but just trying to show what i need.

 

 

 

 

if that is not possible at all (logging idlers) then what about logging time connected for every 12 or 24 hours?

doubt it is doable, you will need some kind of database set up for player information.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Itz_cujo666*:

 

Hi HexaCanon,

 

Thanks for your help, much appreciated.

 

This is expanding the players names in the say, each name (and the top platoon/score message) on a separate line.

 

Is it possible to have the players names only in the yell, and the say remains just top platoon and their score (no names). Right now, it's making a new line in say for each player...

 

Thanks,

Cujo

 

second check code

Code:

double count = limit.Activations();
    
    if (count > 1)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
        if(player_info.Tag.Length == 0)
            continue;
        
        if (!clan_stats.ContainsKey(player_info.Tag))
            clan_stats.Add(player_info.Tag, 0);
        
        clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;
    
    foreach(KeyValuePair<String, double> pair in clan_stats)
        if (pair.Value > best_score)
        {
             best_clan = pair.Key;
             best_score = pair.Value;
        }
    
    if (best_clan.Length > 0)
	{
		String playerTag = best_clan;

	List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

	foreach (PlayerInfoInterface p in players) {
		String clanTag = p.Tag;
		if (String.IsNullOrEmpty(clanTag)) continue;
		if (clanTag != playerTag) continue;
		// Found a clan member!
		clan.Add(p);
	}
	
	String msg = "["+best_clan+"]";
	bool first = true;
	foreach(PlayerInfoInterface clan_member in clan) {
		if (first) {
			msg = msg + clan_member.Name;
			first = false;
		} else {
			msg = msg + " ,[" + best_clan +"]" + clan_member.Name;
		}
	}
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
                plugin.SendGlobalMessage(message);
				foreach(PlayerInfoInterface clan_member in clan) {
				plugin.SendGlobalMessage("["+best_clan+"]"+clan_member.Name);
				}
		message = "TOP PLATOON this round is ["+ best_clan + "] -" + msg + " with " + best_score + " points!";
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }
return false;
this is compiled , please test it to see if it is working as intended.

 

Edit : i am testing it now, found some mistakes i will replace the code in few minutes, when i do i will add a new edit message telling you about it.

 

Edit 2 : should work now hopefully.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Hi HexaCanon,

 

Thanks for your help, much appreciated.

 

This is expanding the players names in the say, each name (and the top platoon/score message) on a separate line.

 

Is it possible to have the players names only in the yell, and the say remains just top platoon and their score (no names). Right now, it's making a new line in say for each player...

 

Thanks,

Cujo

Code:
double count = limit.Activations();
    
    if (count > 1)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
        if(player_info.Tag.Length == 0)
            continue;
        
        if (!clan_stats.ContainsKey(player_info.Tag))
            clan_stats.Add(player_info.Tag, 0);
        
        clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;
    
    foreach(KeyValuePair<String, double> pair in clan_stats)
        if (pair.Value > best_score)
        {
             best_clan = pair.Key;
             best_score = pair.Value;
        }
    
    if (best_clan.Length > 0)
	{
		String playerTag = best_clan;

	List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

	foreach (PlayerInfoInterface p in players) {
		String clanTag = p.Tag;
		if (String.IsNullOrEmpty(clanTag)) continue;
		if (clanTag != playerTag) continue;
		// Found a clan member!
		clan.Add(p);
	}
	
	String msg = "["+best_clan+"]";
	bool first = true;
	foreach(PlayerInfoInterface clan_member in clan) {
		if (first) {
			msg = msg + clan_member.Name;
			first = false;
		} else {
			msg = msg + " ,[" + best_clan +"]" + clan_member.Name;
		}
	}
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
        plugin.SendGlobalMessage(message);
		message = "TOP PLATOON this round is ["+ best_clan + "] -" + msg + " with " + best_score + " points!";
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

if that is not possible at all (logging idlers) then what about logging time connected for every 12 or 24 hours?

I agree with HexaCanon. You probably need a database to do this right. The main problem is that every time the PRoCon layer is restarted or the plugin is reloaded/re-enabled, you lose all your data.

 

If you are willing to put up with some lost data from time to time, give this a try:

 

Log idle players*

 

I didn't have time to compile it so it probably has errors. Let me know if you need help fixing them (post in that thread). I'll compile it later and post fixes.

* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.