AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Random Madness (https://forums.alliedmods.net/showthread.php?t=152570)

thetwistedpanda 03-11-2011 12:51

[CS:S] Random Madness
 
2 Attachment(s)
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.

bmxican0091 03-11-2011 18:38

Re: [CS:S] Random Madness
 
That looks awesome :D I'll try give it a test tonight and see how it goes.

TRIDENTE 03-12-2011 02:28

Re: [CS:S] Random Madness
 
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

Allstar 03-21-2011 09:51

Re: [CS:S] Random Madness
 
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. :)

thetwistedpanda 03-21-2011 09:55

Re: [CS:S] Random Madness
 
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...

Allstar 03-21-2011 10:02

Re: [CS:S] Random Madness
 
Thanks for the very speedy reply!

Am looking forward to hearing back from you and getting this plugin running on our server. :up:

thetwistedpanda 03-21-2011 13:23

Re: [CS:S] Random Madness
 
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.

Allstar 03-21-2011 14:03

Re: [CS:S] Random Madness
 
Excellent work, really impressed by the turn around time! :shock:

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. :D

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

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.

Allstar 03-21-2011 17:24

Re: [CS:S] Random Madness
 
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.

thetwistedpanda 03-21-2011 17:51

Re: [CS:S] Random Madness
 
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.

Allstar 03-21-2011 19:18

Re: [CS:S] Random Madness
 
I'll test it without the grenades and get back to you but I'm not running any other scripts that should mess with them; only the core files, sourcebans, kac, gameme and a few other simple bits and pieces.

Allstar 03-21-2011 21:18

Re: [CS:S] Random Madness
 
Well I'm pretty sure it's something to do with the grenades now.

I tested it with hegrenade disabled and there wasn't any crash in the 3 maps played. I then decided to test with only the hegrenade, so disabled all the other weapons and after a few rounds with 15 players and just the infinite grenades it crashed again. :(

thetwistedpanda 03-21-2011 21:27

Re: [CS:S] Random Madness
 
Hmm, that makes no sense :(. Let me setup a test server using nothing but hegrenades and see if I can reproduce the issue.

thetwistedpanda 03-21-2011 23:34

Re: [CS:S] Random Madness
 
~20 minutes of 30 bots spawning with hegrenades, m4a1s/ak47s, flashbangs/smokegrenades, with infinite respawns at a 0.0 delay with no crashes.
~2 hours of 30 bots spawning on tourney mode, 5 different weapons including hegrenade, and spawning with hegrenade, with no crashes.
---
I uploaded version 1.0.5, it changes a deletion method for entities. For some reason I was using a method that was generally frowned upon, despite using the other method in all other plugins. I did it for a specific reason but I wasn't able to reproduce any errors using the new method, so everything should be fine. But as you can see above, I was unable to reproduce any crashes, so I'm not sure what the issue is. Could you post your config so I can try to reproduce it 100%?

Allstar 03-22-2011 05:30

Re: [CS:S] Random Madness
 
That's a bit odd. :? I really hope I'm not doing anything stupid to make this crash but I can't see anything that should be interfering. :oops:

The one thing I will say about testing with bots tho is that they very rarely actually throw the hegrenades when they have them and they often just use the knife. It's a lot different when 15 or so people are constantly nade spamming.

Anyway here's my cfg for you when trying out just the hegrenade. I used the same setup but with "hegrenade" in the disable list without any crashes.

Code:

// This file was auto-generated by SourceMod (v1.3.7-dev)
// ConVars for plugin "sm_random_madness.smx"


// List of specific weapon indexes to disable, comma limited. "#, #"
// -
// Default: ""
sm_randommadness_disabled "glock, usp, p228, deagle, fiveseven, elite, mac10, tmp, mp5navy, ump45, p90, galil, famas, ak47, m4a1, scout, awp, g3sg1, sg550, sg552, m3, xm1014, aug, m249"

// Enables/Disables all features of this plugin.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_enable "1"

// The number of grenades players will get when on the grenade level. Set to 0 for infinite grenades.
// -
// Default: "0"
// Minimum: "0.000000"
sm_randommadness_grenade_count "0"

// If enabled, a message pertaining to the game type will be displayed each round.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_round_advert "1"

// The number of rounds to spend on each weapon. Setting a value of 0 will result in the same weapon for the entire map.
// -
// Default: "1"
// Minimum: "0.000000"
sm_randommadness_rounds "1"

// The amount of armor players will spawn with. Values above 0 will also give players the helmet.
// -
// Default: "0"
// Minimum: "0.000000"
sm_randommadness_spawn_armor "100"

// The additional gear players on the Counter-Terrorist team will spawn with, separate multiple items with ", ".
// -
// Default: "item_nvgs, item_defuser"
sm_randommadness_spawn_ct "item_nvgs, item_defuser"

// If enabled, players will spawn with a grenade if not on a knife level.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_spawn_grenade "0"

// If enabled, players will spawn with a knife if not on a knife level.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_spawn_knife "1"

// The additional gear players on the Terrorist team will spawn with, separate multiple items with ", ".
// -
// Default: "item_nvgs"
sm_randommadness_spawn_t "item_nvgs"

// If enabled, all buyzones will be stripped from the map at the start of the round.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_strip_buy "1"

// If enabled, a player's equipment will be stripped upon their death.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_strip_death "1"

// If enabled, all grenades will be stripped from the map at the start of the round if sm_randommadness_strip_weapons is enabled.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_strip_grenades "0"

// If enabled, all objectives will be stripped from the map at the start of the round.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_strip_objectives "0"

// If enabled, all weapons will be stripped from the map at the start of the round.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_strip_weapons "1"

// If enabled, every weapon will be used once before being able to be used again.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_randommadness_tourney_mode "1"

Just for completeness here are the results from my meta list:

Code:

Results:
Listing 5 plugins:
  [01] SourceMod (1.3.7-dev) by AlliedModders LLC
  [02] CS:S Tools (1.3.7-dev) by AlliedModders LLC
  [03] BinTools (1.3.7-dev) by AlliedModders LLC
  [04] SDK Tools (1.3.7-dev) by AlliedModders LLC
  [05] SDK Hooks (1.3.0) by Tsunami

and sm plugins list:

Code:

Results:
[SM] Listing 32 plugins:
  01 "Admin File Reader" (1.3.4) by AlliedModders LLC
  02 "Admin Help" (1.3.4) by AlliedModders LLC
  03 "Admin Menu" (1.3.4) by AlliedModders LLC
  04 "Anti-Flood" (1.3.4) by AlliedModders LLC
  05 "Basic Chat" (1.3.4) by AlliedModders LLC
  06 "Basic Comm Control" (1.3.4) by AlliedModders LLC
  07 "Basic Commands" (1.3.4) by AlliedModders LLC
  08 "Basic Info Triggers" (1.3.4) by AlliedModders LLC
  09 "Basic Votes" (1.3.4) by AlliedModders LLC
  10 "Bot Ping" (1.0.1) by Knagg0
  11 "Client Preferences" (1.3.4) by AlliedModders LLC
  12 "Fun Commands" (1.3.4) by AlliedModders LLC
  13 "Fun Commands X" (1.8) by Spazman0 and Arg!
  14 "Fun Votes" (1.3.4) by AlliedModders LLC
  15 "gameME Plugin" (3.7) by TTS Oetzel & Goerz GmbH
  16 "High Ping Kicker - Lite Edition" (1.0.0.1) by Liam
  17 "Kigen's Anti-Cheat" (1.2.1.6) by CodingDirect LLC
  18 "M3Motd - MOTD / Rules Display" (0.2.1) by M3Studios, Inc.
  19 "Nextmap" (1.3.4) by AlliedModders LLC
  20 "Player Commands" (1.3.4) by AlliedModders LLC
  21 "SourceMod Radio" (1.0.0.12) by dubbeh
  22 "RCON Lock" (0.6.6) by devicenull
  23 "Auto Skin" (1.1.0) by Twisted|Panda
  24 "SM Cash" (1.3) by brizad
  25 "Random Madness" (1.0.4) by Twisted|Panda
  26 "SM Super Commands" (0.60) by pRED*
  27 "Sound Commands" (1.3.4) by AlliedModders LLC
  28 "SourceBans" (1.4.8) by SourceBans Development Team
  29 "Spray Tracer" (5.8) by Nican132, CptMoore, Lebson506th
  30 "Stop HintText Sound" (1.0.0) by Tauphi, exvel
  31 "TeamSwitch" (1.3) by MistaGee
  32 "Very Basic High Ping Kicker" (1.4) by msleeper


thetwistedpanda 03-22-2011 11:56

Re: [CS:S] Random Madness
 
As for your comment about testing bots, I didn't spawn them with knives :3. They had over 200 grenade kills each by the time testing was done. As for your config, it's the same setup I was running unfortunately. As for your plugins, I don't see anything in particular that would interfere.

You don't need to run RCON Lock if you're running KAC though, it's a bit redundant. Not causing the crash, but no reason for both. Also, Stop HintText Sound can be reproduced by sv_hudhint_sound 0. You can also try upgrading to 1.0.5, but I don't think that'll help either. Otherwise, I see nothing that is obviously causing the crash. My test server is stock, however, minus a spawning plugin, so that may have something to do with it.

Allstar 03-22-2011 14:51

Re: [CS:S] Random Madness
 
Well thanks for the advice on the plugins, I'll impliment those later. :)

I really do want to get this plugin working (preferably with the nade level too as its fun while it works) so will try 1.0.5 and test it again on a vanilla server with just the core and sourcebans to see if I can track down any potential conflicts. I'll get back to you if I find anything out, although if you could add cvars for flashbangs and smokegrenades (just like the hegrenade) that might be useful.

Thanks again for all the work you've done on this plugin and on trying to help me out. It really is a good laugh to hear people all happy when its something like an awp and moan when its a five-seven lol. :up:

thetwistedpanda 03-22-2011 14:59

Re: [CS:S] Random Madness
 
Adding the cvars for flashbangs and smokegrenades will really only prevent players from being given those two grenades if they already have them. It won't affect the crash issue as far as I know, but I'll add it next time I edit the script.

bandit 03-27-2011 11:15

Re: [CS:S] Random Madness
 
Hey Panda,
Is it possible you could make it so players get different random weapons,
instead of the same.
I have another script (ES.. arghhh...that doesnt always work ) that gives 2.0 speed on certain weapons. It makes for interesting gameplay when one player gets more speed, and the enemy tries to kill them.
Or am I asking for another plugin all together


hmmmm... why did that word turn red???

thetwistedpanda 03-27-2011 12:29

Re: [CS:S] Random Madness
 
It would be possible to add a cvar for it I suppose.

bandit 03-27-2011 14:26

Re: [CS:S] Random Madness
 
great..
I stay tuned..

bandit 06-22-2011 08:42

Re: [CS:S] Random Madness
 
Guess not :cry:

thetwistedpanda 06-22-2011 23:13

Re: [CS:S] Random Madness
 
What was your request again?

away000 06-23-2011 00:23

Re: [CS:S] Random Madness
 
Will be cool if u add a time based for randomizing weapons (count 1 2 3 until reacher a CVAR controled number, to strip all weapons from all players, random a wepon and give to all again) and giving the ability to manage a infinite round or a great time round (like 9 or more minutes before say whos was the Round Winner, with most kills or K/D ratio CVAR controled)....


Sorry for my poor inglish =D

bandit 06-29-2011 22:00

Re: [CS:S] Random Madness
 
Is it possible you could make it so players get different random weapons,
instead of the same.
I have another script (ES.. arghhh...that doesnt always work ) that gives 2.0 speed on certain weapons. It makes for interesting gameplay when one player gets more speed, and the enemy tries to kill them.
Or am I asking for another plugin all together

alencore 08-26-2015 07:06

Re: [CS:S] Random Madness
 
Nice! works perfect!...oops not really during the grenade level.. I only get one nade even though I set greande count to 3.
Also on thirdperson view when I spectate the nades are like spinning all over the player/bots when they move and would stop pinned on their back when bot or player stop moving.

Bots also looses their animation when using only pistols at cs_office their standing stiff with hands spread out a little in their idle position I think. On de_dust they would do that as well but their animation will soon kicked in.

Seems remedy for that is always spawn with knife guess that fix the stiffy bug for the bots.


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

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