Jump to content
  • 0

Plugin develop


Castom St
 Share

Question

I want to get a list of all the mines placed by the player, entity.GetComponentsInChildren<Landmine>() returns me only landmine[0]
And I still don't know how to track the pressing of the RF transmitter and the player who pressed it(

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
        List<Landmine> GetPlayerLandmines(BasePlayer player)
        {
            var landmineList = new List<Landmine>();

            foreach (var landmine in BaseNetworkable.serverEntities.OfType<Landmine>())
            {
                if (landmine.OwnerID == player.userID)
                {
                    landmineList.Add(landmine);
                }
                else continue;
            }

            return landmineList;
        }

 

Bit late but here you go 😉

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

392.3k

Downloads

Total number of downloads.

2.1k

Customers

Total customers served.

28.3k

Files Sold

Total number of files sold.

441.7k

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.