ImportBot Posted April 14, 2014 Share Posted April 14, 2014 Originally Posted by TMiland*: Yell to Squad Members on Request This limit will YELL back to members in your squad, if a player requests something with the commo rose. Like if player requests AMMO, the msg is: "PlayerName requested AMMO!". This is to bring better attention to what your squad mates are requesting. This limit has 2 options: Option 1: Set limit to evaluate OnAnyChat, set action to None Set first_check to this Code: Code: string msg = "none"; if (!player.LastChat.StartsWith("ID_CHAT_")) return false; switch (player.LastChat) { case "ID_CHAT_ATTACK/DEFEND": { msg = player.Name + " Gave you an ORDER! Follow up!"; } break; case "ID_CHAT_THANKS": { msg = player.Name + " says: THANK YOU!"; } break; case "ID_CHAT_SORRY": { msg = player.Name + " says: SORRY!"; } break; case "ID_CHAT_GOGOGO": { msg = player.Name + " said Let's Go!"; } break; case "ID_CHAT_REQUEST_ORDER": { msg = player.Name + " requested ORDERS!"; } break; case "ID_CHAT_REQUEST_MEDIC": { msg = player.Name + " requested a MEDIC!"; } break; case "ID_CHAT_REQUEST_AMMO": { msg = player.Name + " requested AMMO!"; } break; case "ID_CHAT_REQUEST_RIDE": { msg = player.Name + " requested a RIDE!"; } break; case "ID_CHAT_GET_OUT": { msg = player.Name + " requested a SPOT!"; } break; case "ID_CHAT_GET_IN": { msg = player.Name + " has a free SPOT!"; } break; case "ID_CHAT_REQUEST_REPAIRS": { msg = player.Name + " requested REPAIRS!"; } break; case "ID_CHAT_AFFIRMATIVE": { msg = player.Name + " accepted REQUEST!"; } break; case "ID_CHAT_NEGATIVE": { msg = player.Name + " denied REQUEST!"; } break; default: plugin.ConsoleWrite("Unknown commo rose chat code: " + player.LastChat); return false; } // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: { callersTeam.AddRange(team1.players); } break; case 2: { callersTeam.AddRange(team2.players); } break; case 3: { callersTeam.AddRange(team3.players); } break; case 4: { callersTeam.AddRange(team4.players); break; } } // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } // Send msg to squad chat in addition to Yell plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); // For writing to console plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + msg); // For writing to chat //plugin.PRoConChat("^b^1ADMIN ORDERS >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false; Option 2: give your players the option to turn off the yell msgs with @noyell: Code: string msg = "none"; if (!player.LastChat.StartsWith("ID_CHAT_")) return false; switch (player.LastChat) { case "ID_CHAT_ATTACK/DEFEND": { msg = player.Name + " Gave you an ORDER! Follow up!"; } break; case "ID_CHAT_THANKS": { msg = player.Name + " says: THANK YOU!"; } break; case "ID_CHAT_SORRY": { msg = player.Name + " says: SORRY!"; } break; case "ID_CHAT_GOGOGO": { msg = player.Name + " said Let's Go!"; } break; case "ID_CHAT_REQUEST_ORDER": { msg = player.Name + " requested ORDERS!"; } break; case "ID_CHAT_REQUEST_MEDIC": { msg = player.Name + " requested a MEDIC!"; } break; case "ID_CHAT_REQUEST_AMMO": { msg = player.Name + " requested AMMO!"; } break; case "ID_CHAT_REQUEST_RIDE": { msg = player.Name + " requested a RIDE!"; } break; case "ID_CHAT_GET_OUT": { msg = player.Name + " requested a SPOT!"; } break; case "ID_CHAT_GET_IN": { msg = player.Name + " has a free SPOT!"; } break; case "ID_CHAT_REQUEST_REPAIRS": { msg = player.Name + " requested REPAIRS!"; } break; case "ID_CHAT_AFFIRMATIVE": { msg = player.Name + " accepted REQUEST!"; } break; case "ID_CHAT_NEGATIVE": { msg = player.Name + " denied REQUEST!"; } break; default: plugin.ConsoleWrite("Unknown commo rose chat code: " + player.LastChat); return false; } // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: { callersTeam.AddRange(team1.players); } break; case 2: { callersTeam.AddRange(team2.players); } break; case 3: { callersTeam.AddRange(team3.players); } break; case 4: { callersTeam.AddRange(team4.players); break; } } if (!player.Data.issetBool("NoYell")) { player.Data.setBool("NoYell", true); } // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } if (player.Data.getBool("NoYell")) { // Send msg to squad chat if @noyell is off plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); } // For writing to console plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + msg); // For writing to chat //plugin.PRoConChat("^b^1ADMIN ORDERS >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false; New version with random messages taken from the ingame commo rose sounds! PS: This is the @noyell version. Code: if (!player.LastChat.StartsWith("ID_CHAT_")) return false; string msg; List<string> MessageType1 = new List<string>(); List<string> MessageType2 = new List<string>(); List<string> MessageType3 = new List<string>(); List<string> MessageType4 = new List<string>(); List<string> MessageType5 = new List<string>(); List<string> MessageType6 = new List<string>(); List<string> MessageType7 = new List<string>(); List<string> MessageType8 = new List<string>(); List<string> MessageType9 = new List<string>(); List<string> MessageType10 = new List<string>(); List<string> MessageType11 = new List<string>(); List<string> MessageType12 = new List<string>(); List<string> MessageType13 = new List<string>(); Random rnd = new Random(); // Add all your messages which should be shown on "ID_CHAT_ATTACK/DEFEND" request MessageType1.Add(" Gave you an ORDER Soldier! PTFO!"); MessageType1.Add(" PTFO To win the round Soldier!"); MessageType1.Add(" Has marked the OBJECTIVE! PTFO!"); MessageType1.Add(" Attack/Defend the marked OBJECTIVE Soldier"); // Add all your messages which should be shown on "ID_CHAT_THANKS" request MessageType2.Add(": Thank You!"); MessageType2.Add(": Thanks Man!"); MessageType2.Add(": Hey, Thanks A Lot!"); MessageType2.Add(": Thank You Soldier!"); MessageType2.Add(": Thanks Man, I Owe You One!"); MessageType2.Add(": Thanks Soldier!"); MessageType2.Add(": Alright, Thanks A lot Man!"); MessageType2.Add(": Thank You Man!"); MessageType2.Add(": That's Great, Thanks!"); MessageType2.Add(": Hey, Thanks A Lot!"); MessageType2.Add(": Thanks Dude!"); MessageType2.Add(": Sweet, Thanks Man!"); MessageType2.Add(": Thanks, I Appreciate It!"); MessageType2.Add(": Thanks A Lot!"); MessageType2.Add(": Alright, Thanks A lot!"); MessageType2.Add(": Thank You Bro!"); MessageType2.Add(": Hey, I Really Appreciate It!"); MessageType2.Add(": Damn, Thanks A Lot!"); MessageType2.Add(": Hey, I Owe You One!"); MessageType2.Add(": Thanks Man, Alright!"); // Add all your messages which should be shown on "ID_CHAT_SORRY" request MessageType3.Add(": My Bad!"); MessageType3.Add(": Oh Fuck, My Bad Man!"); MessageType3.Add(": Sorry Man, I Fucked Up!"); MessageType3.Add(": Uh, My Mistake!"); MessageType3.Add(": Oh Fuck, Sorry About That!"); MessageType3.Add(": I Didn't Mean To Fuck That One Up!"); MessageType3.Add(": Sorry Man, My Bad!"); MessageType3.Add(": Aw, Fuck Me, That Was My Fault!"); MessageType3.Add(": Fuck Man, I Am Sorry!"); MessageType3.Add(": Aw Shit, Sorry!"); MessageType3.Add(": Shit, That Was My Bad!"); MessageType3.Add(": That Was My Fault!"); MessageType3.Add(": Yeah I Fucked That One Up, Sorry Man!"); MessageType3.Add(": Sorry My Bad, I Fucked Up!"); MessageType3.Add(": My Bad!"); MessageType3.Add(": That Was My Fault, Sorry!"); MessageType3.Add(": Sorry, Man That Was My Fault!"); MessageType3.Add(": That Was My Fault Man, Sorry!"); MessageType3.Add(": Thats On Me, I Am Sorry Man!"); MessageType3.Add(": Aw Fuck, I Am Sorry Man!"); MessageType3.Add(": Hey, I Am Sorry!"); MessageType3.Add(": My Fault!"); MessageType3.Add(": Sorry Bro!"); MessageType3.Add(": Wow, Sorry Dude!"); MessageType3.Add(": Sorry Man, I Fucked Up!"); MessageType3.Add(": Hey! Sorry About That!"); MessageType3.Add(": Jeez, Sorry About That!"); MessageType3.Add(": Aw Fuck, Sorry, My Fault!"); MessageType3.Add(": Sorry Dude!"); MessageType3.Add(": Sorry About That, Won't Happen Again!"); MessageType3.Add(": Sorry!"); MessageType3.Add(": I am so Sorry!"); MessageType3.Add(": Sorry About That!"); MessageType3.Add(": Oh Crap!"); // Add all your messages which should be shown on "ID_CHAT_GOGOGO" request MessageType4.Add(": Hey Grab Your Shit, Let's Go!"); MessageType4.Add(": Playtime Is Over, Get Out!"); MessageType4.Add(": Grab Your Shit, We're Steppin!"); MessageType4.Add(": We're Steppin!"); MessageType4.Add(": GO!"); MessageType4.Add(": Go Now!"); MessageType4.Add(": Let's Go! GO!!"); MessageType4.Add(": Come On, Let's Go"); MessageType4.Add(": Let's Go!"); MessageType4.Add(": Let's Move! Move! Move!"); MessageType4.Add(": Come On, GO!!"); MessageType4.Add(": Go, NOW!!"); MessageType4.Add(": We are Steppin!"); MessageType4.Add(": Let's Move, GO!!"); MessageType4.Add(": Go, Let's Move Out!"); MessageType4.Add(": Mooooooove!!!"); MessageType4.Add(": Knees High, Step It UP, Go! Go!"); MessageType4.Add(": Move Your Asses, Let's Go!"); MessageType4.Add(": Alright, Let's Get Fucking Moving!"); MessageType4.Add(": Move Out, You Motherfukkas!"); MessageType4.Add(": It's Time To Haul Ass!"); MessageType4.Add(": Alright, We gotta Move Now!"); MessageType4.Add(": We Are Moving Out!"); MessageType4.Add(": Go! Go! Go!"); MessageType4.Add(": Let's get out of here!"); MessageType4.Add(": Let's get down to business!"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_ORDER" request MessageType5.Add(": What's the objective Squad Leader_"); MessageType5.Add(": Objective Squad Leader_"); MessageType5.Add(": What's the ORDERS_"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_MEDIC" request MessageType6.Add(" requested a MEDIC! Throw out a bag!"); MessageType6.Add(" Is DYING! Give him some MEDICINE"); MessageType6.Add(": I Need a MEDIC!"); MessageType6.Add(": Where Is The Got Damn MEDIC_"); MessageType6.Add(": Get Me A Medic Over Here!"); MessageType6.Add(": Get Me A Medic!!"); MessageType6.Add(": I Need A Fucking Medic NOW!"); MessageType6.Add(": Get Me A Fucking Medic!"); MessageType6.Add(": MEDIIIIIC!!"); MessageType6.Add(": Aw, Hell, I Need A Medic Over Here!"); MessageType6.Add(": I Am Dying Out Here, I Need A Medic!"); MessageType6.Add(": Oh Jesus, I Need A Medic!"); MessageType6.Add(": Oh God, I Need A Medic!"); MessageType6.Add(": I Need A Medic!"); MessageType6.Add(": Bleeding All Over The Place, MEEDIC!"); MessageType6.Add(": Give Me A Fucking Medic!"); MessageType6.Add(": I Need A Medic Here, NOW!"); MessageType6.Add(": I NEED A MEDIC!!"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_AMMO" request MessageType7.Add(" Anybody Got Any ROUNDS_"); MessageType7.Add(" I Need Some Bullets Over Here!"); MessageType7.Add(" AMMO!! AMMO!!"); MessageType7.Add(" Somebody Hook Me Up With Some AMMO!"); MessageType7.Add(" Hey, Give Me Some AMMO!"); MessageType7.Add(" Toss Me Over Some ROUNDS!"); MessageType7.Add(" Hook Me Up With Some ROUNDS!"); MessageType7.Add(" I Need Some AMMO!"); MessageType7.Add(" I Need Some AMMO Over Here!"); MessageType7.Add(" I Need Some AMMO Over Here, Someone Help Me Out!"); MessageType7.Add(" requested AMMO! Throw out a bag!"); MessageType7.Add(" Is out of AMMO! Give it to him!"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_RIDE" request MessageType8.Add(" requested a RIDE! Go pick him up!"); MessageType8.Add(" needs a RIDE, be a teammate and pick him up!"); MessageType8.Add(": I Need A Ride!"); MessageType8.Add(": Hey, Come Over Here And Pick Me Up!"); MessageType8.Add(": Hey, I Need A Ride Here!"); MessageType8.Add(": Hey, Someone Come Get Me!"); MessageType8.Add(": I Need A Ride!"); MessageType8.Add(": Someone Come Pick Me Up!"); MessageType8.Add(": I Really Need A Ride Over Here!"); MessageType8.Add(": Someone Come Get Me, I Need A Ride!"); MessageType8.Add(": Someone Come Get Me!"); MessageType8.Add(": Someone Send Me A Fucking Vehicle!"); MessageType8.Add(": Hey, Come And Get Me!"); MessageType8.Add(": Come Get My Ass Outta Here!"); MessageType8.Add(": I Need A Fucking Lift!"); MessageType8.Add(": Hey, I Need A Ride!"); MessageType8.Add(": Need A Pickup Over Here!"); MessageType8.Add(": I Need A Lift Here!"); MessageType8.Add(": Come Get My Ass!"); MessageType8.Add(": Come And Get Me, I Need To Get The Fuck Outta Here!"); MessageType8.Add(": Can i get a RIDE_"); // Add all your messages which should be shown on "ID_CHAT_GET_OUT" request MessageType9.Add(": Hop Out, Let's Move!"); MessageType9.Add(": Let's Move People!"); MessageType9.Add(": Let's Move Out Guys, Go! Go!"); MessageType9.Add(": Alright, Let's Bail!"); MessageType9.Add(": Alright, Let's Move On Out!"); MessageType9.Add(": Alright, Out Of The Vehicle!"); MessageType9.Add(": Alright Boys, Let's Move!"); MessageType9.Add(": Get Out Of The Vehicle Now!"); MessageType9.Add(": Alright, Let's Get Outta Here!"); MessageType9.Add(": We are Steppin, Move! Move!"); MessageType9.Add(": Move! Move! Move!"); MessageType9.Add(": Bail Out, Let's Move!"); MessageType9.Add(": Get Out, We are Moving!"); MessageType9.Add(" requested a SPOT! Get out of the vehicle!"); MessageType9.Add(" Is probably playing with a teammate, GTFO!"); // Add all your messages which should be shown on "ID_CHAT_GET_IN" request MessageType10.Add(": Hey, Hop In!"); MessageType10.Add(": Come On, Get In!"); MessageType10.Add(": Get In, Let's Go!"); MessageType10.Add(": Steppin out, Come On, Let's Go!"); MessageType10.Add(": Alright, We Are Moving Out, Get In!"); MessageType10.Add(": Get In, Let's Move Out!"); MessageType10.Add(": Get You Ass In, Let's Roll!"); MessageType10.Add(": Get In Here Soldier, We Gotta Go!"); MessageType10.Add(": Come On, Let's Go!"); MessageType10.Add(": We Aint Got Time To Fuck Around, Let's Go!"); MessageType10.Add(": Come On We Gotta Move!"); MessageType10.Add(": Get Your Ass In Here, We Gotta Go!"); MessageType10.Add(": Get In, We Gotta Go!"); MessageType10.Add(": Alright, Get The Fuck In Here, We Gotta Move!"); MessageType10.Add(": Alright, Hop In, Let's Get Outta Here!"); MessageType10.Add(": Hey Man, Get In, Let's Go!"); MessageType10.Add(" has a free SPOT! Get in the vehicle!"); MessageType10.Add(" said: Do you need a lift_"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_REPAIRS" request MessageType11.Add(" This Shit Aint Running No More, I Need To Get It Fixed!"); MessageType11.Add(" I Need A Mechanic!"); MessageType11.Add(" Someone Get Over Here And Get This Shit Running!"); MessageType11.Add(" I Need Somebody To Fix My Vehicle!"); MessageType11.Add(" My Vehicle Is Fucked, I Need Some Help!"); MessageType11.Add(" Come On, I Need A Mechanic Over Here!"); MessageType11.Add(" Oh Fuck, My Ride Is Out, I Need Somebody To Fix It!"); MessageType11.Add(" Oh, I Fucked Up My Ride, I Need Some Repairs!"); MessageType11.Add(" This Ride Needs Repairs!"); MessageType11.Add(" This Peace Of Shit Cant Move, I Need A Got Damn Mechanic!"); MessageType11.Add(" Hey, Come Fix Up My Ride!"); MessageType11.Add(" In Desperate Need Of A Mechanic Over Here!"); MessageType11.Add(" My Vehicle Is Fucked Up, Can Anybody Help Me_"); MessageType11.Add(" I Need Mechanical Assistance!"); MessageType11.Add(" Fuck, I Need A Mechanic here!"); MessageType11.Add(" I Need Some Help To Fix This Shit!"); MessageType11.Add(" I Need A GreaseMonkey To Take A Look At This Shit!"); MessageType11.Add(" requested REPAIRS! Now! Go! Go! Go!"); MessageType11.Add(" Has a damaged vehicle, go REPAIR your teammate!"); // Add all your messages which should be shown on "ID_CHAT_AFFIRMATIVE" request MessageType12.Add(": Affirmative!"); MessageType12.Add(": Copy That!"); MessageType12.Add(": Okay Chief!"); MessageType12.Add(": Roger That!"); MessageType12.Add(": Sure Thing!"); MessageType12.Add(": No Problem!"); MessageType12.Add(": Yeah, You betcha!"); MessageType12.Add(": Yes!"); MessageType12.Add(": Consider It Done!"); MessageType12.Add(": Yeah, No Sweat!"); MessageType12.Add(": Alright, No Problem!"); MessageType12.Add(": Ill Get Right On That!"); MessageType12.Add(": Thats Affirmative!"); // Add all your messages which should be shown on "ID_CHAT_NEGATIVE" request MessageType13.Add(" NO! I cannot do that!"); MessageType13.Add(" Maybe later!"); MessageType13.Add(" I'll Get Back To It!"); MessageType13.Add(" No can do!"); MessageType13.Add(" Thats a NEGATIVE!"); MessageType13.Add(" NO!"); MessageType13.Add(" Uh, thats not possible at this time!"); MessageType13.Add(" No way man!"); MessageType13.Add(" I am all tied up, i cannot do that right now!"); MessageType13.Add(" Sorry, No!"); MessageType13.Add(" No, Sorry!"); MessageType13.Add(" Negative! Cannot do that right now!"); MessageType13.Add(" Yeah, i dont think so!"); /* All other messages should also be defined here */ switch (player.LastChat) { case "ID_CHAT_ATTACK/DEFEND": { msg = player.Name + MessageType1[rnd.Next(MessageType1.Count)]; // Take a random message from Message Type 1 } break; case "ID_CHAT_THANKS": { msg = player.Name + MessageType2[rnd.Next(MessageType2.Count)]; // Take a random message from Message Type 2 } break; case "ID_CHAT_SORRY": { msg = player.Name + MessageType3[rnd.Next(MessageType3.Count)]; // Take a random message from Message Type 3 } break; case "ID_CHAT_GOGOGO": { msg = player.Name + MessageType4[rnd.Next(MessageType4.Count)]; // Take a random message from Message Type 4 } break; case "ID_CHAT_REQUEST_ORDER": { msg = player.Name + MessageType5[rnd.Next(MessageType5.Count)]; // Take a random message from Message Type 5 } break; case "ID_CHAT_REQUEST_MEDIC": { msg = player.Name + MessageType6[rnd.Next(MessageType6.Count)]; // Take a random message from Message Type 6 } break; case "ID_CHAT_REQUEST_AMMO": { msg = player.Name + MessageType7[rnd.Next(MessageType7.Count)]; // Take a random message from Message Type 7 } break; case "ID_CHAT_REQUEST_RIDE": { msg = player.Name + MessageType8[rnd.Next(MessageType8.Count)]; // Take a random message from Message Type 8 } break; case "ID_CHAT_GET_OUT": { msg = player.Name + MessageType9[rnd.Next(MessageType9.Count)]; // Take a random message from Message Type 9 } break; case "ID_CHAT_GET_IN": { msg = player.Name + MessageType10[rnd.Next(MessageType10.Count)]; // Take a random message from Message Type 10 } break; case "ID_CHAT_REQUEST_REPAIRS": { msg = player.Name + MessageType11[rnd.Next(MessageType11.Count)]; // Take a random message from Message Type 11 } break; case "ID_CHAT_AFFIRMATIVE": { msg = player.Name + MessageType12[rnd.Next(MessageType12.Count)]; // Take a random message from Message Type 12 } break; case "ID_CHAT_NEGATIVE": { msg = player.Name + MessageType13[rnd.Next(MessageType13.Count)]; // Take a random message from Message Type 13 } break; default: plugin.ConsoleWrite("Unknown commo rose chat code: " + player.LastChat); return false; } // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: { callersTeam.AddRange(team1.players); } break; case 2: { callersTeam.AddRange(team2.players); } break; case 3: { callersTeam.AddRange(team3.players); } break; case 4: { callersTeam.AddRange(team4.players); break; } } if (!player.Data.issetBool("NoYell")) { player.Data.setBool("NoYell", true); } // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } if (player.Data.getBool("NoYell")) { // Send msg to squad chat if @noyell is off plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); } // For writing to console plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + msg); // For writing to chat //plugin.PRoConChat("^b^1ADMIN ORDERS >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false;Create a new limit, call it "Yell msg on/off" Set limit to evaluate OnAnyChat, set action to None Set first_check to this Expression Code: player.LastChat.StartsWith("@noyell")Set second_check to this Code: Code: if (!player.Data.issetBool("NoYell")) { player.Data.setBool("NoYell", false); plugin.SendPlayerYell(player.Name, plugin.R ("\nMessages off"),5); return false; } if(player.Data.getBool("NoYell")) { player.Data.setBool("NoYell", false); plugin.SendPlayerYell(player.Name, plugin.R ("\nMessages off"),5); } else { player.Data.setBool("NoYell", true); plugin.SendPlayerYell(player.Name, plugin.R ("\nMessages on"),5); } return false; Extra code for option 2: Create a new limit, call it "NoYell Notices" Set limit to evaluate OnSpawn, set action to None Set first_check to this Code: Code: String msg = "Turn On/Off the squad YELL spam, with @noyell in chat! Default is on!"; // Times int yellTime = 5; // seconds int secondNoticeSpawnCount = 5; /* CODE */ String key = "WelcomeNoYell_" + player.Name; int count = 0; if (player.Data.issetInt(key)) count = player.Data.getInt(key); count = count + 1; if (count == secondNoticeSpawnCount) { // Second notice plugin.SendPlayerMessage(player.Name, msg); plugin.SendPlayerYell(player.Name, msg, yellTime); } player.Data.setInt(key, count); return false;This will YELL "Turn On/Off the squad YELL spam, with @noyell in chat! Default is on!" to the player on the 5'th spawn. For updated code, visit: Yell to Squad Members on Request on Github Special Thanks to PapaCarlie9 & LCARSx64 for helping our with the code! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 14, 2014 Author Share Posted April 14, 2014 Originally Posted by Tomgun*: ill try this, cheers * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 14, 2014 Author Share Posted April 14, 2014 Originally Posted by TMiland*: ill try this, cheersEnjoy! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by TMiland*: Code updated! Added missing Code: default:Please update to latest. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by ty_ger07*: As Martha Stewart would say, it's a good thing. So good that it should be this way out of the box. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by LCARSx64*: Nice idea mate, hopefully this will encourage teamwork during matches. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by kaminari*: hi It does not work the following error out Do you own? Thank you Error [21:22:13 29] [MULTIbalancer]:0 Status: Team counts [64] = 32(US) vs 32(RU), with 0 unassigned, 0 commanders, 0 spectators [21:22:13 29] [MULTIbalancer]:0 Status: Team difference = 0 [21:22:16 81] [insane Limits] [sPREE] PracticeNow-lIIl with 6 kills! [21:22:16 81] [insane Limits] WARNING: not sending global-message, virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not yelling player-message to naruse147, virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not yelling player-message to mya-sann, virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not sending squad-message to TeamId(1,).SquadId(11), virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not sending procon event(Plugins:PluginsCompiled:Insane Limits) "kk-peace said Let's Go!", virtual_mode is on [21:22:17 05] [insane Limits] ADMIN ORDERS > kk-peace said Let's Go! [21:22:22 11] [insane Limits] [sPREE] RoughnecK893 with 6 kills! [21:22:22 11] [insane Limits] WARNING: not sending global-message, virtual_mode is on Thank you * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by TMiland*: Do you have the latest version of Insane Limits? Sent from my GT-I9100 using Tapatalk * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by LCARSx64*: hi It does not work the following error out Do you own? Thank you Error [21:22:13 29] [MULTIbalancer]:0 Status: Team counts [64] = 32(US) vs 32(RU), with 0 unassigned, 0 commanders, 0 spectators [21:22:13 29] [MULTIbalancer]:0 Status: Team difference = 0 [21:22:16 81] [insane Limits] [sPREE] PracticeNow-lIIl with 6 kills! [21:22:16 81] [insane Limits] WARNING: not sending global-message, virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not yelling player-message to naruse147, virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not yelling player-message to mya-sann, virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not sending squad-message to TeamId(1,).SquadId(11), virtual_mode is on [21:22:17 05] [insane Limits] WARNING: not sending procon event(Plugins:PluginsCompiled:Insane Limits) "kk-peace said Let's Go!", virtual_mode is on [21:22:17 05] [insane Limits] ADMIN ORDERS > kk-peace said Let's Go! [21:22:22 11] [insane Limits] [sPREE] RoughnecK893 with 6 kills! [21:22:22 11] [insane Limits] WARNING: not sending global-message, virtual_mode is on Thank you Maybe PapaCharlie9 can correct me if I'm wrong, but, I believe those messages are occuring due to you having virtual_mode in Insane Limits set to True, setting virtual_mode to False should fix that and actually produce the yell and squad messages. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by kaminari*: hi Yes I am using the latest version * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by LCARSx64*: @kaminari, actually I just noticed something, does the [sPREE] message get displayed in-game or not? If it does then you may want to check that you haven't set this limit's state to Virtual instead of Enabled. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by TMiland*: [21:22:17 05] [insane Limits] ADMIN ORDERS > kk-peace said Let's Go!As far as i can see, it is working. You have an error in the SPREE limit thingy you have there. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by PapaCharlie9*: @TMiland, post a screenshot of your correctly set-up limit. I think that will help @kaminari. It's clearly a problem of virtual mode being enabled, as @LCARSx64 correctly pointed out, but which one? The one at the top of the settings or the per-limit one? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by TMiland*: @TMiland, post a screenshot of your correctly set-up limit. I think that will help @kaminari. It's clearly a problem of virtual mode being enabled, as @LCARSx64 correctly pointed out, but which one? The one at the top of the settings or the per-limit one?Like this you mean? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 16, 2014 Author Share Posted April 16, 2014 Originally Posted by kaminari*: Thank you everyone. I have reinstalled Insane Lmits. virtual_mode had become all too soon to False. I was able to resolve somehow.. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 16, 2014 Author Share Posted April 16, 2014 Originally Posted by TMiland*: Thank you everyone. I have reinstalled Insane Lmits. virtual_mode had become all too soon to False. I was able to resolve somehow.. Glad you got it resolved! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 26, 2014 Author Share Posted April 26, 2014 Originally Posted by TMiland*: Updated post #1 with option to turn off the yell msgs with @noyell in chat. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 2, 2014 Author Share Posted May 2, 2014 Originally Posted by RoqueNE*: god, fantastic idea. i would LOVE to see that in BF3. but there is little to no chance, eh? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 2, 2014 Author Share Posted May 2, 2014 Originally Posted by LCARSx64*: god, fantastic idea. i would LOVE to see that in BF3. but there is little to no chance, eh? I think this will work as is with BF3. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 2, 2014 Author Share Posted May 2, 2014 Originally Posted by TMiland*: god, fantastic idea. i would LOVE to see that in BF3. but there is little to no chance, eh? Not sure if the orders work the same way. Only way to find out is to try for yourself. I don't run any BF3 Servers... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 2, 2014 Author Share Posted May 2, 2014 Originally Posted by PapaCharlie9*: It won't work on BF3, there are no commo rose chat message codes in BF3. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 18, 2014 Author Share Posted December 18, 2014 Originally Posted by TMiland*: Can you help me with the code so i can have random msg's in this limit PC9? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 18, 2014 Author Share Posted December 18, 2014 Originally Posted by LumPenPacK*: Can you help me with the code so i can have random msg's in this limit PC9? I'm not PC9 but you could try this one. Code: if (!player.LastChat.StartsWith("ID_CHAT_")) return false; string msg; List<string> MessageType1 = new List<string>(); List<string> MessageType2 = new List<string>(); List<string> MessageType3 = new List<string>(); Random rnd = new Random(); // Add all your messages which should be shown on "ID_CHAT_ATTACK/DEFEND" request MessageType1.Add(" Message1"); MessageType1.Add(" Message2"); // Add all your messages which should be shown on "ID_CHAT_THANKS" request MessageType2.Add(" Message1"); MessageType2.Add(" Message2"); // Add all your messages which should be shown on "ID_CHAT_SORRY" request MessageType3.Add(" Message1"); MessageType3.Add(" Message2"); /* All other messages should also be defined here */ switch (player.LastChat) { case "ID_CHAT_ATTACK/DEFEND": { msg = player.Name + MessageType1[rnd.Next(MessageType1.Count)]; // Take a random message from Message Type 1 } break; case "ID_CHAT_THANKS": { msg = player.Name + MessageType2[rnd.Next(MessageType2.Count)]; // Take a random message from Message Type 2 } break; case "ID_CHAT_SORRY": { msg = player.Name + MessageType3[rnd.Next(MessageType3.Count)]; // Take a random message from Message Type 3 } break; /* All other messages should also added here */ default: plugin.ConsoleWrite("Unknown commo rose chat code: " + player.LastChat); return false; } // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: { callersTeam.AddRange(team1.players); } break; case 2: { callersTeam.AddRange(team2.players); } break; case 3: { callersTeam.AddRange(team3.players); } break; case 4: { callersTeam.AddRange(team4.players); break; } } if (!player.Data.issetBool("NoYell")) { player.Data.setBool("NoYell", true); } // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } if (player.Data.getBool("NoYell")) { // Send msg to squad chat if @noyell is off plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); } // For writing to console plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + msg); // For writing to chat //plugin.PRoConChat("^b^1ADMIN ORDERS >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 19, 2014 Author Share Posted December 19, 2014 Originally Posted by TMiland*: I'm not PC9 but you could try this one. Code: if (!player.LastChat.StartsWith("ID_CHAT_")) return false; string msg; List<string> MessageType1 = new List<string>(); List<string> MessageType2 = new List<string>(); List<string> MessageType3 = new List<string>(); Random rnd = new Random(); // Add all your messages which should be shown on "ID_CHAT_ATTACK/DEFEND" request MessageType1.Add(" Message1"); MessageType1.Add(" Message2"); // Add all your messages which should be shown on "ID_CHAT_THANKS" request MessageType2.Add(" Message1"); MessageType2.Add(" Message2"); // Add all your messages which should be shown on "ID_CHAT_SORRY" request MessageType3.Add(" Message1"); MessageType3.Add(" Message2"); /* All other messages should also be defined here */ switch (player.LastChat) { case "ID_CHAT_ATTACK/DEFEND": { msg = player.Name + MessageType1[rnd.Next(MessageType1.Count)]; // Take a random message from Message Type 1 } break; case "ID_CHAT_THANKS": { msg = player.Name + MessageType2[rnd.Next(MessageType2.Count)]; // Take a random message from Message Type 2 } break; case "ID_CHAT_SORRY": { msg = player.Name + MessageType3[rnd.Next(MessageType3.Count)]; // Take a random message from Message Type 3 } break; /* All other messages should also added here */ default: plugin.ConsoleWrite("Unknown commo rose chat code: " + player.LastChat); return false; } // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: { callersTeam.AddRange(team1.players); } break; case 2: { callersTeam.AddRange(team2.players); } break; case 3: { callersTeam.AddRange(team3.players); } break; case 4: { callersTeam.AddRange(team4.players); break; } } if (!player.Data.issetBool("NoYell")) { player.Data.setBool("NoYell", true); } // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } if (player.Data.getBool("NoYell")) { // Send msg to squad chat if @noyell is off plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); } // For writing to console plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + msg); // For writing to chat //plugin.PRoConChat("^b^1ADMIN ORDERS >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false; Sweet! Another thing, it is possible to escape ' in the yell msg? Example "We're" turns into "We re" * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 19, 2014 Author Share Posted December 19, 2014 Originally Posted by LumPenPacK*: Have you tried this_Code: "We're" * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 19, 2014 Author Share Posted December 19, 2014 Originally Posted by TMiland*: Have you tried this_Code: "We're" That Works! Here's the version with random msg's: Code: if (!player.LastChat.StartsWith("ID_CHAT_")) return false; string msg; List<string> MessageType1 = new List<string>(); List<string> MessageType2 = new List<string>(); List<string> MessageType3 = new List<string>(); List<string> MessageType4 = new List<string>(); List<string> MessageType5 = new List<string>(); List<string> MessageType6 = new List<string>(); List<string> MessageType7 = new List<string>(); List<string> MessageType8 = new List<string>(); List<string> MessageType9 = new List<string>(); List<string> MessageType10 = new List<string>(); List<string> MessageType11 = new List<string>(); List<string> MessageType12 = new List<string>(); List<string> MessageType13 = new List<string>(); Random rnd = new Random(); // Add all your messages which should be shown on "ID_CHAT_ATTACK/DEFEND" request MessageType1.Add(" Gave you an ORDER Soldier! PTFO!"); MessageType1.Add(" PTFO To win the round Soldier!"); MessageType1.Add(" Has marked the OBJECTIVE! PTFO!"); MessageType1.Add(" Attack/Defend the marked OBJECTIVE Soldier"); // Add all your messages which should be shown on "ID_CHAT_THANKS" request MessageType2.Add(": Thank You!"); MessageType2.Add(": Thanks Man!"); MessageType2.Add(": Hey, Thanks A Lot!"); MessageType2.Add(": Thank You Soldier!"); MessageType2.Add(": Thanks Man, I Owe You One!"); MessageType2.Add(": Thanks Soldier!"); MessageType2.Add(": Alright, Thanks A lot Man!"); MessageType2.Add(": Thank You Man!"); MessageType2.Add(": That's Great, Thanks!"); MessageType2.Add(": Hey, Thanks A Lot!"); MessageType2.Add(": Thanks Dude!"); MessageType2.Add(": Sweet, Thanks Man!"); MessageType2.Add(": Thanks, I Appreciate It!"); MessageType2.Add(": Thanks A Lot!"); MessageType2.Add(": Alright, Thanks A lot!"); MessageType2.Add(": Thank You Bro!"); MessageType2.Add(": Hey, I Really Appreciate It!"); MessageType2.Add(": Damn, Thanks A Lot!"); MessageType2.Add(": Hey, I Owe You One!"); MessageType2.Add(": Thanks Man, Alright!"); // Add all your messages which should be shown on "ID_CHAT_SORRY" request MessageType3.Add(": My Bad!"); MessageType3.Add(": Oh Fuck, My Bad Man!"); MessageType3.Add(": Sorry Man, I Fucked Up!"); MessageType3.Add(": Uh, My Mistake!"); MessageType3.Add(": Oh Fuck, Sorry About That!"); MessageType3.Add(": I Didn't Mean To Fuck That One Up!"); MessageType3.Add(": Sorry Man, My Bad!"); MessageType3.Add(": Aw, Fuck Me, That Was My Fault!"); MessageType3.Add(": Fuck Man, I Am Sorry!"); MessageType3.Add(": Aw Shit, Sorry!"); MessageType3.Add(": Shit, That Was My Bad!"); MessageType3.Add(": That Was My Fault!"); MessageType3.Add(": Yeah I Fucked That One Up, Sorry Man!"); MessageType3.Add(": Sorry My Bad, I Fucked Up!"); MessageType3.Add(": My Bad!"); MessageType3.Add(": That Was My Fault, Sorry!"); MessageType3.Add(": Sorry, Man That Was My Fault!"); MessageType3.Add(": That Was My Fault Man, Sorry!"); MessageType3.Add(": Thats On Me, I Am Sorry Man!"); MessageType3.Add(": Aw Fuck, I Am Sorry Man!"); MessageType3.Add(": Hey, I Am Sorry!"); MessageType3.Add(": My Fault!"); MessageType3.Add(": Sorry Bro!"); MessageType3.Add(": Wow, Sorry Dude!"); MessageType3.Add(": Sorry Man, I Fucked Up!"); MessageType3.Add(": Hey! Sorry About That!"); MessageType3.Add(": Jeez, Sorry About That!"); MessageType3.Add(": Aw Fuck, Sorry, My Fault!"); MessageType3.Add(": Sorry Dude!"); MessageType3.Add(": Sorry About That, Won't Happen Again!"); MessageType3.Add(": Sorry!"); MessageType3.Add(": I am so Sorry!"); MessageType3.Add(": Sorry About That!"); MessageType3.Add(": Oh Crap!"); // Add all your messages which should be shown on "ID_CHAT_GOGOGO" request MessageType4.Add(": Hey Grab Your Shit, Let's Go!"); MessageType4.Add(": Playtime Is Over, Get Out!"); MessageType4.Add(": Grab Your Shit, We're Steppin!"); MessageType4.Add(": We're Steppin!"); MessageType4.Add(": GO!"); MessageType4.Add(": Go Now!"); MessageType4.Add(": Let's Go! GO!!"); MessageType4.Add(": Come On, Let's Go"); MessageType4.Add(": Let's Go!"); MessageType4.Add(": Let's Move! Move! Move!"); MessageType4.Add(": Come On, GO!!"); MessageType4.Add(": Go, NOW!!"); MessageType4.Add(": We are Steppin!"); MessageType4.Add(": Let's Move, GO!!"); MessageType4.Add(": Go, Let's Move Out!"); MessageType4.Add(": Mooooooove!!!"); MessageType4.Add(": Knees High, Step It UP, Go! Go!"); MessageType4.Add(": Move Your Asses, Let's Go!"); MessageType4.Add(": Alright, Let's Get Fucking Moving!"); MessageType4.Add(": Move Out, You Motherfukkas!"); MessageType4.Add(": It's Time To Haul Ass!"); MessageType4.Add(": Alright, We gotta Move Now!"); MessageType4.Add(": We Are Moving Out!"); MessageType4.Add(": Go! Go! Go!"); MessageType4.Add(": Let's get out of here!"); MessageType4.Add(": Let's get down to business!"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_ORDER" request MessageType5.Add(": What's the objective Squad Leader_"); MessageType5.Add(": Objective Squad Leader_"); MessageType5.Add(": What's the ORDERS_"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_MEDIC" request MessageType6.Add(" requested a MEDIC! Throw out a bag!"); MessageType6.Add(" Is DYING! Give him some MEDICINE"); MessageType6.Add(": I Need a MEDIC!"); MessageType6.Add(": Where Is The Got Damn MEDIC_"); MessageType6.Add(": Get Me A Medic Over Here!"); MessageType6.Add(": Get Me A Medic!!"); MessageType6.Add(": I Need A Fucking Medic NOW!"); MessageType6.Add(": Get Me A Fucking Medic!"); MessageType6.Add(": MEDIIIIIC!!"); MessageType6.Add(": Aw, Hell, I Need A Medic Over Here!"); MessageType6.Add(": I Am Dying Out Here, I Need A Medic!"); MessageType6.Add(": Oh Jesus, I Need A Medic!"); MessageType6.Add(": Oh God, I Need A Medic!"); MessageType6.Add(": I Need A Medic!"); MessageType6.Add(": Bleeding All Over The Place, MEEDIC!"); MessageType6.Add(": Give Me A Fucking Medic!"); MessageType6.Add(": I Need A Medic Here, NOW!"); MessageType6.Add(": I NEED A MEDIC!!"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_AMMO" request MessageType7.Add(" Anybody Got Any ROUNDS_"); MessageType7.Add(" I Need Some Bullets Over Here!"); MessageType7.Add(" AMMO!! AMMO!!"); MessageType7.Add(" Somebody Hook Me Up With Some AMMO!"); MessageType7.Add(" Hey, Give Me Some AMMO!"); MessageType7.Add(" Toss Me Over Some ROUNDS!"); MessageType7.Add(" Hook Me Up With Some ROUNDS!"); MessageType7.Add(" I Need Some AMMO!"); MessageType7.Add(" I Need Some AMMO Over Here!"); MessageType7.Add(" I Need Some AMMO Over Here, Someone Help Me Out!"); MessageType7.Add(" requested AMMO! Throw out a bag!"); MessageType7.Add(" Is out of AMMO! Give it to him!"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_RIDE" request MessageType8.Add(" requested a RIDE! Go pick him up!"); MessageType8.Add(" needs a RIDE, be a teammate and pick him up!"); MessageType8.Add(": I Need A Ride!"); MessageType8.Add(": Hey, Come Over Here And Pick Me Up!"); MessageType8.Add(": Hey, I Need A Ride Here!"); MessageType8.Add(": Hey, Someone Come Get Me!"); MessageType8.Add(": I Need A Ride!"); MessageType8.Add(": Someone Come Pick Me Up!"); MessageType8.Add(": I Really Need A Ride Over Here!"); MessageType8.Add(": Someone Come Get Me, I Need A Ride!"); MessageType8.Add(": Someone Come Get Me!"); MessageType8.Add(": Someone Send Me A Fucking Vehicle!"); MessageType8.Add(": Hey, Come And Get Me!"); MessageType8.Add(": Come Get My Ass Outta Here!"); MessageType8.Add(": I Need A Fucking Lift!"); MessageType8.Add(": Hey, I Need A Ride!"); MessageType8.Add(": Need A Pickup Over Here!"); MessageType8.Add(": I Need A Lift Here!"); MessageType8.Add(": Come Get My Ass!"); MessageType8.Add(": Come And Get Me, I Need To Get The Fuck Outta Here!"); MessageType8.Add(": Can i get a RIDE_"); // Add all your messages which should be shown on "ID_CHAT_GET_OUT" request MessageType9.Add(": Hop Out, Let's Move!"); MessageType9.Add(": Let's Move People!"); MessageType9.Add(": Let's Move Out Guys, Go! Go!"); MessageType9.Add(": Alright, Let's Bail!"); MessageType9.Add(": Alright, Let's Move On Out!"); MessageType9.Add(": Alright, Out Of The Vehicle!"); MessageType9.Add(": Alright Boys, Let's Move!"); MessageType9.Add(": Get Out Of The Vehicle Now!"); MessageType9.Add(": Alright, Let's Get Outta Here!"); MessageType9.Add(": We are Steppin, Move! Move!"); MessageType9.Add(": Move! Move! Move!"); MessageType9.Add(": Bail Out, Let's Move!"); MessageType9.Add(": Get Out, We are Moving!"); MessageType9.Add(" requested a SPOT! Get out of the vehicle!"); MessageType9.Add(" Is probably playing with a teammate, GTFO!"); // Add all your messages which should be shown on "ID_CHAT_GET_IN" request MessageType10.Add(": Hey, Hop In!"); MessageType10.Add(": Come On, Get In!"); MessageType10.Add(": Get In, Let's Go!"); MessageType10.Add(": Steppin out, Come On, Let's Go!"); MessageType10.Add(": Alright, We Are Moving Out, Get In!"); MessageType10.Add(": Get In, Let's Move Out!"); MessageType10.Add(": Get You Ass In, Let's Roll!"); MessageType10.Add(": Get In Here Soldier, We Gotta Go!"); MessageType10.Add(": Come On, Let's Go!"); MessageType10.Add(": We Aint Got Time To Fuck Around, Let's Go!"); MessageType10.Add(": Come On We Gotta Move!"); MessageType10.Add(": Get Your Ass In Here, We Gotta Go!"); MessageType10.Add(": Get In, We Gotta Go!"); MessageType10.Add(": Alright, Get The Fuck In Here, We Gotta Move!"); MessageType10.Add(": Alright, Hop In, Let's Get Outta Here!"); MessageType10.Add(": Hey Man, Get In, Let's Go!"); MessageType10.Add(" has a free SPOT! Get in the vehicle!"); MessageType10.Add(" said: Do you need a lift_"); // Add all your messages which should be shown on "ID_CHAT_REQUEST_REPAIRS" request MessageType11.Add(" This Shit Aint Running No More, I Need To Get It Fixed!"); MessageType11.Add(" I Need A Mechanic!"); MessageType11.Add(" Someone Get Over Here And Get This Shit Running!"); MessageType11.Add(" I Need Somebody To Fix My Vehicle!"); MessageType11.Add(" My Vehicle Is Fucked, I Need Some Help!"); MessageType11.Add(" Come On, I Need A Mechanic Over Here!"); MessageType11.Add(" Oh Fuck, My Ride Is Out, I Need Somebody To Fix It!"); MessageType11.Add(" Oh, I Fucked Up My Ride, I Need Some Repairs!"); MessageType11.Add(" This Ride Needs Repairs!"); MessageType11.Add(" This Peace Of Shit Cant Move, I Need A Got Damn Mechanic!"); MessageType11.Add(" Hey, Come Fix Up My Ride!"); MessageType11.Add(" In Desperate Need Of A Mechanic Over Here!"); MessageType11.Add(" My Vehicle Is Fucked Up, Can Anybody Help Me_"); MessageType11.Add(" I Need Mechanical Assistance!"); MessageType11.Add(" Fuck, I Need A Mechanic here!"); MessageType11.Add(" I Need Some Help To Fix This Shit!"); MessageType11.Add(" I Need A GreaseMonkey To Take A Look At This Shit!"); MessageType11.Add(" requested REPAIRS! Now! Go! Go! Go!"); MessageType11.Add(" Has a damaged vehicle, go REPAIR your teammate!"); // Add all your messages which should be shown on "ID_CHAT_AFFIRMATIVE" request MessageType12.Add(": Affirmative!"); MessageType12.Add(": Copy That!"); MessageType12.Add(": Okay Chief!"); MessageType12.Add(": Roger That!"); MessageType12.Add(": Sure Thing!"); MessageType12.Add(": No Problem!"); MessageType12.Add(": Yeah, You betcha!"); MessageType12.Add(": Yes!"); MessageType12.Add(": Consider It Done!"); MessageType12.Add(": Yeah, No Sweat!"); MessageType12.Add(": Alright, No Problem!"); MessageType12.Add(": Ill Get Right On That!"); MessageType12.Add(": Thats Affirmative!"); // Add all your messages which should be shown on "ID_CHAT_NEGATIVE" request MessageType13.Add(" NO! I cannot do that!"); MessageType13.Add(" Maybe later!"); MessageType13.Add(" I'll Get Back To It!"); MessageType13.Add(" No can do!"); MessageType13.Add(" Thats a NEGATIVE!"); MessageType13.Add(" NO!"); MessageType13.Add(" Uh, thats not possible at this time!"); MessageType13.Add(" No way man!"); MessageType13.Add(" I am all tied up, i cannot do that right now!"); MessageType13.Add(" Sorry, No!"); MessageType13.Add(" No, Sorry!"); MessageType13.Add(" Negative! Cannot do that right now!"); MessageType13.Add(" Yeah, i dont think so!"); /* All other messages should also be defined here */ switch (player.LastChat) { case "ID_CHAT_ATTACK/DEFEND": { msg = player.Name + MessageType1[rnd.Next(MessageType1.Count)]; // Take a random message from Message Type 1 } break; case "ID_CHAT_THANKS": { msg = player.Name + MessageType2[rnd.Next(MessageType2.Count)]; // Take a random message from Message Type 2 } break; case "ID_CHAT_SORRY": { msg = player.Name + MessageType3[rnd.Next(MessageType3.Count)]; // Take a random message from Message Type 3 } break; case "ID_CHAT_GOGOGO": { msg = player.Name + MessageType4[rnd.Next(MessageType4.Count)]; // Take a random message from Message Type 4 } break; case "ID_CHAT_REQUEST_ORDER": { msg = player.Name + MessageType5[rnd.Next(MessageType5.Count)]; // Take a random message from Message Type 5 } break; case "ID_CHAT_REQUEST_MEDIC": { msg = player.Name + MessageType6[rnd.Next(MessageType6.Count)]; // Take a random message from Message Type 6 } break; case "ID_CHAT_REQUEST_AMMO": { msg = player.Name + MessageType7[rnd.Next(MessageType7.Count)]; // Take a random message from Message Type 7 } break; case "ID_CHAT_REQUEST_RIDE": { msg = player.Name + MessageType8[rnd.Next(MessageType8.Count)]; // Take a random message from Message Type 8 } break; case "ID_CHAT_GET_OUT": { msg = player.Name + MessageType9[rnd.Next(MessageType9.Count)]; // Take a random message from Message Type 9 } break; case "ID_CHAT_GET_IN": { msg = player.Name + MessageType10[rnd.Next(MessageType10.Count)]; // Take a random message from Message Type 10 } break; case "ID_CHAT_REQUEST_REPAIRS": { msg = player.Name + MessageType11[rnd.Next(MessageType11.Count)]; // Take a random message from Message Type 11 } break; case "ID_CHAT_AFFIRMATIVE": { msg = player.Name + MessageType12[rnd.Next(MessageType12.Count)]; // Take a random message from Message Type 12 } break; case "ID_CHAT_NEGATIVE": { msg = player.Name + MessageType13[rnd.Next(MessageType13.Count)]; // Take a random message from Message Type 13 } break; default: plugin.ConsoleWrite("Unknown commo rose chat code: " + player.LastChat); return false; } // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: { callersTeam.AddRange(team1.players); } break; case 2: { callersTeam.AddRange(team2.players); } break; case 3: { callersTeam.AddRange(team3.players); } break; case 4: { callersTeam.AddRange(team4.players); break; } } if (!player.Data.issetBool("NoYell")) { player.Data.setBool("NoYell", true); } // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } if (player.Data.getBool("NoYell")) { // Send msg to squad chat if @noyell is off plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); } // For writing to console plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + msg); // For writing to chat //plugin.PRoConChat("^b^1ADMIN ORDERS >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 1, 2015 Author Share Posted January 1, 2015 Originally Posted by TMiland*: How can i get the squad leader name in a request? For example: Code: MessageType5.Add(": What's the objective " + squad.leader + "_"); * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 2, 2015 Author Share Posted January 2, 2015 Originally Posted by LCARSx64*: How can i get the squad leader name in a request? For example: Code: MessageType5.Add(": What's the objective " + squad.leader + "_"); You can retrieve a squad leader's name with:Code: plugin.GetSquadLeaderName (int teamId, int squadId);null will be returned if the method cannot retrieve the name. Sent from Samsung Galaxy S5 using Tapatalk * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 2, 2015 Author Share Posted January 2, 2015 Originally Posted by TMiland*: You can retrieve a squad leader's name with: Code: plugin.GetSquadLeaderName (int teamId, int squadId);null will be returned if the method cannot retrieve the name. Sent from Samsung Galaxy S5 using Tapatalk Thanks, but i have no idea how to use it... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 2, 2015 Author Share Posted January 2, 2015 Originally Posted by LCARSx64*: Thanks, but i have no idea how to use it... Since you can't be 100% sure that the method will not return null, you need to test and offer an alternative message if it is null. E.g.:Code: String slName = plugin.GetSquadLeaderName(player.TeamId, player.SquadId); if (slName != null) { MessageType5.Add(": What's the objective " + slName + "_"); } else { MessageType5.Add(": What's the objective_"); } * 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.