Raised This Month: $32 Target: $400
 8% 

[CS:S] Random Madness


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Plugin ID:
2271
Plugin Version:
1.0.5
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A gametype that forces all players to use the same weapon, which is randomly selected each round.
    Old 03-11-2011 , 12:51   [CS:S] Random Madness
    Reply With Quote #1

    Information:
    Features:
    • Selects a random weapon every x rounds for players to use.
    • Functionality to spawn players with a knife, hegrenade, armor, and additional gear as well as the selected weapon for the current round.
    • Ability to strip objectives, buyzones, weapons on the map, and grenades on the map.
    • Ability to strip players upon their death to prevent others from using their weapons.
    • For hegrenade levels, ability to set the # of grenades players will receive (infinite to x amount).
    • Tourney Mode, which will force all 26 weapons to be used first, in a random order, before duplicate weapons can be played.

    Cvars:
    • sm_randommadness_enable: - Enables/Disables all features of this plugin.
    • sm_randommadness_disabled: - List of specific weapon names to disable from being randomly selected, comma limited. "awp, sg550, g3sg1".
    • sm_randommadness_rounds: - The number of rounds to spend on each weapon. Setting a value of 0 will result in the same weapon for the entire map.
    • sm_randommadness_spawn_knife: - If enabled, players will spawn with a knife if not on a knife level.
    • sm_randommadness_spawn_grenade: - If enabled, players will spawn with a grenade if not on a knife level.
    • sm_randommadness_spawn_t: - The additional gear players on the Terrorist team will spawn with, separate multiple items with ", ".
    • sm_randommadness_spawn_ct: - The additional gear players on the Counter-Terrorist team will spawn with, separate multiple items with ", ".
    • sm_randommadness_grenade_count: - The number of grenades players will get when on the grenade level. Set to 0 for infinite grenades.
    • sm_randommadness_tourney_mode: - If enabled, every weapon will be used once before being able to be used again..
    • sm_randommadness_round_advert: - If enabled, a message pertaining to the game tyep will be displayed each round.
    • sm_randommadness_spawn_armor: - The amount of armor players will spawn with. Values above 0 will also give players the helmet.
    • sm_randommadness_strip_death: - If enabled, a player's equipment will be stripped upon their death.
    • sm_randommadness_strip_buy: - If enabled, all buyzones will be stripped from the map at the start of the round.
    • sm_randommadness_strip_objectives: - If enabled, all objectives will be stripped from the map at the start of the round.
    • sm_randommadness_strip_weapons: - If enabled, all weapons will be stripped from the map at the start of the round.
    • sm_randommadness_strip_grenades: - If enabled, all grenades will be stripped from the map at the start of the round if sm_randommadness_strip_weapons is enabled.

    Installation:
    • Place sm_random_madness.smx in /sourcemod/plugins/
    • Note: This plugin will require using SDKHooks!

    Planned Features:
    • Admin abilities that range from setting the next weapon, setting the number of rounds per weapon, etc.
    • A combat based RTD system, to add some variety to the gameplay.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_random_madness.sp - 393 views - 17.6 KB)
    File Type: smx sm_random_madness.smx (11.2 KB, 398 views)
    __________________

    Last edited by thetwistedpanda; 03-21-2011 at 23:32.
    thetwistedpanda is offline
    bmxican0091
    Member
    Join Date: Jan 2010
    Location: Australia, Victoria.
    Old 03-11-2011 , 18:38   Re: [CS:S] Random Madness
    Reply With Quote #2

    That looks awesome I'll try give it a test tonight and see how it goes.
    __________________

    bmxican0091 is offline
    TRIDENTE
    Junior Member
    Join Date: Sep 2009
    Old 03-12-2011 , 02:28   Re: [CS:S] Random Madness
    Reply With Quote #3

    YES YES YES - THX.

    A NEW SINGLEWEAPON MOD.

    Planned Features:
    • Admin abilities that range from setting the next weapon, setting the number of rounds per weapon, etc.
    ####That would be important
    TRIDENTE is offline
    Allstar
    Junior Member
    Join Date: Feb 2009
    Old 03-21-2011 , 09:51   Re: [CS:S] Random Madness
    Reply With Quote #4

    Hey,

    I really like the idea of this plugin but I'm having a few issues with it. When altering some of the cfg settings, some of them don't seem to apply properly. For example if I have sm_randomemadness_tourney_mode "1" it seems to recycle weapons I've already used...in particular the knife which seems to happen every 5 rounds or so.

    Also I can't seem to get a single weapon to work properly. Let's assume for example I only want a deagle, I've tried using the sm_randommadness_disabled "glock, usp, p228, etc" but that doesn't seem to work. I have to admit in my n00bness I'm not entirely sure what the 'comma limited' bit implies on that line tho.

    One last thing is that I'd like our players to spawn with a flashbang grenade (or preferably two) every round but when I apply weapon_flashbang to the sm_randommadness_spawn_t / spawn_ct files after a while the server crashes. I mean it works great for a bit and gives the flashbangs at spawn fine but after a while the server just gives up. The only errors I can see in my logs are these:

    Code:
    L 03/21/2011 - 13:29:27: [SM] Native "RemoveFromArray" reported: Invalid index -1 (count: 26)
    L 03/21/2011 - 13:29:27: [SM] Displaying call stack trace for plugin "sm_random_madness.smx":
    L 03/21/2011 - 13:29:27: [SM]   [0]  Line 273, sm_random_madness.sp::Event_OnRoundEnd()
    Hope you might be able to help me.

    Thanks in advance.
    Allstar is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 03-21-2011 , 09:55   Re: [CS:S] Random Madness
    Reply With Quote #5

    Allstar: I'll take a look at the code and get back to you. However, for sm_randommadness_disabled, you cannot use weapon names; you have to use indexes. It seems I forgot to add an index printing command though, so it's not like you could have found the appropriate values anyways...
    __________________
    thetwistedpanda is offline
    Allstar
    Junior Member
    Join Date: Feb 2009
    Old 03-21-2011 , 10:02   Re: [CS:S] Random Madness
    Reply With Quote #6

    Thanks for the very speedy reply!

    Am looking forward to hearing back from you and getting this plugin running on our server.
    Allstar is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 03-21-2011 , 13:23   Re: [CS:S] Random Madness
    Reply With Quote #7

    Version 1.0.4 Released
    • Fixed several logic issues pertaining to Tourney Mode, particularlly with weapons being picked repeatedly.
    • Changed the operating method of the sm_randommadness_disabled cvar. This cvar will now accept weapon names, as opposed to internal weapon indexes. I.e. "awp, g3sg1, sg550" will prevent the awp and both auto snipers from appearing.
    • Fixed a logic issue pertaining to weapon counts that prevented a single weapon from ever appearing.

    Allstar: I've fixed the error you received, and I believe that to be the reason you had an issue with flashbangs. During my testing I could not reproduce any issue with flashbangs and smokegrenades being given on spawn. Should you still have issues, I'll have to use a different method to resolve it. Likely, giving those two items their own cvar similiar to hegrenades, since it uses a special method for detecting grenade counts.
    __________________
    thetwistedpanda is offline
    Allstar
    Junior Member
    Join Date: Feb 2009
    Old 03-21-2011 , 14:03   Re: [CS:S] Random Madness
    Reply With Quote #8

    Excellent work, really impressed by the turn around time!

    I'll have a go with this new version on my test server and get back to you with some feedback.

    Thanks again for the great support.

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

    Edit.

    After some testing I'm still getting the same problem with the server crashing when I give myself the flashbangs.

    L 03/21/2011 - 18:40:14: [SM] Native "RemoveFromArray" reported: Invalid index -1 (count: 0)
    L 03/21/2011 - 18:40:14: [SM] Displaying call stack trace for plugin "sm_random_madness.smx":
    L 03/21/2011 - 18:40:14: [SM] [0] Line 266, sm_random_madness.sp::Event_OnRoundEnd()

    When it was working all seemed to be well tho and I wasn't getting any repeating of weapons like in the previous version.

    Last edited by Allstar; 03-21-2011 at 14:53.
    Allstar is offline
    Allstar
    Junior Member
    Join Date: Feb 2009
    Old 03-21-2011 , 17:24   Re: [CS:S] Random Madness
    Reply With Quote #9

    I wouldn't usually double post but wasn't sure if you were subscribing to this topic panda and the edit might not have come up.

    I tested the plugin again on a packed 30 man server without the weapon_flashbang in the t_spawn/ct_spawn and everything was fine until the grenade level. Everything was ok at first and then about half way through the round the server crashed. I rebooted it and we tried it again (on a different map) and once more everything was fine until the grenade level where it promptly died again. I had it on infinite grenades with sm_randommadness_grenade_count 0 and don't know if that had an effect considering the amount of people on. I thought I'd let you know as maybe this unique way you're handling the grenades is causing some sort of issue.

    As an aside when it was working everybody on the server was absolutely loving the plugin, so if we can iron these bugs out you might be on to a winner!

    Let me know if you need any more details.
    Allstar is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 03-21-2011 , 17:51   Re: [CS:S] Random Madness
    Reply With Quote #10

    That's rather odd that it's crashing on hegrenade level, considering the code is fairly simple. After the grenade explodes, it checks to see if the player is still alive and that the player isn't at maximum grenades, and if so, gives another grenade. There's nothing there I'd expect a crash out of, and I use the same method in several other scripts without much of an issue. Do you have any other plugins running that might affect grenades? And can you try disabling the hegrenade level and seeing if you still experience a crash?

    The idea behind not using the hegrenade level is if you still crash, then I have an issue in the application of the code. If you do crash, then the problem may be else where. I ran this with ~20 bots on tourney mode for several hours and didn't have a crash issue, so it'll help at narrowing it down.
    __________________

    Last edited by thetwistedpanda; 03-21-2011 at 18:27.
    thetwistedpanda is offline
    Reply



    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 14:52.


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