ImportBot Posted January 21, 2014 Author Share Posted January 21, 2014 Originally Posted by JEEMY*: Thanks for looking into it for me. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 24, 2014 Author Share Posted January 24, 2014 Originally Posted by TMiland*: I'm back! So, if the commander could switch teams together with the rest of the team, that would be great! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 24, 2014 Author Share Posted January 24, 2014 Originally Posted by PapaCharlie9*: I'm back! So, if the commander could switch teams together with the rest of the team, that would be great! You're sure that doesn't happen automatically? I watched commanders get swapped, along with all their original team mates, this morning. It sounds like you are saying that end of round, regular players get swapped from US to RU, but the US commander stays the US commander? I've never seen that myself. In any case, if you are sure the commander is NOT automatically swapped, you can pre-swap them at OnRoundOver time. Create a new limit OnRoundOver, leave Action set to None. Set first_check to this Code: Code: int COMMANDER = 2; String msg = null; foreach (PlayerInfoInterface t1player in team1.players) { if (t1player.Role == COMMANDER) { msg = "Round over: pre-swapping T1 Commander ^b" + t1player.FullName + "^n to T2"; plugin.ConsoleWrite(msg); plugin.SendGlobalMessage(msg); plugin.MovePlayer(t1player.Name, 2, 0, false); break; } } foreach (PlayerInfoInterface t2player in team2.players) { if (t2player.Role == COMMANDER) { msg = "Round over: pre-swapping T2 Commander ^b" + t2player.FullName + "^n to T1"; plugin.ConsoleWrite(msg); plugin.SendGlobalMessage(msg); plugin.MovePlayer(t2player.Name, 1, 0, false); break; } } return false;If you are not sure and the commander is sometimes swapped and sometimes not, I'll need some way to "anchor" the commander to the team, like with a clan tag or player name or something. There's no easy way to know how or when the game server swaps teams, so something else has to be used. BTW, this only works for PC Commanders. Mobile (tablet) commanders don't have PB GUIDs and Insane Limits thinks they are hackers. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 24, 2014 Author Share Posted January 24, 2014 Originally Posted by TMiland*: You're sure that doesn't happen automatically? I watched commanders get swapped, along with all their original team mates, this morning. It sounds like you are saying that end of round, regular players get swapped from US to RU, but the US commander stays the US commander? I've never seen that myself. In any case, if you are sure the commander is NOT automatically swapped, you can pre-swap them at OnRoundOver time. Create a new limit OnRoundOver, leave Action set to None. Set first_check to this Code: Code: int COMMANDER = 2; String msg = null; foreach (PlayerInfoInterface t1player in team1.players) { if (player.Role == COMMANDER) { msg = "Round over: pre-swapping T1 Commander ^b" + t1player.FullName + "^n to T2"; plugin.ConsoleWrite(msg); plugin.SendGlobalMessage(msg); plugin.MovePlayer(t1player.Name, 2, 0, false); break; } } foreach (PlayerInfoInterface t2player in team2.players) { if (player.Role == COMMANDER) { msg = "Round over: pre-swapping T2 Commander ^b" + t2player.FullName + "^n to T1"; plugin.ConsoleWrite(msg); plugin.SendGlobalMessage(msg); plugin.MovePlayer(player.Name, 1, 0, false); break; } }If you are not sure and the commander is sometimes swapped and sometimes not, I'll need some way to "anchor" the commander to the team, like with a clan tag or player name or something. There's no easy way to know how or when the game server swaps teams, so something else has to be used. BTW, this only works for PC Commanders. Mobile (tablet) commanders don't have PB GUIDs and Insane Limits thinks they are hackers. Great PapaCharlie9! Yes, i am sure, but only if the enemy commander has left before round end, or if there is only 1 commander, he seems to stay on the team he was in, in the previous round, while players switch teams, so we need an anchor. I say use a player name, since we might be on both teams with the community tag. I am often a squad leader, and i have a friend who is good at commanding, so this is something that is obstructing the team play. So lets say, if player name=FancyPlayerName1 and is squad.leader and on team US, put player name=FancyPlayerName2 as commander on US. Hope this is possible, or if you have a better idea maybe? The tablet cmd's is okay, we only work together on TS, so shouldn't be a problem. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 24, 2014 Author Share Posted January 24, 2014 Originally Posted by PapaCharlie9*: Great PapaCharlie9! Yes, i am sure, but only if the enemy commander has left before round end, or if there is only 1 commander, he seems to stay on the team he was in, in the previous round, while players switch teams, so we need an anchor. I say use a player name, since we might be on both teams with the community tag. I am often a squad leader, and i have a friend who is good at commanding, so this is something that is obstructing the team play. So lets say, if player name=FancyPlayerName1 and is squad.leader and on team US, put player name=FancyPlayerName2 as commander on US. Hope this is possible, or if you have a better idea maybe? The tablet cmd's is okay, we only work together on TS, so shouldn't be a problem. Yes, using specific names is very easy, but will that be flexible enough for what you want? What if FancyPlayerName1 leaves the game? Anyway, here is the code using just what you specified. Create a limit to evaluate OnRoundStart, leave Action set to None: Code: /* Version 0.9.15/R1 */ String SquadLeader = "FancyPlayerName1"; // change this String Commander = "FancyPlayerName2"; // change this // If already on the same team, do nothing: PlayerInfoInterface sl = plugin.GetPlayer(SquadLeader, false); PlayerInfoInterface cm = plugin.GetPlayer(Commander, false); if (sl == null || cm == null) return false; if (sl.TeamId == 0 || cm.TeamId == 0) return false; if (sl.TeamId == cm.TeamId) return false; String m = "Cmdr " + Commander + " and SL " + SquadLeader + " are not on the same team!"; plugin.ConsoleWrite(m); plugin.SendPlayerMessage(Commander, m); plugin.SendPlayerMessage(SquadLeader, m); // Determine if Commander is a commander or not if (cm.Role != 2) { plugin.ConsoleWrite(Commander + " is not a commander"); return false; } // Determine if SquadLeader is a squad leader or not if (plugin.GetSquadLeaderName(sl.TeamId, sl.SquadId) == SquadLeader) { // Move Commander to SquadLeader's team String msg = "Moving Cmdr " + Commander + " to SL " + SquadLeader + " team " + sl.TeamId; plugin.ConsoleWrite(msg); plugin.SendGlobalMessage(msg); plugin.MovePlayer(Commander, sl.TeamId, 0, true); } else { plugin.ConsoleWrite(SquadLeader + " is not a squad leader"); } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 24, 2014 Author Share Posted January 24, 2014 Originally Posted by TMiland*: Yes, using specific names is very easy, but will that be flexible enough for what you want? What if FancyPlayerName1 leaves the game? Anyway, here is the code using just what you specified. Create a limit to evaluate OnRoundStart, leave Action set to None: Code: /* Version 0.9.15/R1 */ String SquadLeader = "FancyPlayerName1"; // change this String Commander = "FancyPlayerName2"; // change this // If already on the same team, do nothing: PlayerInfoInterface sl = plugin.GetPlayer(SquadLeader, false); PlayerInfoInterface cm = plugin.GetPlayer(Commander, false); if (sl == null || cm == null) return false; if (sl.TeamId == 0 || cm.TeamId == 0) return false; if (sl.TeamId == cm.TeamId) return false; String m = "Cmdr " + Commander + " and SL " + SquadLeader + " are not on the same team!"; plugin.ConsoleWrite(m); plugin.SendPlayerMessage(Commander, m); plugin.SendPlayerMessage(SquadLeader, m); // Determine if Commander is a commander or not if (cm.Role != 2) { plugin.ConsoleWrite(Commander + " is not a commander"); return false; } // Determine if SquadLeader is a squad leader or not if (plugin.GetSquadLeaderName(sl.TeamId, sl.SquadId) == SquadLeader) { // Move Commander to SquadLeader's team String msg = "Moving Cmdr " + Commander + " to SL " + SquadLeader + " team " + sl.TeamId; plugin.ConsoleWrite(msg); plugin.SendGlobalMessage(msg); plugin.MovePlayer(Commander, sl.TeamId, 0, true); } else { plugin.ConsoleWrite(SquadLeader + " is not a squad leader"); } return false; That looks great! Thanks! However i get this error: Code: [18:59:17 73] [Insane Limits] ERROR: 1 error compiling Code [18:59:17 73] [Insane Limits] ERROR: (CS0117, line: 43, column: 20): 'PRoConEvents.PlayerInfoInterface' does not contain a definition for 'Role' * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 24, 2014 Author Share Posted January 24, 2014 Originally Posted by PapaCharlie9*: That looks great! Thanks! However i get this error: Code: [18:59:17 73] [Insane Limits] ERROR: 1 error compiling Code [18:59:17 73] [Insane Limits] ERROR: (CS0117, line: 43, column: 20): 'PRoConEvents.PlayerInfoInterface' does not contain a definition for 'Role' Requires Procon 1.4.1.5 and Insane Limits 0.9.15.0, mate. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 24, 2014 Author Share Posted January 24, 2014 Originally Posted by TMiland*: Requires Procon 1.4.1.5 and Insane Limits 0.9.15.0, mate.HAHA! OH GOD! My head was somewhere else i think lol! Thanks papa! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 25, 2014 Author Share Posted January 25, 2014 Originally Posted by TMiland*: Another question: A limit to take the squad leader role, so f.eks @(!)lead would make you a squad leader of the current squad you are in. To do this in the console, you have to type "squad.leader 1 1 PlayerName" where 1 1 is team/squad number. Is this possible? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 25, 2014 Author Share Posted January 25, 2014 Originally Posted by PapaCharlie9*: Another question: A limit to take the squad leader role, so f.eks @(!)lead would make you a squad leader of the current squad you are in. To do this in the console, you have to type "squad.leader 1 1 PlayerName" where 1 1 is team/squad number. Is this possible? If that command is all it takes, sure, but are you sure that's true? What happens to the previous squad leader? Also, who is allowed to use the command, anyone? Only players with Procon accounts? Only players with a certain tag or player name? List of tags or names? I'll assume only players with a Procon account that have privileges to move players. myrcon.net/.../insane-limits-bf4-lead-command-take-squad-lead-position * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 27, 2014 Author Share Posted January 27, 2014 Originally Posted by Tuelp*: Hello, is it somehow possible to fetch the server's banlist (name/GUID and BanReason) with Insane Limits? I want to create a limit which sends a chat-message like: "10 Players have been banned for Hacking/Cheating" Thank you! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 27, 2014 Author Share Posted January 27, 2014 Originally Posted by AgentHawk*: Hey we have some trouble with our Ping Kicker and ADKats...:/ And I heard thats possible to Limit the Ping with Insane... Can somebody help me with that? Greetings * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 27, 2014 Author Share Posted January 27, 2014 Originally Posted by LumPenPacK*: Hey we have some trouble with our Ping Kicker and ADKats...:/ And I heard thats possible to Limit the Ping with Insane... Can somebody help me with that? Greetings OnIntervalPlayers30 Expression server.PlayerCount > 24 CodeCode: if ( (player.MedianPing > 130) && !plugin.isInList(player.Name, "ping_whitelist") ) { plugin.KickPlayerWithMessage(player.Name, plugin.R("Sorry, but your ping was too high.")); plugin.PRoConChat(plugin.R("[Ping Kicker] > %p_n% has been KICKED for high ping.")); } return false;You can set the value from the first expression to the desired player count if you want to enable the ping kicker only when more than X players are on the server.You can also add a custom list named "ping_whitelist" where your enter all the player names you don't want kick for high ping. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 27, 2014 Author Share Posted January 27, 2014 Originally Posted by AgentHawk*: awesome dude Thanks * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by TMiland*: OnIntervalPlayers 30 Expression Code Code: if ( (player.MedianPing > 130) && !plugin.isInList(player.Name, "ping_whitelist") ) { plugin.KickPlayerWithMessage(player.Name, plugin.R("Sorry, but your ping was too high.")); plugin.PRoConChat(plugin.R("[Ping Kicker] > %p_n% has been KICKED for high ping.")); } return false;You can set the value from the first expression to the desired player count if you want to enable the ping kicker only when more than X players are on the server.You can also add a custom list named "ping_whitelist" where your enter all the player names you don't want kick for high ping. I get this error: Code: [21:31:29 47] [Insane Limits] Compiling Limit #9 - Ping Kicker - OnIntervalServer [21:31:29 50] [Insane Limits] ERROR: 3 errors compiling Expression [21:31:29 50] [Insane Limits] ERROR: (CS0103, line: 42, column: 19): The name 'player' does not exist in the current context [21:31:29 50] [Insane Limits] ERROR: (CS0103, line: 42, column: 64): The name 'player' does not exist in the current context [21:31:29 50] [Insane Limits] ERROR: (CS0103, line: 43, column: 42): The name 'player' does not exist in the current contextEdit:Doh! Set the wrong interval! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by PapaCharlie9*: Hello, is it somehow possible to fetch the server's banlist (name/GUID and BanReason) with Insane Limits? I want to create a limit which sends a chat-message like: "10 Players have been banned for Hacking/Cheating" Thank you! No, sorry, Insane Limits doesn't do anything with the ban list. FWIW, that would be trivially easy to do as a normal plugin. See: showthread....y-first-plugin* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by PapaCharlie9*: OnIntervalPlayers 30 Expression Code Code: if ( (player.MedianPing > 130) && !plugin.isInList(player.Name, "ping_whitelist") ) { plugin.KickPlayerWithMessage(player.Name, plugin.R("Sorry, but your ping was too high.")); plugin.PRoConChat(plugin.R("[Ping Kicker] > %p_n% has been KICKED for high ping.")); } return false;You can set the value from the first expression to the desired player count if you want to enable the ping kicker only when more than X players are on the server.You can also add a custom list named "ping_whitelist" where your enter all the player names you don't want kick for high ping. It would be better to count the number of times player.Ping or player.MedianPing is above the upper limit and then kick only when the counter is greater than some number. If you kick on the very first test of player.MedianPing, there might be only one sample in the queue and it could just be a temporary spike. I'd suggest kicking only after player.MedianPing is above the upper limit 5 times, that is, keep a counter per player (you can use player.Data.setInt()) and only kick after the counter is >= 5. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by LumPenPacK*: i thought the player.MedianPing already contains more than one measurement. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by PapaCharlie9*: i thought the player.MedianPing already contains more than one measurement.If only one measurement has been reported by Procon for this player so far, how does it get more? Use a time machine? Median ping needs to collect 5 measurements before it can report a median. If there have been less than 5, its the same value as AveragePing. So for ping #1, it's just the ping value. For example, if ping #1 is 200, the average is 200/1 = 200. For ping #2, it's still the average. For example, if ping #2 is 80, the average is (200+80)/2 = 140. For ping #3, it's still the average. For example, if ping #3 is 60, the average is (200+80+60)/3 = 113. For ping #4, it's still the average. For example, if ping #4 is 60, the average is (200+80+60+60)/4 = 100. For ping #5 and subsequent, it can do a median. For example, if ping #5 is 60, the average is (200+80+60+60+60)/5 = 92, but the median is 60. Another good idea would be to notice that when (player.Ping > X), where X is your upper limit, to issue a new player.ping command for that player. Something like this: Code: if (player.Ping > 200) plugin.ServerCommand("player.ping", player.Name);That forces Procon to get a new value for the player's ping. If the value comes back 5 times as more than X, then kick. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by PapaCharlie9*: So here's how I would write this limit. Create a limit to evaluate OnIntervalPlayers, set interval to 30, leave Action set to None. Set first_check to this Code: Code: int minimumPlayers = 24; // ping is ignored if fewer than these players int maximumPing = 200; // highest ping allowed int maximumCount = 5; // number of times max ping is allowed before kick String key = "PingCounter"; if (server.PlayerCount < minimumPlayers) return false; if (plugin.isInList(player.Name, "ping_whitelist")) return false; if (player.Ping > maximumPing) plugin.ServerCommand("player.ping", player.Name); if (player.MedianPing > maximumPing) { int count = 0; if (player.Data.issetInt(key)) count = player.Data.getInt(key); count = count + 1; player.Data.setInt(key, count); if (count > maximumCount) { plugin.KickPlayerWithMessage(player.Name, plugin.R("Sorry, but your ping was too high.")); plugin.PRoConChat(plugin.R("[Ping Kicker] > %p_n% has been KICKED for high ping.")); } } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by jking54*: Who has a top notch limit for a NO explosives setup for Lockers? Thanks in advance. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by TMiland*: So here's how I would write this limit. Create a limit to evaluate OnIntervalPlayers, set interval to 30, leave Action set to None. Set first_check to this Code: Code: int minimumPlayers = 24; // ping is ignored if fewer than these players int maximumPing = 200; // highest ping allowed int maximumCount = 5; // number of times max ping is allowed before kick String key = "PingCounter"; if (server.PlayerCount < minimumPlayers) return false; if (plugin.isInList(player.Name, "ping_whitelist")) return false; if (player.Ping > maximumPing) plugin.ServerCommand("player.ping", player.Name); if (player.MedianPing > maximumPing) { int count = 0; if (player.Data.issetInt(key)) count = player.Data.getInt(key); count = count + 1; player.Data.setInt(key, count); if (count > maximumCount) { plugin.KickPlayerWithMessage(player.Name, plugin.R("Sorry, but your ping was too high.")); plugin.PRoConChat(plugin.R("[Ping Kicker] > %p_n% has been KICKED for high ping.")); } } return false; Thank you for this limit! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 28, 2014 Author Share Posted January 28, 2014 Originally Posted by LumPenPacK*: So here's how I would write this limit.Okay, that's actually much smarter to write a ping kicker with the combination of player.MedianPing and player.Ping. Thank you!Although, I'm not sure whether this limit could be a little bit to lazy because it takes longer to kick players. But I'm not even sure whether a high ping is really affecting the game play experience of other players. It could be more placebo than improving anything. It's probably more a limit to calm down the people who are complaining about high ping players. Since the netcode in BF4 is completely broken it does not matter how many players with high are on a server. But anyway, thank you for the code. Good idea! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 29, 2014 Author Share Posted January 29, 2014 Originally Posted by PapaCharlie9*: Okay, that's actually much smarter to write a ping kicker with the combination of player.MedianPing and player.Ping. Thank you! Although, I'm not sure whether this limit could be a little bit to lazy because it takes longer to kick players. But I'm not even sure whether a high ping is really affecting the game play experience of other players. It could be more placebo than improving anything. It's probably more a limit to calm down the people who are complaining about high ping players. Since the netcode in BF4 is completely broken it does not matter how many players with high are on a server. But anyway, thank you for the code. Good idea! That's correct. There's no proof that high ping players cause lag or server problems. HOWEVER, there is proof that high ping players can cheat, taking advantage of rubber-banding and delayed hit detection. A player can be essentially invulnerable with a high enough ping. Of course, he can't hit anything either, but if he just caps flags and drops ammo/med packs, it might not matter. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 29, 2014 Author Share Posted January 29, 2014 Originally Posted by PapaCharlie9*: Who has a top notch limit for a NO explosives setup for Lockers? Thanks in advance.Use the Search, Luke. showthread....0-RPG-USAS-etc* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 29, 2014 Author Share Posted January 29, 2014 Originally Posted by Tuelp*: No, sorry, Insane Limits doesn't do anything with the ban list. FWIW, that would be trivially easy to do as a normal plugin. See: showthread....y-first-plugin* Thanks for that template. This really helped me getting started.I was able create a little plugin which does what i wanted * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 29, 2014 Author Share Posted January 29, 2014 Originally Posted by LCARSx64*: Firstly, great work on the Insane Limits update Papa, it'll mean I need to rewrite some of my limits but that is actually a good thing. Now I have a couple of questions. 1. How would I convert the following ProconRulz rule to Insane Limits (I don't want the multikill sprees that are in the examples): Code: ################################################################# # Unreal Tournament Multi Kills Announcer - by Bl1ndy and Panther On Spawn;Set %multi% 0 On Kill;Not Rate 2 4;Set %multi% 0 On Kill;Rate 10 36;if %multi% > 8;Incr %multi% On Kill;Rate 9 32;if %multi% == 8;Incr %multi% On Kill;Rate 8 28;if %multi% == 7;Incr %multi% On Kill;Rate 7 24;if %multi% == 6;Incr %multi% On Kill;Rate 6 20;if %multi% == 5;Incr %multi% On Kill;Rate 5 16;if %multi% == 4;Incr %multi% On Kill;Rate 4 12;if %multi% == 3;Incr %multi% On Kill;Rate 3 8;if %multi% == 2;Incr %multi% On Kill;Rate 2 4;if %multi% == 0;Set %multi% 2 On Kill;if %multi% == 10;Say %p% got AUTObanned for hacks;Ban Hacking/Cheating - AutoTrigger - %p% On Kill;if %multi% > 5;Say %p%: -== M-O-N-S-T-E-R - K-I-L-L (%multi% in a row) ==-; On Kill;if %multi% == 5;Say %p%: -== ULTRA KILL (%multi% in a row) ==-; On Kill;if %multi% == 4;Say %p%: -= MEGA Kill (%multi% in a row) =-; On Kill;if %multi% == 3;PlayerSay %p%: "Triple Kill!" On Kill;if %multi% == 2;PlayerSay %p%: "Double Kill!"2. Is it possible to retrieve and/or add to the contents of a Insane Limits custom list? e.g. If I have a list called server_vips which is used for special in-game privileges, and I want to temporarily give a player vip privileges in game using a custom command, but without adding him/her to the reservedslot list, then later (maybe after a couple of rounds) I want to remove those privileges. Doing it like this would (probably) ensure that player stays on the list on server crash or until I remove them, also I wouldn't have to minimize whilst in-game to add and remove them. Is this possible? If so, how would I accomplish this? If not, is it possible to add this feature to a future Insane Limits update? Thanks again * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 29, 2014 Author Share Posted January 29, 2014 Originally Posted by PapaCharlie9*: Firstly, great work on the Insane Limits update Papa, it'll mean I need to rewrite some of my limits but that is actually a good thing. Now I have a couple of questions. 1. How would I convert the following ProconRulz rule to Insane Limits (I don't want the multikill sprees that are in the examples): Sorry, I can't help you with this. I don't know how Rulz work and I can't read that example. 2. Is it possible to retrieve and/or add to the contents of a Insane Limits custom list? e.g. If I have a list called server_vips which is used for special in-game privileges, and I want to temporarily give a player vip privileges in game using a custom command, but without adding him/her to the reservedslot list, then later (maybe after a couple of rounds) I want to remove those privileges. Doing it like this would (probably) ensure that player stays on the list on server crash or until I remove them, also I wouldn't have to minimize whilst in-game to add and remove them. Is this possible? If so, how would I accomplish this? If not, is it possible to add this feature to a future Insane Limits update? Thanks again It's not currently possible to retrieve nor change the contents of a custom list from limit code, no. You could read and write your own text file instead. That's how the reserved slots reward limit works, you could look at its code to get some ideas: myrcon.net/.../insane-limits-vip-slot-manager-vip-slot-for-help-server-start-v10 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 30, 2014 Author Share Posted January 30, 2014 Originally Posted by LCARSx64*: Thanks for the quick response Sorry, I can't help you with this. I don't know how Rulz work and I can't read that example.I've added some comments to the code (it's how I understand they work), I can convert it for the most part, the problem for me is how to get all those different timings into a single limit. Oh and I do realize that it will require an On Spawn event limit and an On Kill event.Code: ################################################################# # Unreal Tournament Multi Kills Announcer - by Bl1ndy and Panther On Spawn;Set %multi% 0 // On Spawn event, set global var named %multi% to 0 On Kill;Not Rate 2 4;Set %multi% 0 // On Kill event and rule has not been trigger 2 times in 4 secs, set %multi% to 0 On Kill;Rate 10 36;if %multi% > 8;Incr %multi% // On Kill event, rule triggered 10 times in 36 secs, if %multi% > 8 then increment %multi% by 1 On Kill;Rate 9 32;if %multi% == 8;Incr %multi% // On Kill event, rule triggered 9 times in 32 secs, if %multi% == 8 then increment %multi% by 1 On Kill;Rate 8 28;if %multi% == 7;Incr %multi% // On Kill event, rule triggered 8 times in 28 secs, if %multi% == 7 then increment %multi% by 1 On Kill;Rate 7 24;if %multi% == 6;Incr %multi% // On Kill event, rule triggered 7 times in 24 secs, if %multi% == 6 then increment %multi% by 1 On Kill;Rate 6 20;if %multi% == 5;Incr %multi% // On Kill event, rule triggered 6 times in 20 secs, if %multi% == 5 then increment %multi% by 1 On Kill;Rate 5 16;if %multi% == 4;Incr %multi% // On Kill event, rule triggered 5 times in 16 secs, if %multi% == 4 then increment %multi% by 1 On Kill;Rate 4 12;if %multi% == 3;Incr %multi% // On Kill event, rule triggered 4 times in 12 secs, if %multi% == 3 then increment %multi% by 1 On Kill;Rate 3 8;if %multi% == 2;Incr %multi% // On Kill event, rule triggered 3 times in 8 secs, if %multi% == 2 then increment %multi% by 1 On Kill;Rate 2 4;if %multi% == 0;Set %multi% 2 // On Kill event, rule triggered 2 times in 4 secs, set %multi% to 2 On Kill;if %multi% == 10;Say %p% got AUTObanned for hacks;Ban Hacking/Cheating - AutoTrigger - %p% // On Kill event, if %multi% == 10, plugin.SendGlobalMessage( player.Name + " got AUTObanned for hacks"), Ban the player for Hacking/Cheating On Kill;if %multi% > 5;Say %p%: -== M-O-N-S-T-E-R - K-I-L-L (%multi% in a row) ==-; // On Kill event, if %multi% > 5, plugin.SendGlobalMessage(player.Name + ": -== M-O-N-S-T-E-R - K-I-L-L (" + %multi% + " in a row) ==-") On Kill;if %multi% == 5;Say %p%: -== ULTRA KILL (%multi% in a row) ==-; // On Kill event, if %multi% == 5, plugin.SendGlobalMessage(player.Name + ": -== ULTRA KILL (" + %multi% + " in a row) ==-") On Kill;if %multi% == 4;Say %p%: -= MEGA Kill (%multi% in a row) =-; // On Kill event, if %multi% == 4, plugin.SendGlobalMessage(player.Name + ": -= MEGA KILL (" + %multi% + " in a row) =-") On Kill;if %multi% == 3;PlayerSay %p%: "Triple Kill!" // On Kill event, if %multi% == 3, plugin.SendGlobalMessage(player.Name + ": Triple Kill!") On Kill;if %multi% == 2;PlayerSay %p%: "Double Kill!" // On Kill event, if %multi% == 2, plugin.SendGlobalMessage(player.Name + ": Double Kill!") It's not currently possible to retrieve nor change the contents of a custom list from limit code, no. You could read and write your own text file instead. That's how the reserved slots reward limit works, you could look at its code to get some ideas: myrcon.net/.../insane-limits-vip-slot-manager-vip-slot-for-help-server-start-v10 I wasn't aware we could read and write text files from a limit, thanks I'll have a look. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 30, 2014 Author Share Posted January 30, 2014 Originally Posted by PapaCharlie9*: Thanks for the quick response I've added some comments to the code (it's how I understand they work), I can convert it for the most part, the problem for me is how to get all those different timings into a single limit. Oh and I do realize that it will require an On Spawn event limit and an On Kill event. If all the OnSpawn does is set a variable to zero, you don't need it, particularly if %multi% is some kind of activation count. You can just use OnKill limit.Activations(player.Name) in second_check Code, which is automatically set to zero at the beginning of each round for each player. I wasn't aware we could read and write text files from a limit, thanks I'll have a look. Procon needs to have sandboxing disabled, Run plugins with no restrictions, but yes, once that is true, you can read/write files and use network connections. * Restored post. It could be that the author is no longer active. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.