English Get table of dropped items.

3 replies
Goto Page
To the start Previous 1 Next To the start
26.03.19 03:26:00 pm
Up
Goo
User
Offline Off
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!
26.03.19 04:17:57 pm
Up
Devil-Thanh
GAME BANNED
Offline Off
Check cs2d lua hook drop
26.03.19 04:20:36 pm
Up
Rainoth
Moderator
Offline Off
Code:
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.
26.03.19 04:27:33 pm
Up
Goo
User
Offline Off
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