ImportBot Posted April 12, 2015 Author Share Posted April 12, 2015 Originally Posted by PapaCharlie9*: xFaNtASyGiRLx* said: hi, i have limit for bad words but want to add "jew" to it. fix code for me please? thanks!!I would have done the same thing as LCARS. I didn't notice that the first pattern was a combination of words. If you just want one word alone, you add another line: Code: List<String> bad_words = new List<String>(); bad_words.Add(@"n+[1i]+g+[3ea]+r*(bitch|lover|ass|etc)_"); [b]bad_words.Add(@"jew");[/b] String[] chat_words = Regex.Split(player.LastChat, @"\s+"); foreach(String chat_word in chat_words) foreach(String bad_word in bad_words) if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success) return true; return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 12, 2015 Author Share Posted April 12, 2015 Originally Posted by LCARSx64*: xFaNtASyGiRLx* said: i thought the bitch lover ass etc was in lines with when they use it w the N word. I don't want people getting kicked from my server by saying "lover" Oh sorry, you're absolutely right, here's the correct way (this will match jew as well as j3w:Code: List<String> bad_words = new List<String>(); bad_words.Add(@"n+[1i]+g+[3ea]+r*(bitch|lover|ass|etc)_"); bad_words.Add(@"j+[3e]+w"); String[] chat_words = Regex.Split(player.LastChat, @"\s+"); foreach(String chat_word in chat_words) foreach(String bad_word in bad_words) if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success) return true; return false;If you also want to cover jew bitch, jew lover, jew ass, etc, change the 2nd bad_words.Add line to:Code: bad_words.Add(@"j+[3e]+w*(bitch|lover|ass|etc)_");EDIT: I only saw Papa's post after I replied, however I'll leave the contents as it covers a little more. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 17, 2015 Author Share Posted April 17, 2015 Originally Posted by Phractal*: Hi all, I am trying to get this limit to work and hoping for some helpful input. What I am trying to achieve is that once the round ends, the timer in HArdline is set to 300 and whern the Round starts, back to 100 and preeset NORMAL. The RoundEnd part works fine, but the Round Start part doesnt. I only tried it on an emoty erver though, does that have anythign to do with it? Just manually restarted the round via Procon or switched to next map. Anyway, here are the codes: First Limit OnRoundOver first check set to Code Code: plugin.ServerCommand("vars.roundTimeLimit", "300"); return false;Second Limit:OnRoundStart first check set to Code Code: plugin.ServerCommand("vars.roundTimeLimit", "100"); plugin.ServerCommand("vars.preset", "NORMAL", "false"); return false;Thanks for any help! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 17, 2015 Author Share Posted April 17, 2015 Originally Posted by PapaCharlie9*: Phractal* said: Hi all, I am trying to get this limit to work and hoping for some helpful input. What I am trying to achieve is that once the round ends, the timer in HArdline is set to 300 and whern the Round starts, back to 100 and preeset NORMAL. The RoundEnd part works fine, but the Round Start part doesnt. I only tried it on an emoty erver though, does that have anythign to do with it? Just manually restarted the round via Procon or switched to next map. Anyway, here are the codes: First Limit OnRoundOver first check set to Code Code: plugin.ServerCommand("vars.roundTimeLimit", "300"); return false;Second Limit:OnRoundStart first check set to Code Code: plugin.ServerCommand("vars.roundTimeLimit", "100"); plugin.ServerCommand("vars.preset", "NORMAL", "false"); return false;Thanks for any help!It's because OnRoundStart is triggered when the first player spawns. That's too late for what you want to do. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 17, 2015 Author Share Posted April 17, 2015 Originally Posted by Phractal*: PapaCharlie9* said: It's because OnRoundStart is triggered when the first player spawns. That's too late for what you want to do.You actually gave me the hint I needed, thanks PC9 I now got it successfully to work as intended. On round end it sets the time limit to 200% so the next round starts with double the time. As soon as the round starts the limit gets reverted back to 100% thus turning the server back to Normal preset (which seems more appealing to people). Heres what I used: OnRoundOver first check to this expression Code: (server.PlayerCount > 3) second check to this codeCode: plugin.ServerCommand("vars.roundTimeLimit", "300"); plugin.ServerCommand("vars.roundStartReadyPlayersPercent", "0"); plugin.ServerCommand("vars.roundWarmupTimeout", "30"); return false; OnRoundStartfirst check to this expression Code: (server.PlayerCount > 3) second check to this codeCode: plugin.ServerCommand("vars.roundTimeLimit", "100"); plugin.ServerCommand("vars.roundStartReadyPlayersPercent", "35"); plugin.ServerCommand("vars.roundWarmupTimeout", "45"); plugin.ServerCommand("vars.preset", "NORMAL", "false"); return false;Limit activates only if more than 3 people are on the server, keeping my servers at Normal most of the time without having to loose out on customisation. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 18, 2015 Author Share Posted April 18, 2015 Originally Posted by moacco07*: Any chance to script headshot streak/ headshot counter for BF4? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 19, 2015 Author Share Posted April 19, 2015 Originally Posted by LCARSx64*: moacco07* said: Any chance to script headshot streak/ headshot counter for BF4?Please provide specific details like, e.g. ... When do you want these streaks to display? Who should see them? Give examples of what to actually display, etc. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 20, 2015 Author Share Posted April 20, 2015 Originally Posted by moacco07*: LCARSx64* said: Please provide specific details like, e.g. ... When do you want these streaks to display? Who should see them? Give examples of what to actually display, etc.Hi LCARSx64, My sincere apologies for not providing you with more details. Below is the structure. - Say message to all applies, starting at 3 kills, subsequent 5, 7, 10 and stops at 20 and when player got killed, message reset - Message (player has X headshot kill streaks) X= number of kills. 3,5,7,10 and 20. - Message when player got killed (player has ended player's headshot kill streaks at X) X = number of headshot player has achieved before getting killed bu other player. - Also are you able to come up with script that shows headshot distance. - anything above 800 meters, it will show in "Say to all" Player has headshot killed player at distance of XXXX meters. - and if anyone achieved longer distance then the previous player. Message (say to all) New record player has headshot killed player at distance of XXXX meters. - And at the end of the Round, can it be shown as "Say to all" Record for headshot distance stands at XXXX meters. Hope my message does not confuse you. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 20, 2015 Author Share Posted April 20, 2015 Originally Posted by LCARSx64*: moacco07* said: Hi LCARSx64, My sincere apologies for not providing you with more details. Below is the structure. - Say message to all applies, starting at 3 kills, subsequent 5, 7, 10 and stops at 20 and when player got killed, message reset - Message (player has X headshot kill streaks) X= number of kills. 3,5,7,10 and 20. - Message when player got killed (player has ended player's headshot kill streaks at X) X = number of headshot player has achieved before getting killed bu other player. - Also are you able to come up with script that shows headshot distance. - anything above 800 meters, it will show in "Say to all" Player has headshot killed player at distance of XXXX meters. - and if anyone achieved longer distance then the previous player. Message (say to all) New record player has headshot killed player at distance of XXXX meters. - And at the end of the Round, can it be shown as "Say to all" Record for headshot distance stands at XXXX meters. Hope my message does not confuse you. As far as I'm aware there is no way of determining the headshot distance, so unfortunately this isn't possible. The headshot kill streak is possible and requires 2 limits... Headshot Streak 1 of 2 Create a new limit to evaluate OnKill. Set action to None. Set first_check to this Code: NOTE: Remove the code highlighted in red if you wish the headshot streak to increase even if there is a non-headshot kill between kills, e.g. 1st kill by headshot 2nd kill by body shot 3rd kill by headshot Total headshot streak = 2 Code: // Headshot Streak - Limit 1 of 2 // v1.0 - OnKill // String hsKey = "_HS_STREAK_"; String msg = player.Name + " has a headshot kill streak of "; int hsCount = 0; if (kill.Headshot) { if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey); hsCount++; if (hsCount == 3 || hsCount == 5 || hsCount == 7 || hsCount == 10 || hsCount == 20) { msg = msg + hsCount.ToString() + "!"; plugin.SendGlobalMessage(msg); } } else { hsCount = 0; } player.RoundData.setInt(hsKey, hsCount); return false; Headshot Streak 2 of 2 Create a new limit to evaluate OnDeath. Set action to None. Set first_check to this Code: Code: // Headshot Streak - Limit 2 of 2 // v1.0 - OnDeath // String hsKey = "_HS_STREAK_"; String msg = killer.Name + " has ended " + player.Name + "'s headshot streak at "; int hsCount = 0; if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey); if (hsCount > 0) { msg = msg + hsCount.ToString() + "!"; plugin.SendGlobalMessage(msg); } player.RoundData.setInt(hsKey, 0); return false; End of post. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 20, 2015 Author Share Posted April 20, 2015 Originally Posted by moacco07*: LCARSx64* said: As far as I'm aware there is no way of determining the headshot distance, so unfortunately this isn't possible. The headshot kill streak is possible and requires 2 limits... Headshot Streak 1 of 2 Create a new limit to evaluate OnKill. Set action to None. Set first_check to this Code: NOTE: Remove the code highlighted in red if you wish the headshot streak to increase even if there is a non-headshot kill between kills, e.g. 1st kill by headshot 2nd kill by body shot 3rd kill by headshot Total headshot streak = 2 Code: // Headshot Streak - Limit 1 of 2 // v1.0 - OnKill // String hsKey = "_HS_STREAK_"; String msg = player.Name + " has a headshot kill streak of "; int hsCount = 0; if (kill.Headshot) { if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey); hsCount++; if (hsCount == 3 || hsCount == 5 || hsCount == 7 || hsCount == 10 || hsCount == 20) { msg = msg + hsCount.ToString() + "!"; plugin.SendGlobalMessage(msg); } } else { hsCount = 0; } player.RoundData.setInt(hsKey, hsCount); return false; Headshot Streak 2 of 2 Create a new limit to evaluate OnDeath. Set action to None. Set first_check to this Code: Code: // Headshot Streak - Limit 2 of 2 // v1.0 - OnDeath // String hsKey = "_HS_STREAK_"; String msg = killer.Name + " has ended " + player.Name + "'s headshot streak at "; int hsCount = 0; if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey); if (hsCount > 0) { msg = msg + hsCount.ToString() + "!"; plugin.SendGlobalMessage(msg); } player.RoundData.setInt(hsKey, 0); return false; End of post. Thank you. I enter this scripts now. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 20, 2015 Author Share Posted April 20, 2015 Originally Posted by LCARSx64*: moacco07* said: Thank you. I enter this scripts now.I just noticed that I hadn't red highlighted a small part of the optional removal code in my previous post, I've edited that post to include the missing highlight. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 20, 2015 Author Share Posted April 20, 2015 Originally Posted by PapaCharlie9*: LCARSx64* said: The headshot kill streak is possible and requires 2 limits...Nothing wrong with those limits -- they fit the requirements perfectly, but for the sake of education, I'll point out that you could do both functions in one limit. Just check the victim in OnKill. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 21, 2015 Author Share Posted April 21, 2015 Originally Posted by LCARSx64*: PapaCharlie9* said: Nothing wrong with those limits -- they fit the requirements perfectly, but for the sake of education, I'll point out that you could do both functions in one limit. Just check the victim in OnKill.Good point, I never even considered checking the victim. Thanks. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 21, 2015 Author Share Posted April 21, 2015 Originally Posted by moacco07*: Hi again, can anyone direct me or create scripts for Sniper rifles, DMR and knife only with following punishment for using other weapons. 1 - kill 2 - kill 3 - kick 4 - tban 30 mins, then counter reset. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 24, 2015 Author Share Posted April 24, 2015 Originally Posted by LCARSx64*: moacco07* said: Hi again, can anyone direct me or create scripts for Sniper rifles, DMR and knife only with following punishment for using other weapons. 1 - kill 2 - kill 3 - kick 4 - tban 30 mins, then counter reset. Here you go: Weapon Limiter (Sniper, DMR && Knife ONLY) Create a new limit to evaluate OnKill. Set action to None. Set first_check to this Code: Code: // Weapon Limiter (Sniper, DMR & Knife ONLY) - Limit 1 of 1 // v1.0 - OnKill // String sdkKey = player.Name + "_SDK_LIMITER_"; int iCount = 0; String msg = "Only Sniper Rifles, DMRs and Knifes are allowed!"; String[] logs = { "^b^1Weapon Limiter^0^n: ", "Weapon Limiter: ", " has been killed for using a prohibited weapon. Warning ", " has been kicked for using a prohibited weapon. Warning ", " has been 30 minute banned for using a prohibited weapon. Warning " }; if (!Regex.Match(kill.Category, @"(SniperRifle|DMR|Melee)").Success || player.Role != 0) return false; if (server.Data.issetInt(sdkKey)) iCount = server.Data.getInt(sdkKey); iCount++; switch (iCount) { case 1: case 2: plugin.SendPlayerMessage(player.Name, msg); plugin.SendPlayerYell(player.Name, "\n" + msg, 8); plugin.KillPlayer(player.Name); plugin.ConsoleWrite(logs[0] + player.Name + logs[2] + iCount.ToString() + "."); plugin.PRoConChat(logs[0] + player.Name + logs[2] + iCount.ToString() + "."); plugin.PRoConEvent(logs[1] + player.Name + logs[2] + iCount.ToString() + ".", "Insane Limits"); break; case 3: plugin.ConsoleWrite(logs[0] + player.Name + logs[3] + iCount.ToString() + "."); plugin.PRoConChat(logs[0] + player.Name + logs[3] + iCount.ToString() + "."); plugin.PRoConEvent(logs[1] + player.Name + logs[3] + iCount.ToString() + ".", "Insane Limits"); plugin.KickPlayerWithMessage(player.Name, msg); break; case 4: plugin.ConsoleWrite(logs[0] + player.Name + logs[4] + iCount.ToString() + "."); plugin.PRoConChat(logs[0] + player.Name + logs[4] + iCount.ToString() + "."); plugin.PRoConEvent(logs[1] + player.Name + logs[4] + iCount.ToString() + ".", "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, player.Name, 30, msg); iCount = 0; break; } server.Data.setInt(sdkKey, iCount); return false; End of post! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 24, 2015 Author Share Posted April 24, 2015 Originally Posted by moacco07*: LCARSx64* said: Here you go: Weapon Limiter (Sniper, DMR && Knife ONLY) Create a new limit to evaluate OnKill. Set action to None. Set first_check to this Code: Code: // Weapon Limiter (Sniper, DMR & Knife ONLY) - Limit 1 of 1 // v1.0 - OnKill // String sdkKey = player.Name + "_SDK_LIMITER_"; int iCount = 0; String msg = "Only Sniper Rifles, DMRs and Knifes are allowed!"; String[] logs = { "^b^1Weapon Limiter^0^n: ", "Weapon Limiter: ", " has been killed for using a prohibited weapon. Warning ", " has been kicked for using a prohibited weapon. Warning ", " has been 30 minute banned for using a prohibited weapon. Warning " }; if (!Regex.Match(kill.Category, @"(SniperRifle|DMR|Melee)").Success || player.Role != 0) return false; if (server.Data.issetInt(sdkKey)) iCount = server.Data.getInt(sdkKey); iCount++; switch (iCount) { case 1: case 2: plugin.SendPlayerMessage(player.Name, msg); plugin.SendPlayerYell(player.Name, "\n" + msg, 8); plugin.KillPlayer(player.Name); plugin.ConsoleWrite(logs[0] + player.Name + logs[2] + iCount.ToString() + "."); plugin.PRoConChat(logs[0] + player.Name + logs[2] + iCount.ToString() + "."); plugin.PRoConEvent(logs[1] + player.Name + logs[2] + iCount.ToString() + ".", "Insane Limits"); break; case 3: plugin.ConsoleWrite(logs[0] + player.Name + logs[3] + iCount.ToString() + "."); plugin.PRoConChat(logs[0] + player.Name + logs[3] + iCount.ToString() + "."); plugin.PRoConEvent(logs[1] + player.Name + logs[3] + iCount.ToString() + ".", "Insane Limits"); plugin.KickPlayerWithMessage(player.Name, msg); break; case 4: plugin.ConsoleWrite(logs[0] + player.Name + logs[4] + iCount.ToString() + "."); plugin.PRoConChat(logs[0] + player.Name + logs[4] + iCount.ToString() + "."); plugin.PRoConEvent(logs[1] + player.Name + logs[4] + iCount.ToString() + ".", "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, player.Name, 30, msg); iCount = 0; break; } server.Data.setInt(sdkKey, iCount); return false; End of post! Thank you. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 25, 2015 Author Share Posted April 25, 2015 Originally Posted by buzZzer*: Hey Guys, can anyone help me A Sniper limit (for BFHL) of this as implemented by Procon rules to Insame Limits? THX Quote #Set values for Max # of snipers, Teamsize is smallest team in server #--------------------------------------------------------------- On Spawn;ServerFirst; Set %server_TeamSize2_sniperlimit% 1 Set %server_TeamSize4_sniperlimit% 1 Set %server_TeamSize8_sniperlimit% 2 Set %server_TeamSize12_sniperlimit% 3 Set %server_TeamSize16_sniperlimit% 4 Set %server_TeamSize20_sniperlimit% 5 Set %server_TeamSize24_sniperlinit% 6 Set %server_TeamSize32_sniperlimit% 8 #---------------------------------------------------------------- On Spawn; if %n% >= -1;if %n% %server_TeamSize2_sniperlimit%;Set %server_sniperlimit% %server_TeamSize2_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XXS teams) if %n% >= 3;if %n% %server_TeamSize4_sniperlimit%;Set %server_sniperlimit% %server_TeamSize4_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XS small teams) if %n% >= 5;if %n% %server_TeamSize8_sniperlimit%;Set %server_sniperlimit% %server_TeamSize8_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (S teams) if %n% >= 9;if %n% %server_TeamSize12_sniperlimit%;Set %server_sniperlimit% %server_TeamSize12_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (M teams) if %n% >= 13;if %n% %server_TeamSize16_sniperlimit%;Set %server_sniperlimit% %server_TeamSize16_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (L teams) if %n% >= 15;if %n% %server_TeamSize20_sniperlimit%;Set %server_sniperlimit% %server_TeamSize20_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XL teams) if %n% >= 19;if %n% %server_TeamSize24_sniperlimit%;Set %server_sniperlimit% %server_TeamSize24_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XXL teams) if %n% >= 25;if %n% %server_TeamSize32_sniperlimit%;Set %server_sniperlimit% %server_TeamSize32_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XXXL teams) # SNIPER LIMIT rulz by TARRELTJE On Spawn;if %_beingsniper% == 1;Decr %_beingsniper%;Decr %team_recontotal%;log we have %team_recontotal% snipers on team %pt% On Spawn;Set %_beingsniper% 0 On kill;Damage sniperRifle; if %team_recontotal% == %server_sniperlimit%;if %_beingsniper% == 0;Say Sniper Limit max %server_sniperlimit% snipers each team !!!;Kill if %_beingsniper% == 1;End;log %p% is still a sniper, %team_recontotal% snipers on team %pt% incr %team_recontotal%;set %_beingsniper% 1;log %p% is a sniper, %team_recontotal% snipers on team %pt% On kill;Not Damage sniperRifle;Not Damage Handgun;if %_beingsniper% == 1;decr %_beingsniper%;decr %team_recontotal%;log %p% is no sniper anymore, %team_recontotal% snipers on team %pt% On Leave;if %_beingsniper% == 1;Decr %team_recontotal% # !snipers / !sniperx INFO MESSAGES On Say;Text !snipers; PlayerSay Sniper limit: %server_sl_total[%ptk%]%/%server_sniperlimit%. Reserve slot with sniper kill, lose it with non-sniper/handgun kill. If %server_sl_total[%ptk%]% == 0;PlayerSay 0/%server_sniperlimit% SNIPERS on team %pt% If %server_sl_total[%ptk%]% > 0;PlayerSay %pt% SNIPER[1/%server_sniperlimit%] is %server_sl_snipername[%ptk%][1]% If %server_sl_total[%ptk%]% > 1;PlayerSay %pt% SNIPER[2/%server_sniperlimit%] is %server_sl_snipername[%ptk%][2]% If %server_sl_total[%ptk%]% > 2;PlayerSay %pt% SNIPER[3/%server_sniperlimit%] is %server_sl_snipername[%ptk%][3]% If %server_sl_total[%ptk%]% > 3;PlayerSay %pt% SNIPER[4/%server_sniperlimit%] is %server_sl_snipername[%ptk%][4]% On Say;Text !sniperx; PlayerSay SNIPERS: Team 1: %server_sl_total[1]%/%server_sniperlimit%, Team 2: %server_sl_total[2]%/%server_sniperlimit% * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 25, 2015 Author Share Posted April 25, 2015 Originally Posted by PapaCharlie9*: buzZzer* said: Hey Guys, can anyone help me A Sniper limit (for BFHL) of this as implemented by Procon rules to Insame Limits? THX Why not just use ProconRulz? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 26, 2015 Author Share Posted April 26, 2015 Originally Posted by buzZzer*: PapaCharlie9* said: Why not just use ProconRulz?work both plugins without interfering ?I previously thought that only one of them works but not both together ..? p.s sorry for my bad english * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 26, 2015 Author Share Posted April 26, 2015 Originally Posted by LCARSx64*: buzZzer* said: work both plugins without interfering ? I previously thought that only one of them works but not both together ..? p.s sorry for my bad english You can use both plugins together, just make sure you don't have a ProconRulz Rule and Insane Limits Limit doing the same thing(s). * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 26, 2015 Author Share Posted April 26, 2015 Originally Posted by buzZzer*: LCARSx64* said: You can use both plugins together, just make sure you don't have a ProconRulz Rule and Insane Limits Limit doing the same thing(s). Ahh ok Thx * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 4, 2015 Author Share Posted May 4, 2015 Originally Posted by s1ngular1ty*: How can you create a message in Insane Limits to all admins that are in game like the AdminSay command in ProConRulz ? I can't seem to figure this out. Any help is appreciated! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 4, 2015 Author Share Posted May 4, 2015 Originally Posted by LCARSx64*: s1ngular1ty* said: How can you create a message in Insane Limits to all admins that are in game like the AdminSay command in ProConRulz ? I can't seem to figure this out. Any help is appreciated! There are a couple of ways of doing this, you could test if a player has a Procon account with specific privileges or you could use a custom list of all your admins. Each method would also have to be altered depending on the type of triggering event, for example, if the event is OnAnyChat then you would just check the specific player that triggered this event. If the event was something like OnIntervalServer, you might grab a list of all players in the server and then test each player in that list for admin privileges. Examples: Using a custom list: Set use_custom_lists to True and create a new list with these parameters: Code: name = admins comparison = CaseSensitive data = player1, player2, etc.Test if a player is in the list:Code: if (plugin.isInList(player.Name, "admins")) { // Player is admin, add your code here } Testing for Procon privileges (in this example the player must be able to kill, kick, ban, move and change maps):Code: bool bKill = false; bool bKick = false; bool bBan = false; bool bMove = false; bool bLevel = false; if (plugin.CheckAccount(player.Name, out bKill, out bKick, out bBan, out bMove, out bLevel)) { if (bKill && bKick && bBan && bMove && bLevel) { // Player is admin, add your code here. } } * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 5, 2015 Author Share Posted May 5, 2015 Originally Posted by moacco07*: Hello again, I have another request. Now my preset for idle kick is at 86400 secs= 24 hrs and the reason is for populating the server. But when the server is populated we still people in the server still idling. Is there any script for insane limit that can something like below. - When server have 0 - 39 players idle timer is at 86400 seconds - When server hits more than 40 it activates new idle timer at 300 seconds - When the server is empty again it reset the counter - This sequence will repeat * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 5, 2015 Author Share Posted May 5, 2015 Originally Posted by s1ngular1ty*: LCARSx64* said: There are a couple of ways of doing this, you could test if a player has a Procon account with specific privileges or you could use a custom list of all your admins. Each method would also have to be altered depending on the type of triggering event, for example, if the event is OnAnyChat then you would just check the specific player that triggered this event. If the event was something like OnIntervalServer, you might grab a list of all players in the server and then test each player in that list for admin privileges. Examples: Using a custom list: Set use_custom_lists to True and create a new list with these parameters: Code: name = admins comparison = CaseSensitive data = player1, player2, etc.Test if a player is in the list:Code: if (plugin.isInList(player.Name, "admins")) { // Player is admin, add your code here } Testing for Procon privileges (in this example the player must be able to kill, kick, ban, move and change maps):Code: bool bKill = false; bool bKick = false; bool bBan = false; bool bMove = false; bool bLevel = false; if (plugin.CheckAccount(player.Name, out bKill, out bKick, out bBan, out bMove, out bLevel)) { if (bKill && bKick && bBan && bMove && bLevel) { // Player is admin, add your code here. } } Thanks for the reply!!! So, say I want to use the 2nd option. How would I send the message to all Admins in game? Do I need to loop through the player list somehow? Can you provide an example? Also I had a second unrelated question. How can you store variables permanently that are never automatically erased or reset? You can do this in ProCon Rulz and I'd like to be able to do something similar in Insane Limits. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 5, 2015 Author Share Posted May 5, 2015 Originally Posted by LCARSx64*: s1ngular1ty* said: Thanks for the reply!!! So, say I want to use the 2nd option. How would I send the message to all Admins in game? Do I need to loop through the player list somehow? Can you provide an example? Also I had a second unrelated question. How can you store variables permanently that are never automatically erased or reset? You can do this in ProCon Rulz and I'd like to be able to do something similar in Insane Limits. Depending on the triggering event then yes, you would make a list of all players and cycle through those selecting only the admins. If the triggering event were something like OnAnyChat then you could simply just check the player that triggered it.Here is an example of creating a list of all players and cycling through it: Code: List<PlayerInfoInterface> allPlayers = new List<PlayerInfoInterface>(); allPlayers.AddRange(team1.players); allPlayers.AddRange(team2.players); String msg = "This is a message only to Admins!"; bool bKill = false; bool bKick = false; bool bBan = false; bool bMove = false; bool bLevel = false; foreach (PlayerInfoInterface p in allPlayers) { bKill = false; bKick = false; bBan = false; bMove = false; bLevel = false; if (plugin.CheckAccount(p.Name, out bKill, out bKick, out bBan, out bMove, out bLevel)) { if (bKill && bKick && bBan) { plugin.SendPlayerMessage(p.Name, msg); } } } return false;The code above will create a list of all players in the server then test each for Procon admin privileges, if the player is an admin he/she is sent a chat message. As for storing variables permanently, this would depend on what you actually mean by permanently. If you meant store while the plugin is active, you would use something like: Code: String myKey = "Variable_Key"; // This is a string to use as the variable key String myString = "A string variable"; // This is the actual variable data plugin.Data.setString(myKey, myString);For more details, see Data and RoundData Objects, in the first post of the Insane Limits thread: showthread....17-NOV-2013%29* If by permanently you mean to store even after a Procon layer is shutdown, you can use text files. For an example of this, take a look at the code in the following limit: 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 May 7, 2015 Author Share Posted May 7, 2015 Originally Posted by moacco07*: moacco07* said: Hello again, I have another request. Now my preset for idle kick is at 86400 secs= 24 hrs and the reason is for populating the server. But when the server is populated we still people in the server still idling. Is there any script for insane limit that can something like below. - When server have 0 - 39 players idle timer is at 86400 seconds - When server hits more than 40 it activates new idle timer at 300 seconds - When the server is empty again it reset the counter - This sequence will repeat Hello, I don't mean spam but just to remind if anyone can create this script? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 8, 2015 Author Share Posted May 8, 2015 Originally Posted by LCARSx64*: moacco07* said: Hello again, I have another request. Now my preset for idle kick is at 86400 secs= 24 hrs and the reason is for populating the server. But when the server is populated we still people in the server still idling. Is there any script for insane limit that can something like below. - When server have 0 - 39 players idle timer is at 86400 seconds - When server hits more than 40 it activates new idle timer at 300 seconds - When the server is empty again it reset the counter - This sequence will repeat I am unsure if the idle timeout can be changed on the fly, but if it can, the following limit will work (albeit not the most efficient way): NOTE: Change the value highlighted in red to your desired timing (minimum 10 seconds). Adaptive Idle Timeout Create a new limit to evaluate OnIntervalServer. Set the evaluation_interval to 30 seconds. Set action to None. Set first_check to this Code: Code: // Adaptive Idle Timeout - Limit 1 of 1 // v1.0 - OnIntervalServer - first_check // int idleTimeout = 86400; if (server.PlayerCount >= 40) idleTimeout = 300; plugin.ServerCommand("vars.idleTimeout", idleTimeout.ToString()); return false; End of post. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 8, 2015 Author Share Posted May 8, 2015 Originally Posted by moacco07*: LCARSx64* said: I am unsure if the idle timeout can be changed on the fly, but if it can, the following limit will work (albeit not the most efficient way): NOTE: Change the value highlighted in red to your desired timing (minimum 10 seconds). Adaptive Idle Timeout Create a new limit to evaluate OnIntervalServer. Set the evaluation_interval to 30 seconds. Set action to None. Set first_check to this Code: Code: // Adaptive Idle Timeout - Limit 1 of 1 // v1.0 - OnIntervalServer - first_check // int idleTimeout = 86400; if (server.PlayerCount >= 40) idleTimeout = 300; plugin.ServerCommand("vars.idleTimeout", idleTimeout.ToString()); return false; End of post. Hi LCARSx64, Thank you Sir for the code. I'll try and report back regardless if it's working or not. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 9, 2015 Author Share Posted May 9, 2015 Originally Posted by s1ngular1ty*: LCARSx64* said: Depending on the triggering event then yes, you would make a list of all players and cycle through those selecting only the admins. If the triggering event were something like OnAnyChat then you could simply just check the player that triggered it. Here is an example of creating a list of all players and cycling through it: Code: List<PlayerInfoInterface> allPlayers = new List<PlayerInfoInterface>(); allPlayers.AddRange(team1.players); allPlayers.AddRange(team2.players); String msg = "This is a message only to Admins!"; bool bKill = false; bool bKick = false; bool bBan = false; bool bMove = false; bool bLevel = false; foreach (PlayerInfoInterface p in allPlayers) { bKill = false; bKick = false; bBan = false; bMove = false; bLevel = false; if (plugin.CheckAccount(p.Name, out bKill, out bKick, out bBan, out bMove, out bLevel)) { if (bKill && bKick && bBan) { plugin.SendPlayerMessage(p.Name, msg); } } } return false;The code above will create a list of all players in the server then test each for Procon admin privileges, if the player is an admin he/she is sent a chat message. As for storing variables permanently, this would depend on what you actually mean by permanently. If you meant store while the plugin is active, you would use something like: Code: String myKey = "Variable_Key"; // This is a string to use as the variable key String myString = "A string variable"; // This is the actual variable data plugin.Data.setString(myKey, myString);For more details, see Data and RoundData Objects, in the first post of the Insane Limits thread: showthread....17-NOV-2013%29* If by permanently you mean to store even after a Procon layer is shutdown, you can use text files. For an example of this, take a look at the code in the following limit: myrcon.net/.../insane-limits-vip-slot-manager-vip-slot-for-help-server-start-v10 Thanks!!! That helps a lot. * 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.