Raised This Month: $51 Target: $400
 12% 

[EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)


Post New Thread Reply   
 
Thread Tools Display Modes
spumer
Senior Member
Join Date: Aug 2011
Old 08-30-2013 , 09:23   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #31

The big secret
__________________
spumer is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-30-2013 , 09:58   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #32

This Extension is much better than the VPK which replaces scripts etc, and has broken several times already now.
__________________
Silvers is offline
Tabun
Junior Member
Join Date: Sep 2011
Old 11-17-2013 , 10:48   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #33

A simple enable/disable cvar would be very nice.
The main reason I wanted to switch to this instead of the VPK is because you can't simply disable the VPK from affecting the game. If configs can just enable and disable this whenever, that would make this an unbeatable extension.
Tabun is offline
alBert2000
Junior Member
Join Date: Feb 2013
Old 12-11-2013 , 17:45   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #34

I tried to include custom melee (e.g. pickaxe in "Fall in Death") from custom maps automatically like this:

Code:
...
char str[300];
strcpy (str, result->GetString("meleeweapons"));
strcat (str, ";");
strcat (str, g_MeleeList.GetString());
Game_KeyValues__SetString(result, "meleeweapons", str);
...
So the idea is to use the melee list from the map and add the list from the "l4d_melee_weapons" cvar.
Sure some melee names would be double in the whole string, but I think that would not matter much (maybe higher probability when directors selects melee?).
And with that approach I would have e.g. the pickaxe from "fall in death" campaign in the list.
I tried with map config plugin to add the pickaxe to the l4d_melee_weapons cvar list.
It works but only for the second map and in the next map after the last "fall in death" map the extension still would use the pickaxe.
Setting the old cvar l4d_melee_weapons (without pickaxe) in server.cfg is too late, because the extension is reading the l4d_melee_weapons cvar very early, before the server.cfg is read.

My implementation idea from above does not work and srcds is crashing shortly after startup.
It seems that result->GetString does not work.
Maybe something with heap memory like written in an earlier post.
But I thought reading should work (or not?)
Or how to get the signature for this GetString method then?
Should the maps melee list be available here with GetString or am I wrong?

Well I have installed all this sdks today for the first time (sourcemod sdk, metamod sdk, hl2sdk for l4d2).
I had visual studio express 2010 already and I'm able to compile the original zip contents from the first post here and get a working dll.

Actually I would need it for linux but I tried with windows first.
Hope to get it compiling for linux too when my code works for windows.

So does anybody have an idea how to implement that for windows and linux?

Update:

Found the problem.
With my code above the list got longer and longer because the method is called very often and it appended the g_MeleeList at each call.
When the list reached some length, it crashed.
__________________

Last edited by alBert2000; 12-15-2013 at 08:48. Reason: found the reason for crashing
alBert2000 is offline
Machine
Senior Member
Join Date: Apr 2010
Old 05-01-2014 , 17:22   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #35

As was requested by AtomicStryker and Sev I rebuilt this extension to include enabling the csweapons and female boomers by default.

Now you don't have to precache the guns and reload the map like you had to do with weapon_unlock. Also the game engine itself works out randomizing the gun spawns, same with the boomers too.

Unfortunately I only have a windows build included, but the source is there to build your own for linux.
Attached Files
File Type: 7z l4d2_meleespawncontrol.7z (53.4 KB, 734 views)

Last edited by Machine; 05-01-2014 at 17:23.
Machine is offline
Sev
Veteran Member
Join Date: May 2010
Old 05-01-2014 , 20:41   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #36

Refreshing update.

Unfortunately.

1. I use linux
2. I have no idea how to compile/build an extension
3. I have no little patience to learn if it takes 400 steps
4. I'll wait lazily until someone decides to compile a build for linux, which by then L4D3 could be announced/launched, but I'll take my chances

Last edited by Sev; 05-01-2014 at 20:42.
Sev is offline
Accelerator
Senior Member
Join Date: Dec 2010
Location: Russia
Old 05-02-2014 , 03:15   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #37

Linux
Attached Files
File Type: zip l4d2_meleespawncontrol.zip (80.1 KB, 335 views)
Accelerator is offline
Machine
Senior Member
Join Date: Apr 2010
Old 05-02-2014 , 11:08   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #38

There ya go Sev. Thank you Accelerator74!
Machine is offline
Neevar
Senior Member
Join Date: Mar 2014
Old 06-03-2014 , 08:30   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #39

can anyone guide me on how to make this work with melee in saferoom plugin?

I'm getting 2 fireaxe when i put 1 fireaxe and 1 knife.
Neevar is offline
Neevar
Senior Member
Join Date: Mar 2014
Old 06-04-2014 , 01:13   Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
Reply With Quote #40

nevermind fixed it by changing

PHP Code:
GetScriptName"hunting_knife"ScriptName ); 
to

PHP Code:
GetScriptName"knife"ScriptName ); 
in the plugin.
Neevar 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 10:04.


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