How can I implement a table that list people who get in combat for a premade gun kit?

Hey fellow DevForum members basically I’ve been messing around with this gun kit and I was curious how would I try to implement or add a table/list of people inside the gun kit’s main script that gives a table of people who try to fire off their weapon and return their name, after that with the list I’m trying to make a system where they can’t kill each other unless one player either tried to kill the other which allows the other to kill the original attacker.

So to conclude what I want to achieve:

  • Be able to create a list that returns a player that enters combat (Pulls a gun and tries to fire it)
  • Add a system with the list to prevent a player from killing the other player unless one of them had pulled a gun, the player can only be killed or shot if the player itself has pulled a gun or killed someone.if they haven’t pulled a gun or shot someone they can’t be harmed.

Gun Kit:

I’m also asking that either you can provide some wiki post of the materials I need to make this myself, or be able to assist me on making this. (I’ve tried making this with a buddy (CreditsMix) but since he is too busy we can’t finish it and I need another person to help me out by either providing some wiki post on functions I need to learn to make it or assist me on it.) Thank you very much :slight_smile:

1 Like

The first one is easily done if you can link the event of which one player fires the weapon to a table that all guns are connected to

The second one can be done with some if statements near the firing function

I don’t know the full thing but it seems that you’re a beginner so I’d mess around with these things before going into something like a gun yet

Also free models are evil

Thanks SH member, anyways mind helping me out if you do have time after I take some time to research?