Monthly Target: $400 Donations: $126
 31% 

[CS:S+GO] RAWR : Red's Awp Wide Restriction (2.2=handling warmup)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Plugin ID:
2547
Plugin Version:
2.2.0
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    22 
    Plugin Description:
    Allows team, individual and minimum players awp restrictions.
    Old 09-07-2011 , 21:39   [CS:S+GO] RAWR : Red's Awp Wide Restriction (2.2=handling warmup)
    Reply With Quote #1

    RAWR : Red's AWP Wide Restriction

    v. 2.2.0

    Introduction/Features :

    You think about putting AWPs on your server but you aren't fully sure ? Players complain that AWP is too strong when a certain person have it ? Then this plugin is for you.

    This plugin is based on an AWP restriction plugin from EventScript (here for the ES-plugin link). In ES it was released only in French and seemed rather popular for French-only servers so I decided to remake it for sourcemod.

    This plugin allows three kind of restrictions (as the ES version) :
    • Minimum players limit - Prevents people to use AWP if there is not enough players.
    • Team limit (the classic) - Only allows a certain number of AWPs to be used at a time in both teams.
    • Player/Individual limit - Prevents a player from always AWPing (i.e. AWP only 3 rounds in a row; then he needs to drop it during 3 rounds). Great to prevent good people from ruining other players gaming experience. There were no SM plugin doing this AFAIK (and this was the whole reason of this plugin).
    • As of 1.3.0, "Minimum players limit" (can) apply for the whole round, depending on if there was enough players at round start. I don't think there was a plugin doing such a thing before.
    • As of 2.0.0, you can share the restrictions rules between different weapons (i.e. restrict both AWP and g3sg1, but player can't use g3sg1 if he AWPed too much).

    Known bugs :
    • None at the moment.

    CVars :
    • redsawpwiderestrictionversion: Gives version -_-'
    • ----------
    • rawr : Is the plugin enabled ? 0=No, 1=Yes. Def. 1.
    • ----------
    • rawr_action_inbuyzone : What action to do with an restricted AWP in a buyzone (+ enough buytime) ? 0=strip, 1=drop, 2=refund. Def. 2.
    • rawr_action_outbuyzone : What action to do with an restricted AWP out of a buyzone (or not enough buytime) ? 0=strip, 1=drop. Def. 1.
    • rawr_action_respect16k : When refunding an AWP, respect 16k cash limit ? 0=No, 1=Yes. Def. 1.
    • ----------
    • rawr_minplayers : Minimum players in game required to buy AWPs. Def. 5.
    • rawr_minplayers_bothteams : Does both teams need to have the minimum players count to enable AWPs or should total player count be considered (i.e. 7v3 versus 5v5). 0=Total players, 1=Both teams. Def. 1.
    • rawr_minplayers_roundstart : When counting players (minplayers), do it at round start ? (If not it will be on buy/pickup) 0=No, 1=Yes. Def. 1.
    • ----------
    • rawr_teamlimit : Number of AWP allowed per team when rawr_minplayers is reached. Note that you may want to put rawr_teamlimit_additional to 0 for a fixed limit. 0=No maximum. Def. 1.
    • rawr_teamlimit_continuity : Who should get AWP if more there is more AWP than teamlimit CVar's value at round start (i.e. enemy AWPer changes team so a situation like 2awpVS0awp happen). 0=Least intensive AWPer, 1=Most intensive AWPer, 2=Most intensive AWPer (seconds based). Def. 2 (continuity prevail; recommended since someone AWPing will still be restricted).
    • rawr_teamlimit_additional : How many players are needed per additional AWP after the minimum amount of players has been reached. 0=Fixed limit. Default 10. New since 1.1.0.
    • ----------
    • rawr_playerlimit : How long (in round) can someone use an AWP. 0=disable 1+= number of rounds.
    • rawr_playerlimit_wait : How long (in round) before someone can someone re-use an AWP after having reached the limit of rounds. Min 1. Max 255. Def. 3.
    • rawr_playerlimit_recover : Does someone who doesn't touch an AWP during one round has his awp-use count reduced by 1 (doesn't count in 'wait' mode) ? 0=No, 1=Yes. Def. 0.
    • rawr_playerlimit_connect : How long (in round) should someone that joins for the first time on a map wait before being able to use a AWP ? Def. 0.
    • rawr_playerlimit_disconnect_use : Should a player awp-usage count be saved when he disconnect (to avoid reconnecting to bypass recovery/wait time; map change is excluded; elapse according to _recover) ? 0=No, 1=Yes. Def. 1. New since 2.1.0
    • rawr_playerlimit_disconnect_wait : Should a player wait time be saved when he disconnect (to avoid reconnecting to bypass wait time; map change is excluded) ? 0=No, 1=Yes (elapse, can wait disconnected), 2=Yes (doesn't elapse, the player must wait in-game). Def. 1. New since 2.1.0
    • ----------
    • rawr_verbose_prefix : Prefix attached to verboses' phrases. Default is '[SM]'.
    • rawr_verbose_reason : Tell the players why they're dropping an AWP. 0=No, 1=Yes. Def. 1.
    • rawr_verbose_onuse : Tell the players their AWP informations when they get one. 0=No, 1=Yes. Def. 1.
    • rawr_verbose_waitover : Tell the players when they can AWP due to recovery/waiting). 0=No, 1=Yes. Def. 1.
    • rawr_verbose_roundstart : Tell all the players when AWP change status (to disabled/enabled) at round start. 0=No, 1=Yes. Def. 1.
    • ----------
    • rawr_sound_buy : Sound to play when buying an AWP is denied (leave blank to disable; relative to 'sound/' folder). Default sound is in CSS, so no need to download it (you'll need to find an alternative for CSGO; apparently it should still work.
    • ----------
    • rawr_disable_prefixes : Disable the plugin with the following map prefixes. Use space (' ') as separator. Default is "awp_ fun_ aim_".
    • rawr_disable_warmup : Disable restrictions during warmup ? 0=No, 1=Yes. Def. 1. CSGO-only. New since 2.2.0
    • ----------New since 2.0.0----------
    • rawr_verbose_generic : Generic word used in the phrases; so you can put 'Snipe' and also restrict auto. Default 'AWP'.
    • rawr_restrict_weapons : Weapons to restrict. Separate with space (' '). Restriction is SHARED between weapons (no alternance possible). For example, "awp g3sg1 sg550 scar20" would restrict AWP and autos under both CSS and CSGO. Default "awp".
    • Note that the fact that the restriction shared, means that if someone i.e. AWP too much, he won't be able to use any of the restricted weapons.

    --------------

    Any suggestions/comments on the code or the plugin are welcomed and appreciated.

    Changelog :
    • 1.0.0 Initial release. (07-09-2011)
    • Added missing "wpndrop-cstrike.games.txt" gamedata file. (08-11-2011)
    • 1.0.1 Removed dependency for wpndrop-cstrike.games.txt gamedata file. This is possible due to SM 1.4.0 built-in CSWeaponDrop gamedata under CS_DropWeapon function. This lighten the .sp and .smx a tiny bit. (23-02-2012)
    • 1.0.2 Added FCVAR_DONTRECORD flag. This means the config file the plugin creates won't contain the version number anymore. (24-02-2012)
    • 1.0.3 Fixed bug when buying an AWP and the user can't wear it; where you would get 11250 money. Thanks to "Ares Veteran" for reporting the bug (and giving a good way to reproduce the bug). (26-02-2012)
    • Added hungarian translation. Thanks to "Ares Veteran". (11-03-2012)
    • 1.0.4 (06-05-2012)
      • Corrected a bug where a player would see "You can now use AWPs" when another player would have quit so there wouldn't be enough players to awp.
      • Reworked the phrase to say that "The wait to use AWPs is over.", rather than the previous one (in the previous point) which would be dumb in scenario where not enough players would be present, making players not really able to awp. Therefore it is recommended that you redownload phrases.
      • Might have optimized something too (how expensive is operator[] in Pawn ?).
    • 1.1.0 (08-05-2012)
      • Added ConVar "rawr_teamlimit_additional". Default value is 10. This means that for every 10 players after the minimum amount of players is reached, an additional AWP will be unlocked (20, 30; not showing 10 since it's the minimum amount of players defined by "rawr_minplayers" and "rawr_minplayers_bothteams").
      • The amount of players needed for the next AWP is displayed when being denied buying a AWP. This means translations must be redownloaded. I also reworked them a little.
    • 1.1.0b Fixed version number (1.1.0 had 1.0.4 as version number; thanks to angel635 for reporting). (10-05-2012)
    • 1.1.1 Fixed bug with "rawr_minplayers_bothteams 1", where a player could buy an AWP if a team had enough player but not the other (&& --> || ). (15-05-2012)
    • 1.2.0 Plugin now prevent buying AWP when possible, rather than selling it back/dropping it. This makes people not lose their previous guns when buying an AWP. Also no more need for another plugin to do that -_-' (as I saw). (08-06-2012)
    • 1.3.0 is out (14-07-2012)
      • Remade default config so if not enough players are present on round start, then the "rawr_minplayers" restriction apply for the whole round. This prevent someone waiting in spawn to buy AWP, late joiner getting AWP while the fast-loader couldn't and people running back to spawn to buy an AWP because someone joined. New ConVar : "rawr_minplayers_roundstart".
      • When there is enough or not enough player, players will get notified (at the beginning of the round) on the AWP status (disabled --> enabled and vice-versa; but only on change, not every round). New ConVar : "rawr_verbose_roundstart".
      • Now default verbose tag has a space; and I removed the one in the verboses by default (all verboses could get bad indentation in chat if there was no plugin tag).
    • 1.4.0 Added option to play a sound when an awp's purchase is denied. (12-08-2012)
    • Reported to work in CS:GO. Thanks to karil. (24-08-2012)
    • 1.4.1 is out (28-10-2012)
      • Fixed some stuff for approval (based on Peace-Maker review; thought I believe I don't have to change his 3 last bullet points) :
        • Removed flag FCVAR_REPLICATED in version CVar.
        • Removed flag FCVAR_NOTIFY in non-version CVar.
        • Less duplicated code.
    • Approved by Peace-Maker. (28-10-2012)
    • 1.5.0 Added support for map prefixes. See ConVar rawr_disable_prefixes. (29-11-2012)
    • 2.0.0 (21-12-2012)
      • Added shared restriction. You can now restrict the same way multiple guns, and they will all be affected by the same waiting time and number of uses. See ConVar rawr_restrict_weapons
      • Since you can share restriction between multiple guns, the phrases were modified so you can use a generic word to designate all restricted guns. See ConVar rawr_verbose_generic
      • A good combination of those two ConVar would be "rawr_verbose_generic Snipe" with "rawr_restrict_weapons awp g3sg1 sg550 scar20". (scar20 is the CT auto of CSGO, and sg550 the CT auto of CSS)
      • Added german translation (thanks Miss.Xantis, and thanks/sorry micazoid).
    • 2.1.0 (17-05-2015)
      • Added disconnect support : see the console variables rawr_playerlimit_disconnect_use and rawr_playerlimit_disconnect_wait.
      • Changed default of rawr_playerlimit_connect to 0.
      • Added an upper bound limit to the console variable rawr_playerlimit_wait (255).
      • Fixed a possible message error that would happen when trying to strip an AWP that was corrupted (strange... ; reported by TUSK3N1337; couldn't reproduce though).
    • 2.2.0 Added the possibility to disable restriction during warmup. See ConVar rawr_disable_warmup. (02-07-2015)

    How to install :
    • Place "redsawpwiderestriction.phrases.txt" in "translation" folder.
    • Place the plugin (redsawpwiderestriction.smx) in the plugin folder.
    • Place "wpndrop-cstrike.games.txt" in "gamedata" folder. (had forgotten that until 08-11-2011 :$) Not needed anymore since 1.0.1 update.
    • As with many other plugins, a config file is automatically created in MOD\cfg\sourcemod\redsawpwiderestriction.cfg

    Todo list :
    Credits :
    • People from ES community for the idea (Sylv@in, patneze, DoCky and EmBouT).
    • TnTSCS : for bringing me the (07-11-2011)'s signature for drop-weapon function and making me realise I didn't upload any for this plugin. (for 1.0.0)
    • Ares Veteran : for bug reporting when you had over 11250 $ and buying an AWP would put you to 11250 $ if you couldn't use it (Fixed in 1.0.3). Also made hungarian translation.
    • Miss.Xantis : for german translation. Also if I wasn't a total retard I would have added it with micazoid version like 4 months ago (sorry micazoid :$).

    Notes :
    • This plugin creates a config files in cfg/sourcemod automaticly.
    • If someone awps, disconnect and rejoin then re-awp in the same round; it will be counted as twice. This is a wanted behaviour.
    • 2.1.0 = 67 downloads
    • 2.0.0 = 536 .sp downloads, 715 .smx downloads (compiler didn't handle SDKHooks, hence 2 different numbers); 1.5.0old = 610 (old package)
    • ~pre 2.0 = 1357 .sp/.smx downloads, 829 translations downloads.
    Attached Files
    File Type: txt redsawpwiderestriction.phrases.txt (3.7 KB, 982 views)
    File Type: sp Get Plugin or Get Source (redsawpwiderestriction.sp - 477 views - 39.1 KB)
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 07-02-2015 at 12:10. Reason: 2.2.0 is out
    RedSword is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 09-08-2011 , 02:58   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #2

    great effort as usual Red.
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 09-08-2011 , 03:00   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #3

    Quote:
    Originally Posted by sinblaster View Post
    great effort as usual Red.
    =)

    Thanks.

    Btw with more people recognizing a coder's work like you, making plugins would be more rewarding for coders.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 09-08-2011 at 03:06.
    RedSword is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 09-08-2011 , 09:58   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #4

    Quote:
    Originally Posted by LordMarqus View Post
    sinblaster for president!
    Quite seriously "Credit where credit is due" I agree with you entirely and wonder often why some users don't spend more time praising the work than they do posting stupid smiley faces with tears because they want something. And quite frankly I have to agree with LordMarqus I should be president of the Coders Glee club
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    lcsgbilly
    Junior Member
    Join Date: Apr 2010
    Old 09-24-2011 , 07:05   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #5

    hi

    the awp restrein if we buy her the money ACCOUNTING

    is it normal?
    lcsgbilly is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 09-24-2011 , 13:56   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #6

    Quote:
    Originally Posted by lcsgbilly View Post
    hi

    the awp restrein if we buy her the money ACCOUNTING

    is it normal?
    ? Could you reformulate your question ?

    When buying or spawning with an AWP, the money is refunded if you can't bear it. If you can, then no refund is done.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    SanMan
    AlliedModders Donor
    Join Date: Feb 2007
    Location: Ohio
    Old 09-28-2011 , 20:43   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #7

    Nice job Red, I just dropped it in my server.. Thank you for this plugin!
    __________________
    SanMan is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 09-28-2011 , 20:50   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #8

    Quote:
    Originally Posted by SanMAn View Post
    Nice job Red, I just dropped it in my server.. Thank you for this plugin!
    Thanks !

    I'm glad to read that !
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    davidov
    Member
    Join Date: Oct 2011
    Old 10-25-2011 , 06:56   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #9

    This is EXACTLY what i was looking for

    Thanks
    davidov is offline
    davidov
    Member
    Join Date: Oct 2011
    Old 10-25-2011 , 12:59   Re: [CS:S] RAWR : Red's Awp Wide Restriction
    Reply With Quote #10

    Sorry, i get this error at loading: missing file from directory

    Code:
    L 10/25/2011 - 17:49:11: [SM] Error parsing gameconfig file "E:\Partage\HLServer\css\cstrike\addons\sourcemod\gamedata\wpndrop-cstrike.games.txt":
    L 10/25/2011 - 17:49:11: [SM] Error 1 on line 0, col 0: Stream failed to open
    L 10/25/2011 - 17:49:11: [SM] Native "LoadGameConfigFile" reported: Unable to open wpndrop-cstrike.games: File could not be opened: Le fichier sp┌cifi┌ est introuvable.
    
    L 10/25/2011 - 17:49:11: [SM] Displaying call stack trace for plugin "redsawpwiderestriction.smx":
    L 10/25/2011 - 17:49:11: [SM]   [0]  Line 163, /home/groups/alliedmodders/forums/files/1/0/2/1/6/92173.attach::OnPluginStart()
    EDIT:

    Well i copy-paste an existing file located in the same directory, i renamed it according to the missing one's filename and now it works!

    Last edited by davidov; 10-25-2011 at 17:45. Reason: Solving problem
    davidov is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 12:45.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode