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

[L4D2] Array of spawned items


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jane
Junior Member
Join Date: Dec 2009
Old 02-28-2010 , 15:05   [L4D2] Array of spawned items
Reply With Quote #1

Hello,

I'm looking for a way to get an array with all the items spawned (item name + quantity) at the beginning of each map (Left 4 Dead 2).
This concerns pipes, molotov, bile, defib, medkits, pills, adrenaline, gas, oxygen, propane, weapons, melee weapons, etc...

I would like to be able to parse this array from a function of my plugin.

I'm pretty new to plugin dev, thanks for your help

Jane.
Jane is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 02-28-2010 , 15:19   Re: [L4D2] Array of spawned items
Reply With Quote #2

You can use SDKHooks' spawn and delete hooks and do it yourself.
Sammy-ROCK! is offline
Jane
Junior Member
Join Date: Dec 2009
Old 02-28-2010 , 15:39   Re: [L4D2] Array of spawned items
Reply With Quote #3

Thanks for your reply.

I had a look at SDK Hooks but it seems that it doesn't do what i'm looking for.
I want a way to count the items spawned by the game itself.

For example, let's say the game spawned 5 pipes around the map:
- I want my plugin to know that there is 5 original pipes on the current map,
- Then i will remove them (still dunno how, i'm still at the thinking process),
- Finally, i'll spawn 5 pipes where i want them to be.
Jane is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 03-01-2010 , 07:08   Re: [L4D2] Array of spawned items
Reply With Quote #4

Look at how the Item Removal Plugins (of Crow, Confogl, Srsmod) work and add a counter to them. Removing them is simply RemoveEdict(Entity) As for spawning, thats entirely your choice xD
AtomicStryker is offline
Jane
Junior Member
Join Date: Dec 2009
Old 03-01-2010 , 10:47   Re: [L4D2] Array of spawned items
Reply With Quote #5

Sounds like a very good solution.
Thank you AtomicStryker!
Jane is offline
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 03-02-2010 , 12:27   Re: [L4D2] Array of spawned items
Reply With Quote #6

Teleport the items ...Lol
Sdkhooks is exactly what you need
it has the public onentitycreated then inside of it hook the entity for spawn then teleport it or delete or what ever
miniman is offline
Jane
Junior Member
Join Date: Dec 2009
Old 03-05-2010 , 17:21   Re: [L4D2] Array of spawned items
Reply With Quote #7

Oh okay i see now.
I'll explore on this side too, thanks! ;)
Jane 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:07.


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