Jump to content

Question

Hello guys i need help

i blocked explosive from locker + metro .  but i have problem , spam in chat 

can some one edit this warring privateMessage only for player , now its globalMessage 

CODE

if (Regex.Match(kill.Weapon, @"(_:SMK|FLASH|Shield)", RegexOptions.IgnoreCase).Success) return false;

// show warnings at procon chattab
// yes = true | no = false
bool bShowToProcon = true;

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

int warnings = 0;

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

if (plugin.RoundData.issetInt(kCounter)) warnings = plugin.RoundData.getInt(kCounter);

if (warnings >= 0 && warnings <= 4) {
    String globalMessage = killer.FullName + " WARNING for explosive kill on " + plugin.FriendlyMapName(server.MapFileName) + "!";
    plugin.SendGlobalMessage(globalMessage);
    if (bShowToProcon) plugin.PRoConChat("NoExplosives > Say > " + globalMessage);
    String privateMessage = "WARNING (" + (warnings+1) + "/6)! Explosives are not allowed on " + plugin.FriendlyMapName(server.MapFileName) + "! Read our rules!";
    plugin.SendPlayerYell(killer.Name, privateMessage, 10);
    if (bShowToProcon) plugin.PRoConChat("NoExplosives > Yell[10] > " + killer.Name + " > " + privateMessage);
    plugin.RoundData.setInt(kCounter, warnings+1);
    return false;
} else if (warnings == 5) {
    String globalMessage = killer.FullName + " WARNING for explosive kill on " + plugin.FriendlyMapName(server.MapFileName) + "!";
    plugin.SendGlobalMessage(globalMessage);
    if (bShowToProcon) plugin.PRoConChat("NoExplosives > Say > " + globalMessage);
    String privateMessage = "FINAL WARNING (" + (warnings+1) + "/6)! Explosives are not allowed on " + plugin.FriendlyMapName(server.MapFileName) + "! Read our rules!";
    plugin.SendPlayerYell(killer.Name, privateMessage, 10);
    if (bShowToProcon) plugin.PRoConChat("NoExplosives > Yell[10] > " + killer.Name + " > " + privateMessage);
    plugin.RoundData.setInt(kCounter, warnings+1);
} else if (warnings >= 6) {
    plugin.KickPlayerWithMessage(player.Name, plugin.R("Kicked for ignoring warnings and killing with explosives!"));
}
plugin.RoundData.setInt(kCounter, warnings+1);
return false;

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Our picks

    • Hi All,

      So I've been thinking about doing something like this for a while but I always talked myself out of it. I want to get some feedback on this idea and how many would think about using it if it was offered.

      In the past I know how hard it was for some users to get a MySQL database going and running the BFACP (since it's a bit requirement heavy in some cases). What I would be doing is offering to manage both of these for you.

      If enough interest was shown in something like this I would definitely think about doing it. Of course, I also know the risks I would be taking in something like this, but to list what I would be offering I guess is this.

      MySQL Hosting


      Daily backups of the database to a remote site & option to download it yourself.


      No limit on how big your database can be (within reason).




      BFACP Hosting (If running AdKats on your layers)


      This would run the newest version (v3.0)


      Will still be available to run on your own hardware


      Will have extra features that are not available for an open source setup (still need to think of good things )


      Able to use your own domain name with the proper DNS setup.




      Both Above



      Please let me know what you think of this idea and vote in the poll. Again not confirming anything like this will happen but if I get enough interest from the community for something like this then please let me know.

      Disclaimer: This will NOT be something affiliated with MyRCON but will be ran through it in terms of a payment processor.
      • 10 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.