Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by w262035635*:

 

Now that makes sense. I hope that is actually what was meant. :smile:

 

If the goal is to IGNORE the clan tag, that just means removing code. Try this:

 

Code:

String checkTag = "XXX"; // CHANGE
int maxTagCount = 5; // CHANGE


String ptag = null;
if (String.IsNullOrEmpty(ptag)) {
    // Maybe they are using [_-=]XXX[=-_]PlayerName format
    Match tm = Regex.Match(player.Name, @"^[=_\-]_([^=_\-]{2,4})[=_\-]");
    if (tm.Success) {
        ptag = tm.Groups[1].Value;
    }
}

if (ptag != checkTag)
    return false;

List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);

int count = 0;
foreach (PlayerInfoInterface p in all) {
    ptag = null;
    if (String.IsNullOrEmpty(ptag)) {
        // Maybe they are using [_-=]XXX[=-_]PlayerName format
        Match tm = Regex.Match(p.Name, @"^[=_\-]_([^=_\-]{2,4})[=_\-]");
        if (tm.Success) {
            ptag = tm.Groups[1].Value;
        }
    }
    if (ptag == checkTag) {
        count = count + 1;
    }
}

// Check count and kick
if (count > maxTagCount) {
    plugin.KickPlayerWithMessage(player.Name, "Too many players with [" + checkTag + "] clan tag"); // CHANGE
}
return false;
I will test the code. Thank you for your help
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Okay i have another request! Is this possible:

 

Detect what language the player is chatting in, based upon this API: Code:

http://ws.detectlanguage.com/0.2/detect_q=buenos+dias+se%C3%B1or&key=demo
Define what languages is allowed by codes, e.g: "en", "no", "se", "dk" etc...

 

If any other language, do action on player. :tongue:

 

I was thinking something like the Google profanity API limit: showthread....Google-service*

 

Thanks in advance! :cool:

I guess "isReliable": needs to be true as well, to make it less aggressive.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LumPenPacK*:

 

Hi.. guys

do your know what plugins. can 10 seconds after the end of the round.

Immediately to the next round? Instead of waiting for 40 seconds

I won't recommend that. It can break a lot of things plugins need to do between map change.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by w262035635*:

 

I won't recommend that. It can break a lot of things plugins need to do between map change.

But I still want to do. I know that may cause other plugins disorder. Such as balance plugin

 

can you tell me it what plugin _can 10 seconds after Immediately to the next round?

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

Originally Posted by LCARSx64*:

 

Hi.. guys

do your know what plugins. can 10 seconds after the end of the round.

Immediately to the next round? Instead of waiting for 40 seconds

Since you still want this even knowing the risks, this can be done with a limit:

 

NOTE: The delay method used here is NOT for events that trigger frequently!

 


Delayed Skip Round

 

Create a new limit to evaluate OnRoundOver. Set action to None.

 

Set first_check to this Code:

Code:

// Delayed Skip Round

Thread ender = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = 10; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                plugin.ServerCommand("mapList.runNextRound");
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

ender.Name = "RoundEnder";
ender.Start();

return false;

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

Originally Posted by w262035635*:

 

Since you still want this even knowing the risks, this can be done with a limit:

 

NOTE: The delay method used here is NOT for events that trigger frequently!

 


Delayed Skip Round

 

Create a new limit to evaluate OnRoundOver. Set action to None.

 

Set first_check to this Code:

Code:

// Delayed Skip Round

Thread ender = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = 10; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                plugin.ServerCommand("mapList.runNextRound");
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

ender.Name = "RoundEnder";
ender.Start();

return false;

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

Originally Posted by PapaCharlie9*:

 

Since you still want this even knowing the risks, this can be done with a limit:

 

NOTE: The delay method used here is NOT for events that trigger frequently!

 


Delayed Skip Round

 

Create a new limit to evaluate OnRoundOver. Set action to None.

 

Set first_check to this Code:

Code:

// Delayed Skip Round

Thread ender = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = 10; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                plugin.ServerCommand("mapList.runNextRound");
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

ender.Name = "RoundEnder";
ender.Start();

return false;

Put a global bear trap flag on free running threads and there's less risk.

 

Before the declaration of the thread:

 

Code:

String flag = "Thread safety beartrap";
Inside the thread at the top (inside the try):

 

Code:

lock(plugin) {
    if (plugin.Data.issetBool(flag))
        return; // There is another thread running, bail out
    plugin.Data.setBool(flag);
}
Add a finally clause to the try:

 

Code:

} finally {
    lock(plugin) {
        if (plugin.Data.issetBool(flag))
            plugin.Data.unsetBool(flag);
    }
}
Read/write ops on Data and RoundData are locked and thread safe, so you only need additional locking to make sure the check/sets are atomic.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

REPOST: Okay i have another request! Is this possible:

 

Detect what language the player is chatting in, based upon this API: Code:

http://ws.detectlanguage.com/0.2/detect_q=buenos+dias+se%C3%B1or&key=demo
Define what languages is allowed by codes, e.g: "en", "no", "se", "dk" etc...

 

If any other language, do action on player. :tongue:

 

I was thinking something like the Google profanity API limit: showthread....Google-service*

 

Thanks in advance! :cool:

 

I guess "isReliable": needs to be true as well, to make it less aggressive.

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

Originally Posted by DoMMike*:

 

I tried searching and couldn't find anything. When the server is empty the server turn to a knife and pistol server only. Once the server gets populated to 10 players. All weapons are available.

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

Originally Posted by TMiland*:

 

I tried searching and couldn't find anything. When the server is empty the server turn to a knife and pistol server only. Once the server gets populated to 10 players. All weapons are available.

Try this:

Set the limit to evaluate OnKill and set the Action to None.

 

Set first_check to this Expression:

Code:

((kill.Category != "Handgun" || Regex.Match(kill.Weapon, @"(M93R|Glock18|SerbuShorty)", RegexOptions.IgnoreCase).Success) 
&& !(kill.Category == "Suicide" || kill.Category == "Melee" || kill.Category == "Nonlethal" || kill.Category == "None") && (server.PlayerCount <= 10))
Set second_check to this Code:

Code:

String kCounter = killer.Name + "_TreatAsOne_Count";
TimeSpan time = TimeSpan.FromSeconds(3); // Activations within 3 seconds count as 1

int warnings = 0;
if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);
    
/*
The first time through, warnings is zero. Whether this is an isolated
activation or the first of a sequence of activations in a short period
of time, do something on this first time through.
*/
String msg = "none";
if (warnings == 0) {
        msg = plugin.R("ATTENTION %k_n%! Do not use %w_n%! THIS IS KNIFES & PISTOLS ONLY!"); // First warning message
        plugin.ServerCommand("admin.say", msg, "player", killer.Name);
        plugin.SendPlayerYell(killer.Name, msg, 20);
        plugin.PRoConChat("ADMIN > " + msg);
		plugin.SendGlobalMessage(msg);
        plugin.KillPlayer(killer.Name, 3);
		plugin.ConsoleWrite("^b^1ILLEGAL WEAPON!^0^n " + killer.FullName + " used " + kill.Weapon + " against " + victim.FullName);

        server.Data.setInt(kCounter, warnings+1);
        return false;
}

/*
The second and subsequent times through, check to make sure we are not
getting multiple activations in a short period of time. Ignore if
less than the time span required.
*/

if (limit.Activations(killer.Name, time) > 1) return false;

/*
We get here only if there was exactly one activation in the time span
*/

if (warnings == 1) {
        msg = plugin.R("FINAL WARNING %k_n%! Do not use %w_n%! Next Violation is a KICK!"); // Second warning message
        plugin.ServerCommand("admin.say", msg, "player", killer.Name);
        plugin.SendPlayerYell(killer.Name, msg, 20);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.KillPlayer(killer.Name, 3);
		plugin.ConsoleWrite("^b^1ILLEGAL WEAPON!^0^n " + killer.FullName + " used " + kill.Weapon + " against " + victim.FullName);

} else if (warnings == 2) {
        msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%!");
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.PRoConEvent(msg, "Insane Limits");
        plugin.KickPlayerWithMessage(killer.Name, msg);
} else if (warnings > 2) {
        msg = plugin.R("TBANNING %k_n% for 30mins. Still using PROHIBITED WEAPONS after being kicked!");
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.PRoConEvent(msg, "Insane Limits");
        plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 30 /* minutes */, msg);
}
server.Data.setInt(kCounter, warnings+1);
return false;
Modify as you see fit. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

REPOST: Okay i have another request! Is this possible:

 

Detect what language the player is chatting in, based upon this API: Code:

http://ws.detectlanguage.com/0.2/detect_q=buenos+dias+se%C3%B1or&key=demo
Define what languages is allowed by codes, e.g: "en", "no", "se", "dk" etc...

 

If any other language, do action on player. :tongue:

 

I was thinking something like the Google profanity API limit: showthread....Google-service*

 

Thanks in advance! :cool:

 

I guess "isReliable": needs to be true as well, to make it less aggressive.

The "key=demo" part of the URL worried me. So I looked up the website and it is as I feared, it is a for-pay service:

 

Plans

Choose the plan which best fits your needs. You can upgrade or downgrade later.

 

Free

5,000 requests/day

1 MB/day

Free

 

Sign Up

 

Basic

100,000 requests/day

20 MB/day

$5/month

 

Sign Up

 

Plus

1M requests/day

200 MB/day

$15/month

 

Sign Up

 

Premium

10M requests/day

2 GB/day

$40/month

 

Sign Up

You can easily have more than 5000 chat messages a day for a single Procon layer, particularly if you run multiple servers.

 

I guess you could just run out your 5000 free requests and just have it stop working at some point every day, but I dunno. Hardly seems worth the trouble.

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

Originally Posted by TMiland*:

 

The "key=demo" part of the URL worried me. So I looked up the website and it is as I feared, it is a for-pay service:

 

 

 

You can easily have more than 5000 chat messages a day for a single Procon layer, particularly if you run multiple servers.

 

I guess you could just run out your 5000 free requests and just have it stop working at some point every day, but I dunno. Hardly seems worth the trouble.

Okay, deleted the last post. I have managed to make it work with Google API, and it will return true if any other language than english or scandinavian are written in chat.

 

Here's the code if anyone is interested: myrcon.net/...insane-limits-mute-on-foreign-language-google-translate-api#entry50189

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

Originally Posted by GR101*:

 

I'm not aware of an Insane Limit that does that. It's a cool idea, I'd like to see someone do it. I'm too lazy myself. :smile:

 

I think I'd replace Most Deaths with Best Squad (per team, by kills or score). Why be negative?

 

EDIT: If I were to do it, I would:

 

* Use OnRoundOver

 

* Put all the players from team1.players and team2.players in a list (all)

 

* Write a search loop and have variables for each of the "Most" and "Bests" in the list, one for the number, one for the player object. For example, Most Kills would be:

 

Code:

double maxKills = 0;
PlayerInfoInterface mostKills = null;
...
foreach (PlayerInfoInterface p in all) {
...
    if (p.Kills > maxKills) {
        mostKills = p;
        maxKills = p.Kills;
    }
...
}
* Try to format all the stats into one chat line, but repeat it once or twice with a few seconds in between, to allow for all the "gg" and "easy" messages that players tend to type at the end. That might need a second limit for the timing.
Did anybody create this end of round stats limit without using a database or ProconRulz?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by shunyong9*:

 

Use the Ultimate Map Manager plugin:

 

showthread....-4-0-02-03-14)*

 

That's what everyone running mixed mode uses.

Hi PapaCharlie

 

Thanks a lot. We will look into this :smile:

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

Originally Posted by TMiland*:

 

No idea if this has been suggested before, but here goes:

 

If only 1 commander, disallow the use of Gunship and Tomahawk!

 

So if the commander deploys the gunship & any players kills with the gunship = warn/kick the commander for deploying the gunship.

 

Spawning in the gunship is okay, that is not possible to prevent.

 

And if the commander kills with Tomahawk = warn/kick the commander.

 

Is this possible to do?

 

I want to limit the huge advantage the one team with one commander has over the other that has none, and thought this would help balance the game a bit. :smile:

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

Originally Posted by ChironeX-BF3*:

 

Hello,

 

I don't know if this can be done with insane limits but i am looking for a custom "rule violation", since my English is not so good this is what i am looking:

 

Player36 is baseraping which is forbidden by our rules:

 

!warn Player36 baserape

=> Player36 (name prefered, not EA guid) is written somewhere, on a txt file or wathever with amount of warn

=> Player36 get killed with message: Baserape is not allowed here, please type !rules in the chat to get the list

=> Player36 get a 20 sec yell: After 3 warning you will be banned for 15 days. Warn count: 1/3.

=> Public 10 sec yell: Player36 break our rules and win a warn, shame on him!

Once the player reach that limit, he is temporary banned by his EA guid for 15 days.

 

After 15 days if the player come and break the rules again he has two more chance:

 

!warn Player36 stealing

=> Player36 get killed with message: Vehicle stealing is not allowed here, please type !rules in the chat to get the list

=> Player36 get a 20 sec yell: Take care, after 5 warning you will be permanently banned. Warn count: 4/5.

=> Public 10 sec yell: Player36 break our rules and win a warn, shame on him!

Once the player reach that limit, he is permanently banned by his EA guid.

 

We have others rules but the command should work in shortcut:

baserape: Baserape is not allowed on this server, please read server rules

stealing: Vehicle stealing is not allowed on this server, please read server rules

etc..

 

I seen something similar on a server some days ago, great feature :smile:

 

Thank you

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

Originally Posted by chicken*:

 

Hey papa I have a request if possible.

 

We run a hardcore tdm server on bf4, and we have a problem with people team killing at the start of the round. Is there a way that we can set say if you have 3 or more team kills within the first 10 seconds of a round for our server to issue a permanent pb guid ban?

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

Originally Posted by PapaCharlie9*:

 

No idea if this has been suggested before, but here goes:

 

If only 1 commander, disallow the use of Gunship and Tomahawk!

 

So if the commander deploys the gunship & any players kills with the gunship = warn/kick the commander for deploying the gunship.

 

Spawning in the gunship is okay, that is not possible to prevent.

 

And if the commander kills with Tomahawk = warn/kick the commander.

 

Is this possible to do?

 

I want to limit the huge advantage the one team with one commander has over the other that has none, and thought this would help balance the game a bit. :smile:

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

Originally Posted by PapaCharlie9*:

 

Hello,

 

I don't know if this can be done with insane limits but i am looking for a custom "rule violation", since my English is not so good this is what i am looking:

 

Player36 is baseraping which is forbidden by our rules:

 

 

Once the player reach that limit, he is temporary banned by his EA guid for 15 days.

 

After 15 days if the player come and break the rules again he has two more chance:

 

 

Once the player reach that limit, he is permanently banned by his EA guid.

 

We have others rules but the command should work in shortcut:

baserape: Baserape is not allowed on this server, please read server rules

stealing: Vehicle stealing is not allowed on this server, please read server rules

etc..

 

I seen something similar on a server some days ago, great feature :smile:

 

Thank you

I think the AdKats plugin does that. Check that plugin.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hey papa I have a request if possible.

 

We run a hardcore tdm server on bf4, and we have a problem with people team killing at the start of the round. Is there a way that we can set say if you have 3 or more team kills within the first 10 seconds of a round for our server to issue a permanent pb guid ban?

Easy.

 

Create a limit to evaluate OnTeamKill, call it "Team Kill Ban".

 

Set first_check to this Expression:

 

Code:

(killer.TeamKillsRound >= 3 && server.TimeRound < 10)
Set Action (new_action) to PBBan, Show the rest of the form and fill it in.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

No idea if this has been suggested before, but here goes:

 

If only 1 commander, disallow the use of Gunship and Tomahawk!

 

So if the commander deploys the gunship & any players kills with the gunship = warn/kick the commander for deploying the gunship.

 

Spawning in the gunship is okay, that is not possible to prevent.

 

And if the commander kills with Tomahawk = warn/kick the commander.

 

Is this possible to do?

 

I want to limit the huge advantage the one team with one commander has over the other that has none, and thought this would help balance the game a bit. :smile:

Not possible. :sad:

Why isn't it possible?

 

I know it is possible to detect kill weapon Tomahawk, same for Gunship, that leaves the commander, not possible to kick?

I'm not sure Papa is saying that it's flat-out impossible, I think he's saying it's not possible the way you have described because it is possible ... kind of:

 

The biggest problem I can see is with the gunship. Let's say there's only one commander online, he/she deploys the gunship and someone spawns in it and kills an enemy player. The commander then gets a warning tell him/her not to deploy a gunship whist there is only one commander online. This is all good and not a problem, however, that same gunship is still active meaning the player in it is free to kill with it again. On the second the kill, the commander will now be kicked for deploying it and not given a chance not to re-deploy it as a second offense.

I'm not sure if the gunship stays deployed for X number of minutes/seconds or until it's taken down, the enemy caps the associated flag or the round ends. If it is up for a set time, then this may be used as a way of not punishing the commander for the initial deployment. Alternatively, the player that used the gunship to kill could also be warned on first kill and killed on the second kill (like a normal weapon limit would do), but then you still have the problem of how long the gunship remains active. Again if it's a timed deployment, you could then set a flag on the commander after the initial player kill from it signifying no action to be taken on the commander, the flag would then be cleared when the deployment time expires.

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

Originally Posted by TMiland*:

 

I'm not sure Papa is saying that it's flat-out impossible, I think he's saying it's not possible the way you have described because it is possible ... kind of:

 

The biggest problem I can see is with the gunship. Let's say there's only one commander online, he/she deploys the gunship and someone spawns in it and kills an enemy player. The commander then gets a warning tell him/her not to deploy a gunship whist there is only one commander online. This is all good and not a problem, however, that same gunship is still active meaning the player in it is free to kill with it again. On the second the kill, the commander will now be kicked for deploying it and not given a chance not to re-deploy it as a second offense.

I'm not sure if the gunship stays deployed for X number of minutes/seconds or until it's taken down, the enemy caps the associated flag or the round ends. If it is up for a set time, then this may be used as a way of not punishing the commander for the initial deployment. Alternatively, the player that used the gunship to kill could also be warned on first kill and killed on the second kill (like a normal weapon limit would do), but then you still have the problem of how long the gunship remains active. Again if it's a timed deployment, you could then set a flag on the commander after the initial player kill from it signifying no action to be taken on the commander, the flag would then be cleared when the deployment time expires.

Okay i get it. But how can i check if there's only one commander on a server?

 

If i can do that, i guess i can figure out the rest on my own, :ohmy:

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

Originally Posted by LCARSx64*:

 

You can check with player.Role, if it's 2 then the player is a PC commander, if it's 3 then the player is a Mobile commander.

You can do this OnJoin or you can grab a list of all players and check if a player has a Role of 2 or greater. I'm not sure if a player switching to commander in-game triggers an OnJoin event or not.

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

Originally Posted by TMiland*:

 

You can check with player.Role, if it's 2 then the player is a PC commander, if it's 3 then the player is a Mobile commander.

You can do this OnJoin or you can grab a list of all players and check if a player has a Role of 2 or greater. I'm not sure if a player switching to commander in-game triggers an OnJoin event or not.

Thanks for helping, but i have no clue how to do that. :P
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LumPenPacK*:

 

Thanks for helping, but i have no clue how to do that. :P

Everything you need to know is in the IL plugin thread :ohmy:

 

showthread....0-12-MAR-2014)*

 

 

The player object represents the state of player for which the current limit is being evaluated. The player object implements the following interface:

Code:
int Role { get; } // BF4: 0 = PLAYER, 1 = SPECTATOR, 2 = COMMANDER, 3 = MOBILE COMMANDER
Example:

 

This limit shows every players role in chat on server join:

 

Add a new limit

Evaluation: OnJoin

FirstCheck: Code

Code:

Dictionary<int, String> Roles = new Dictionary<int, String>();
Roles.Add(0, "PLAYER");
Roles.Add(1, "SPECTATOR");
Roles.Add(2, "COMMANDER");
Roles.Add(3, "MOBILE COMMANDER");

plugin.SendGlobalMessage(plugin.R("%k_fn% has joined the server as " + Roles[player.Role] ));
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Everything you need to know is in the IL plugin thread :ohmy:

 

showthread....0-12-MAR-2014)*

 

 

 

 

Code:

int Role { get; } // BF4: 0 = PLAYER, 1 = SPECTATOR, 2 = COMMANDER, 3 = MOBILE COMMANDER
Example:

 

This limit shows every players role in chat on server join:

 

Add a new limit

Evaluation: OnJoin

FirstCheck: Code

Code:

Dictionary<int, String> Roles = new Dictionary<int, String>();
Roles.Add(0, "PLAYER");
Roles.Add(1, "SPECTATOR");
Roles.Add(2, "COMMANDER");
Roles.Add(3, "MOBILE COMMANDER");

plugin.SendGlobalMessage(plugin.R("%k_fn% has joined the server as " + Roles[player.Role] ));
return false;
Nice one! Thanks! Okay, so how about this:

 

Code:

List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);
if (team3.players.Count > 0) all.AddRange(team3.players);
if (team4.players.Count > 0) all.AddRange(team4.players);

foreach (PlayerInfoInterface p in all) {
		if (p.Role >2) && (kill.Weapon == "Tomahawk") {
			return true;
		}
		else if (p.Role >3) && (kill.Weapon == "Tomahawk") {
			return true;
		}
	}
	return false;
This will return true if a player is commander either on mobile or pc, and if they kill with Tomahawk?

 

Or am i waay out here? lol! I have no clue what i am doing, just seems logical to me. :P

 

Only problem now, is to count how many players there is with role 2 and 3 right?

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

Originally Posted by LumPenPacK*:

 

Nice one! Thanks! Okay, so how about this:

 

Code:

List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);
if (team3.players.Count > 0) all.AddRange(team3.players);
if (team4.players.Count > 0) all.AddRange(team4.players);

foreach (PlayerInfoInterface p in all) {
		if (p.Role >2) && (kill.Weapon == "Tomahawk") {
			return true;
		}
		else if (p.Role >3) && (kill.Weapon == "Tomahawk") {
			return true;
		}
	}
	return false;
This will return true if a player is commander either on mobile or pc, and if they kill with Tomahawk?

 

Or am i waay out here? lol! I have no clue what i am doing, just seems logical to me. :P

 

Only problem now, is to count how many players there is with role 2 and 3 right?

You could do something like this:

 

Code:

List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
int countCommanders = 0;

foreach (PlayerInfoInterface p in all) 
	{

		if (p.Role == 1 || p.Role == 2 ) {
			countCommanders++;
	}
	
	if(countCommanders == 1) 
	{
		/* do something because only 1 commander is active */
	}
	
	return false;
* 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.