Forum

> > CS2D > Scripts > Get table of dropped items.
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Get table of dropped items.

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Get table of dropped items.

Mami Tomoe
User Off Offline

Zitieren
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!

alt Re: Get table of dropped items.

Rainoth
Moderator Off Offline

Zitieren
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.

alt Re: Get table of dropped items.

Mami Tomoe
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht