Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by JopaJM*:

 

[insane Limits] Thread(settings): ERROR: 2 errors compiling Expression

[insane Limits] Thread(settings): ERROR: (CS1002, line: 27, column: 106): ; expected

[insane Limits] Thread(settings): ERROR: (CS1525, line: 27, column: 106): Invalid expression term ')'

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by Grovax*:

 

[insane Limits] Thread(settings): ERROR: 2 errors compiling Expression

[insane Limits] Thread(settings): ERROR: (CS1002, line: 27, column: 106): ; expected

[insane Limits] Thread(settings): ERROR: (CS1525, line: 27, column: 106): Invalid expression term ')'

fixed my script post. the expression had an error
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Grovax*:

 

Any limits for Announcements kills with C4?

this script write in globalchat: XXX killed XXX with C4!

 

SETUP LIMIT#1

limit_evaluation: OnKill

limit_first_check: Expression

limit_first_check_code: paste the CODE#1 here

 

CODE#1

Code:

(Regex.Match(kill.Weapon, @"(_:C4)", RegexOptions.IgnoreCase).Success)
ENABLE SECOND CHECK

limit_second_check: Code

limit_second_check_code: paste the CODE#2 here

 

CODE#2:

Code:

String globalMessage = killer.Name + " killed " + victim.Name + " with C4!";
plugin.SendGlobalMessage(globalMessage);
plugin.PRoConChat("C4Kill > Say > " + globalMessage);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by RedentorKane*:

 

this script write in globalchat: XXX killed XXX with C4!

 

SETUP LIMIT#1

limit_evaluation: OnKill

limit_first_check: Expression

limit_first_check_code: paste the CODE#1 here

 

CODE#1

Code:

(Regex.Match(kill.Weapon, @"(_:C4)", RegexOptions.IgnoreCase).Success)
ENABLE SECOND CHECK

limit_second_check: Code

limit_second_check_code: paste the CODE#2 here

 

CODE#2:

Code:

String globalMessage = killer.Name + " killed " + victim.Name + " with C4!";
plugin.SendGlobalMessage(globalMessage);
plugin.PRoConChat("C4Kill > Say > " + globalMessage);
return false;
Thank you!
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by God_Zilla*:

 

Please help with a problem.

There was one little thing and it does not work.

 

Code:

// VIP Slot
// v1.0a - OnJoin - Limit 1 of 1

if (server.PlayerCount > 40)
{
	List<String> ReservervedSlots = plugin.GetReservedSlotsList();
	if (ReservervedSlots.Contains(player.Name)) //Check Player is VIP or not
	{
		// Kick random but not a other VIP Player
		
		-=-=-=  How to do it_ =-=-=-=-
		
		return false;
	}
	else //If Player not VIP kick him
	{
		plugin.KickPlayerWithMessage(player.Name, "Sorry in Server can be Max 40 not member Players");
	}
}
Thank you
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by CaptCourage*:

 

For the life of me I cannot get a simple kdr kicker to work.

I wish to restrict kdr to 2.0 for all who try to join server.

I have -

 

Limit 1 evaluation - on join

first check- expression

first_check_expression - ( player.Kdr >2.0 )

second check - disabled

action - kick

Kick message - violated Limit #%l_id% %l_n%

 

I have also tried

 

( !player.StatsError && (player.Kills/player.Deaths) > 2.0 )

 

as the expression code.

 

I am testing this with someone who has admin status in procon. Do i need to remove him from any lists for this testing to work?

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

Originally Posted by BuRockK*:

 

I used forum search but either i couldnt find any help on what i need or i wasnt using the right search keywords. So im posting here for help.

 

I need an ingame command to enable/disable limits by the limit numbers if possible (like Limit #1, Limit #2 etc. as stated in the plugin menu)

 

What would be the expression for OnAnyChat? ie. @TestSwitch would enable limit if its disabled or vice versa

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

Originally Posted by BuRockK*:

 

Also would be nice if someone to update the links in the old ...* thread. Its kindda lotta work to use advanced seach to look up the posts in that same thread for the examples every time

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

Originally Posted by s1ngular1ty*:

 

For the life of me I cannot get a simple kdr kicker to work.

I wish to restrict kdr to 2.0 for all who try to join server.

I have -

 

Limit 1 evaluation - on join

first check- expression

first_check_expression - ( player.Kdr >2.0 )

second check - disabled

action - kick

Kick message - violated Limit #%l_id% %l_n%

 

I have also tried

 

( !player.StatsError && (player.Kills/player.Deaths) > 2.0 )

 

as the expression code.

 

I am testing this with someone who has admin status in procon. Do i need to remove him from any lists for this testing to work?

Try this...

 

Code:

Limit 1 evaluation - OnSpawn
first check- expression
first_check_expression - (  player.Kdr > 2.0  )
second check - disabled
action - kick
Kick message - violated Limit #%l_id% %l_n%
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

I used forum search but either i couldnt find any help on what i need or i wasnt using the right search keywords. So im posting here for help.

 

I need an ingame command to enable/disable limits by the limit numbers if possible (like Limit #1, Limit #2 etc. as stated in the plugin menu)

 

What would be the expression for OnAnyChat? ie. @TestSwitch would enable limit if its disabled or vice versa

I don't believe that is possible, however, I have not looked into it.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

I don't believe that is possible, however, I have not looked into it.

If not possible to enable/disable a limit, maybe could be prevented from triggering(or not) with a plugin variable.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

If not possible to enable/disable a limit, maybe could be prevented from triggering(or not) with a plugin variable.

You could use a dictionary. For example you could have an in-game command that simply toggles a value on or off, e.g if you wrote a ping kicker limit, you could have a command such as !pingkicker off or !pingkicker on, this command will either set or unset boolean value for the server object or plugin object etc.

Code:

server.Data.setBool("PINGKICKER", True);

or

server.Data.unsetBool("PINGKICKER");
Then in your ping kicker limit you'd simply check if this value is set or not, if set then proceed with the rest of the ping kicker code. If unset simply exit the limit, which essentially is the same as the limit being disabled.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

Hi, so i did try to make an ingame command for my limit. Yes there might be lots of errors in my code but could someone help me fix this?

 

New Limit: OnAnyChat

Action: none

Code:

Code:

Match RCMState = Regex.Match(player.LastChat, @"^\s*[@!]rcm");

bool RCMStatus = false;

if (RCMState.Success) {
	bool canKill = false;
	bool canKick = false;

	if (plugin.CheckAccount(player.Name, out canKill, out canKick) && canKill) {
	    if (RCMStatus == false) {
	    	bool RCMStatus = true;
		return;
            }
	    if (RCMStatus == true) {
	    	bool RCMStatus = false;
		return;
            }
	}
	else {
	    plugin.SendPlayerMessage(player.Name, "You don't have permission to use the " + player.LastChat + " command");
	}
}
return false;
I will also add "if (RCMStatus == true)" to the first_check of my OnJoin and OnSpawn limits (they have the same purpose)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

BuRockK, the way you wrote the limit above won't work. The CRMStatus variable scope is only within that limit and no other limit can see it. You have to do it like LCARSx64 said if you want it accessible from other limits.

 

setBool = changing variable to true

unsetBool = changing variable to false

isSetBool = checking what the state of the variable is

 

You can store these inside the server object like LCARSx64 showed so that they persist for the entire match and any limit can see them. At the start of a new game all these variables are deleted however.

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

Originally Posted by BuRockK*:

 

BuRockK, the way you wrote the limit above won't work. The CRMStatus variable scope is only within that limit and no other limit can see it. You have to do it like LCARSx64 said if you want it accessible from other limits.

 

setBool = changing variable to true

unsetBool = changing variable to false

isSetBool = checking what the state of the variable is

 

You can store these inside the server object like LCARSx64 showed so that they persist for the entire match and any limit can see them. At the start of a new game all these variables are deleted however.

Yes, i wanted only that limit to check that variable. so only that limit will trigger depening on variable state.

 

So would this also work_:

 

Code:

Match RCMState = Regex.Match(player.LastChat, @"^\s*[@!]rcm");

bool RCMStatus = false;

if (RCMState.Success) {
	bool canKill = false;
	bool canKick = false;

	if (plugin.CheckAccount(player.Name, out canKill, out canKick) && canKill) {
	    if (!plugin.Data.isSetBool("RCMStatus");) {
	    	plugin.Data.setBool("RCMStatus", True);
		return;
            }
	    if (plugin.Data.isSetBool("RCMStatus");) {
	    	plugin.Data.unsetBool("RCMStatus");
		return;
            }
	}
	else {
	    plugin.SendPlayerMessage(player.Name, "You don't have permission to use the " + player.LastChat + " command");
	}
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

BuRockK, the way you wrote the limit above won't work. The CRMStatus variable scope is only within that limit and no other limit can see it. You have to do it like LCARSx64 said if you want it accessible from other limits.

 

setBool = changing variable to true

unsetBool = changing variable to false

isSetBool = checking what the state of the variable is

 

You can store these inside the server object like LCARSx64 showed so that they persist for the entire match and any limit can see them. At the start of a new game all these variables are deleted however.

Actually the variables are not deleted at the start of a new match (round) unless you use RoundData, if you use Data then it will persist until either unset or the server is restarted, e.g:

Code:

server.Data.setBool("MYKEY", true); // This will persist until a server restart or unset
server.RoundData.setBool("MYKEY", true); // This will be deleted at the start of a new round
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Actually the variables are not deleted at the start of a new match (round) unless you use RoundData, if you use Data then it will persist until either unset or the server is restarted, e.g:

Code:

server.Data.setBool("MYKEY", true); // This will persist until a server restart or unset
server.RoundData.setBool("MYKEY", true); // This will be deleted at the start of a new round
Oh yeah that's right. He should probably use RoundData.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

Oh yeah that's right. He should probably use RoundData.

Umm, no i want var to stay as is until a restart. I want admins to be able to "enable/disable" the limit when needed
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

But i wont test this for now. trying to fix the error i get in IL (discussed in other thread). As soon as i get this error problem solved i will test the ingame command

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

Originally Posted by BuRockK*:

 

Hi, i forgot which thread was it but i think there was a way to call a variable or use a variable from another plugin in IL. or something like that. Could someone redirect me to that if you know which thread it was? (i dont even know what to search for in forums)

 

Or could someone tell me how i can use an ini variable i use in proconrulz, to use in a limit

 

 

EDIT:

 

I also have a problem with "In-Game Admin List Command" limit.

 

I have set a !help topic on every available commands in server which shows a specific topic depending on the players status in server (Admin,Protected or normal player without any privileges).

 

In game command "!help adminlist" works fine, shows what !adminlist command does (i made it in ProconRulz). But also shows the available admins list because of the coding of the limit. I tried to change coding but its a bit complicated for me. How can i change this in a way so on a "!help adminlist" command it wont show available admins?

 

Heres the link to the original limit:

 

myrcon.net/...insane-limits-examples#entry18661

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

Originally Posted by DelilerClan*:

 

ReplaceCode:

if (Regex.Match(command, "adminlist", RegexOptions.IgnoreCase).Success) {
With Code:
if (Regex.Match(command, @"^\s*adminlist", RegexOptions.IgnoreCase).Success) {
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

ReplaceCode:

if (Regex.Match(command, "adminlist", RegexOptions.IgnoreCase).Success) {
With Code:
if (Regex.Match(command, @"^\s*adminlist", RegexOptions.IgnoreCase).Success) {
Doesnt work, "!help adminlist" command dont show available admins, but also the limit dont show available admins (!adminlist)

 

I think i need to change something in Second_Check code too in that limit

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

Originally Posted by BuRockK*:

 

I did it yay. thank you for the idea

 

All i did was deleted the codes that define the string "command" and used:

Code:

if (Regex.Match(player.LastChat, @"^\s*[@!]adminlist").Success) {
For anyone having the same problem, this works:

 

First, do exactly the same as said in this post: myrcon.net/...insane-limits-examples#entry18661

 

Then change the Second_Check to this:

Code:

/* Parse the command */
if (Regex.Match(player.LastChat, @"^\s*[@!]adminlist").Success) {
    String adminList = "Admins: ";
    bool found = false;
    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    if (team3.players.Count > 0)
        players.AddRange(team3.players);
    if (team4.players.Count > 0)
        players.AddRange(team4.players);

    foreach (PlayerInfoInterface p in players) {
        if (plugin.isInList(p.Name, "admins")) {
            if (found)
               adminList = adminList + ", " + p.Name;
            else
               adminList = adminList + p.Name;
            found = true;
        }
    }
    if (found)
        plugin.SendSquadMessage(player.TeamId, player.SquadId, adminList);
}

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

Originally Posted by SmackDown*:

 

Hello all,

 

I have a request and I am not sure if it can be done or not with insane limits.

 

I would like to limit the about of time a player can use a MAV while in a match. Lately, I have notice on our servers that we will get a few players who will do nothing but use the MAV, get absolutely no kills and be at the top of the score board. While doing this, since they are not getting any kills, they are causing their team to lose the match.

 

I realize the importance of spotting the enemy, but also I would like to balance it out a bit so that a player couldn't continually use the MAV and not ever get a kill. Is there a way to limit the MAV use, say after so many minuets if he doesn't have a kill that it could kill or kick him our of the server after giving him a warning?

 

Not sure if this can be done or not, but I was just putting this out here to see if it would be possible.

 

Thanks...

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

Originally Posted by BuRockK*:

 

Hello, im getting an error for this code stating i need to put ")" and ";" etc. to some lines and colums. But in those lines, i was using commands as shown in Details tab of the plugin and i cant understand where i did wrong..

 

Im planning to use this code on @admin command. When a player types "@admin ..." it will send Yell to all the Admins who are currently in game by searching every player if theyre in the admins list (which is created seperately with a custom list)

 

Evaluation: OnAnyChat

 

First_Check (expression): player.LastChat.StartsWith("@admin")

 

Second_Check (code):

Code:

/* Parse the command */
if (player.LastChat.StartsWith("@admin").Success) {
    bool found = false;
    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    if (team3.players.Count > 0)
        players.AddRange(team3.players);
    if (team4.players.Count > 0)
        players.AddRange(team4.players);

    foreach (PlayerInfoInterface p in players) {
        if (plugin.isInList(p.Name, "admins")) {
            if (found)
               plugin.SendPlayerYell(p.Name, player.Name Resquested ADMIN, 12);
            else
               return;
            found = true;
        }
    }
    if (!found)
        plugin.SendPlayerMessage(player.Name, No admins are in game);
}

return false;
Action: PRoConChat

Procon Chat Text: ^b^8Admin Resquest: ^b^4%p_fn% ^b^0> ^b^4%p_lc%

 

 

 

 

..and this is the error i get for Second_Check code:

 

Code:

[02:03:28 85] [Insane Limits] Thread(settings): Compiling Limit #4 - Admin Request Notification - OnAnyChat
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: 12 errors compiling Expression
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1026, line: 56, column: 70):  ) expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1001, line: 56, column: 88):  Identifier expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1002, line: 56, column: 90):  ; expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1525, line: 56, column: 90):  Invalid expression term ')'
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1525, line: 57, column: 25):  Invalid expression term 'else'
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1002, line: 57, column: 29):  ; expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1026, line: 63, column: 62):  ) expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1002, line: 63, column: 73):  ; expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1525, line: 63, column: 73):  Invalid expression term 'in'
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1002, line: 63, column: 76):  ; expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1002, line: 63, column: 80):  ; expected
[02:03:28 90] [Insane Limits] Thread(settings): ERROR: (CS1525, line: 63, column: 80):  Invalid expression term ')'
I also was planning to limit the "limit" usage for say 5 times so that people wont abuse the command for annoying admins. But even though i tried using "issetInt" and "SetInt" methods i wasnt able to code it right i guess (it was saying the int var i was tring to make was not in the context menu).
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Hello all,

 

I have a request and I am not sure if it can be done or not with insane limits.

 

I would like to limit the about of time a player can use a MAV while in a match. Lately, I have notice on our servers that we will get a few players who will do nothing but use the MAV, get absolutely no kills and be at the top of the score board. While doing this, since they are not getting any kills, they are causing their team to lose the match.

 

I realize the importance of spotting the enemy, but also I would like to balance it out a bit so that a player couldn't continually use the MAV and not ever get a kill. Is there a way to limit the MAV use, say after so many minuets if he doesn't have a kill that it could kill or kick him our of the server after giving him a warning?

 

Not sure if this can be done or not, but I was just putting this out here to see if it would be possible.

 

Thanks...

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

Originally Posted by BuRockK*:

 

Actually he could but i dont know if it would work. Apperantly, im not good enough to code such a hardcore code.

 

Give every player vars example, for 30 mins., set on spawn, loadout codes to check if MAV is being used and start/restart counter everytime its true. Stop counter on death. plus maybe on every death check how many kills he has and at some point use some arithmetics to calculate his kill/MAV use ratio or something.

 

Just an idea really, but practicaly, i wouldnt be able to do all that lol

* 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.




×
×
  • 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.