Forum

> > CS2D > Scripts > Get table of dropped items.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Get table of dropped items.

3 replies
To the start Previous 1 Next To the start

old Get table of dropped items.

Mami Tomoe
User Off Offline

Quote
Hi! I'm working on a script, it's supposed to fix a few problems that I have with bombs in more complicated maps.

My current goal is to prevent specific players from dropping the bomb in specific areas.

So I checked the die hook to realize the return options aren't going to help me.
I continued to think and had the idea of de-spawning the bomb exactly when the player dies, but I don't know how to properly loop through all the items and get the bomb's ID.

So how does one remove all dropped bombs on the map?
Or can you give me a table of all dropped items?
Or both?

Thanks!

old Re: Get table of dropped items.

Rainoth
Moderator Off Offline

Quote
1
2
3
4
5
6
for k,v in pairs (item(0,"table")) do	
  if item(v,"type") == 55 then
    msg("BOOOOOOOM. Found it.")
    break
  end
end

cs2d lua cmd item

I'd try going to cs2d.com/help and looking through there. Will save a lot of time waiting on other people to help you out. Obviously not the case for every problem but ye.

old Re: Get table of dropped items.

Mami Tomoe
User Off Offline

Quote
Thanks! I sometimes get lost in that website because DC chooses weird names for things like he sometimes uses "weapons" and sometimes "items" and yeah... But I think I'm getting better at understanding where is what now
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview