Page 3 of 141 FirstFirst 123451353103 ... LastLast
Results 21 to 30 of 1405
  1. #21

    Bad Words Kicker (Regular Epxressions Optional)

    This limit works as a simple chat filtering system. After each player sends a chat message, it scans the text of the chat, and looks for bad words in it. If it finds that one of the words matches the words in the bad words list, it kicks the player. It also sends a global message to let players know who was kicked for profanity.

    Set limit to evaluate OnAnyChat, and action to None,

    Set first_check to this Code:

    Code:
    	
    	List<String> bad_words = new List<String>();
    	
    	bad_words.Add("word1");
    	bad_words.Add("word2");
    	bad_words.Add("word3");
    	bad_words.Add("word4");
    	
    	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)
    			{
                                plugin.ConsoleWarn(plugin.R("Kicked %p_n% for saying "+bad_word));
                                plugin.SendGlobalMessage(plugin.R("Kicking %p_n% for profanity!"));
    			    plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked for saying "+bad_word+"!"));
    			}	
    			
    	return false;
    You may add as many words as you want to the bad-words list, or even use Regular Expressions to match multiple spellings of the same word.
    Last edited by micovery; 29-12-2011 at 09:27.

  2. #22

    Disable Vehicles Based on Player Count

    This limit will check the number of players in the server at specific intervals of time, and depending on how many players are there in the server, it will enable/disable vehicle spawn by changing the value of "vars.vehicleSpawnAllowed". This change is in effect immediately, no need to wait for next round. However, this only applies to attack vehicles. Transport vehicles will still spawn.


    Set limit to evaluate OnInterval, and set action to None

    Set first_check to use this Code snippet:

    Code:
    if (server.PlayerCount < 8 )
        plugin.ServerCommand("vars.vehicleSpawnAllowed", "false");
    else
        plugin.ServerCommand("vars.vehicleSpawnAllowed", "true");
    In this case, if number of players in the server falls below 8, vehicles are disabled. As soon as it goes to or over 8, vehicles are re-enabled. You may change this value as you see fit.

    Also note that when you turn off vehicle spawn, your server may not be listed in Battlelog as Hard-core. Additionally, disabling vehicles can reportedly interfere with Battlelog's Quick Match option.
    Last edited by micovery; 31-12-2011 at 15:51.

  3. #23
    Member
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    77
    Is it possible to disable Vehicles on specific maps only (seine crossing, teheran highway)?

  4. #24
    Quote Originally Posted by cpt View Post
    Is it possible to disable Vehicles on specific maps only (seine crossing, teheran highway)?
    There is a special plug-in for this.
    http://www.phogue.net/forumvb/showth...21-2011%29-BF3

    Or just do that what Micovery say down here. :')
    Last edited by Inception; 29-12-2011 at 23:32.

  5. #25

    Disable Vehicles Based On Current Map

    Quote Originally Posted by cpt View Post
    Is it possible to disable Vehicles on specific maps only (seine crossing, teheran highway)?
    Yes you can. In that case, instead of checking for player count, you just check for what is the current map.

    Set limit to evaluate OnInterval, and set action to None

    Set first_check to use this Code snippet:

    Code:
    List<String> map_names = new List<String>();
    
    map_names.Add("MP_003");
    map_names.Add("MP_011");
    
    if (map_names.Contains(server.MapFileName))
       plugin.ServerCommand("vars.vehicleSpawnAllowed", "false");
    else
      plugin.ServerCommand("vars.vehicleSpawnAllowed", "true");
    
    return false;
    For this example, vehicles will be disabled when map is "MP_003", or "MP_011", which are the files names for Tehran Highway, and Seine Crossing. For all other maps, the vehicles will be allowed.

    This is the full list of map files names for BF3, (including Back to Karkand expansion)

    • MP_001 - Grand Bazaar
    • MP_003 - Teheran Highway
    • MP_007 - Caspian Border
    • MP_011 - Seine Crossing
    • MP_012 - Operation Firestorm
    • MP_013 - Damavand Peak
    • MP_017 -Noshahr Canals
    • MP_018 - Kharg Island
    • MP_Subway - Operation Metro
    • XP1_001 - Strike At Karkand
    • Xp1_002 - Gulf of Oman
    • XP1_003 - Sharqi Peninsula
    • XP1_004 - Wake Island


    Note that since this only disables the vehicles after the map has loaded, the first set of vehicles might spawn. But, after that, they should not spawn anymore. I haven't tested it to verify, but I suspect that's what would happen.

    Finally, this is just a very crude way of doing Per-Map settings. Sure it will work, but if there is already a plugin that specializes on that area, and already does the job well, you should use that.
    Last edited by micovery; 30-12-2011 at 01:08.

  6. #26
    Admin: PLEASE STICKY THIS THREAD!

  7. #27
    Hi micovery,

    currently i'm using the Excessive Headshot kicker limit with the rule 60 > 5. And using the PBBan_say as an action. Is it possible to include the player name who got kicked/banned by the limiter via ALL? Currently PBBAN_say can just do a normal message kick with no player.name on it.

    second is the "Multi-Message Kill Spree:" code.

    double count = limit.Spree(player.Name);

    if (count == 4)
    plugin.SendGlobalMessage(plugin.R("%p_n% has a %r_x% kill spree!"));
    else if (count == 5)
    plugin.SendGlobalMessage(plugin.R("%p_n% has a %r_x% kill spree! He's on fire!"));
    else if (count == 6)
    plugin.SendGlobalMessage(plugin.R("%p_n% has a %r_x% kill spree! Getting ridiculous!"));
    else if ( count > 6)
    plugin.SendGlobalMessage(plugin.R("%p_n% has a %r_x% kill spree! He's unstoppable!"));

    return false;
    Is it possible to put a "KILLING SPREE ENDED BY Player CODE" into this lines? If so can you make me one? Please, i don't know nothing how to code that.

  8. #28
    Quote Originally Posted by sp37zn4z View Post
    Is it possible to put a "KILLING SPREE ENDED BY Player CODE" into this lines? If so can you make me one? Please, i don't know nothing how to code that.
    At the moment plugin does not support it, but I'll put it in wish-list for 0.0.0.4.

  9. #29
    New version on first post of Original Thread, 0.0.0.3. It has a few critical bug-fixes, and a few new features. Update, and post back if there are any problems. On a side note, I think I figured why some bans were not taking effect. Even though the plugin was banning the players, it was not sending the commands to save the list. So when ProCon reloaded the ban's list, it would clear the bans made by the plugin. I know, sucks ... should be fixed now.


    Change Log
    • 0.0.0.3 (beta, BF3)

      - Fixed debug_level framework to reduce the plugin's chattiness ( Thanks to PapaCharlie9)
      • 0 - Absolutely no chat, other than Enable/Disable, and Critical Errors
      • 1 - A bit more chatty, will tell you when limits get activated
      • 2 - Even more chatty , will tell you when players are queued for stats fetching
      • 3 - Overly chatty, will print the player's stats as they are fetched
      • >3 - Flow control, and extra debug messages

      - Fixed defect with EABan, where "banList.save" command was not being called
      - Fixed defect with PBBan, where "pb_sv_updbanfile", was not being called to update PBbans.dat
      - Added redundancy to PBBan, and EABan, (Kicking player after Banning)
      - Fixed defect where limit round activations were not being reset after player leaves server
      - Added Log action, (log to File, log to Plugin, or Both), Also added combination actions
      • Kick_Log
      • Kill_Log
      • PBBan_Log
      • EABan_Log
      • Kick_Say_Log
      • Kill_Say_Log
      • PBBan_Say_Log
      • EABan_Say_Log

      - Limit evaluation is now synchronized between threads, only 1 limit may be evaluated at a time
      - Added option to have per-limit "Virtual" mode (in state)
      - Added new methods to the limit object, to keep global count (all rounds) of activations
      • ActivationsTotal(int TeamId, int SquadId)
      • ActivationsTotal(int TeamId)
      • ActivationsTotal(String PlayerName)
      • ActivationsTotal()

      - Fixed examples that used Country Codes to use lower-case
      - Added new examples:
      • Simple Welcome Message
      • Country Based Welcome Message

      - Added new replacements for the new Limit activation counts
      • %s_xa% and %s_xa_th% for ActivationsTotal(int TeamId, int SquadId)
      • %t_xa% and %t_xa_th% for ActivationsTotal(int TeamId)
      • %p_xa% and %p_xa_th% for ActivationsTotal(String PlayerName)
      • %a_xa% and %a_xa_th% for ActivationsTotal()

      - Fixed replacement tag for Country Name, %p_cn% which was not working
      - Fixed Stack Overflow crash when using Say action with Squad audience
      - Fixed round Score tracker to start at 0 value when plugin is enabled
    Last edited by micovery; 30-12-2011 at 15:22.

  10. #30

    Simple Welcome Message

    This limit will send a message (global) for the player when he spawns in the server for the first time.

    Set limit to evaluate OnSpawn, and action to Say

    Set first_check to this Expression:

    Code:
        (true)
    Set second_check to this Expression:

    Code:
       ( limit.ActivationsTotal(player.Name) == 1 )
    Set these action specific parameters

    Code:
               say_audience = All
               say_message = Everyone, lets welcome %p_n%, from %p_cn%!

    If player leaves, and re-joins, welcome message should be displayed again.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •