Trying to limit chinook based on player count
There are no OnPlayerDisconnect, OnPlayerConnect, nor OnEntitySpawn hooks; and none with any of those signatures.

You would want OnPlayerConnected(BasePlayer player), OnPlayerDisconnected(BasePlayer player), and OnEntitySpawned(BaseEntity entity). You can get more specific for hte OnEntitySpawned hook, but you would have to hook it twice in that case with the specific types, else just check with if checks inside the single hook.

The hook for when things spawn is OnEntitySpawned() not OnEntitySpawn().

The hook for players connecting is OnPlayerConnected() not OnPlayerConnect() and the hook for players disconnecting is OnPlayerDisconnected() not OnPlayerDisconnect(), the parameter is also just BasePlayer.

Make sure you read the docs (https://umod.org/documentation/games/rust) carefully.

So it would be something like this ?
class MinimumPlayer4LockedCrate : RustPlugin
    {
        private void OnPlayerDisconnected(BasePlayer player) // C'est pour supprimer les crates qui sont resté loader lorsqu'il y avait 3 joueurs
        {
            if (BasePlayer.activePlayerList.Count >= 3) return;
            NextTick(() =>
            {
                foreach (BaseNetworkable networkable in BaseNetworkable.serverEntities)
                {
                    if (networkable is HackableLockedCrate)
                    {
                        networkable.Kill();
                    }
                }
            }
            );
        }

        private void OnPlayerConnected(CH47HelicopterAIController ch47, HackableLockedCrate crate) // C'est pour supprimer les crates qui sont resté loader lorsqu'il y avait 3 joueurs
        {
            if (BasePlayer.activePlayerList.Count >= 3) return;
            NextTick(() =>
            {
                foreach (BaseNetworkable networkable in BaseNetworkable.serverEntities)
                {
                    if (networkable is HackableLockedCrate)
                    {
                        networkable.Kill();
                    }
                }
            }
            );
        }

        private void OnEntitySpawned(CH47HelicopterAIController ch47) // Ici c'est pour supprimer les crates quand elle vont apparaitre si les il y a moins de 3 joueurs
        {
            if (BasePlayer.activePlayerList.Count >= 3) return;
            NextTick(() =>
            {
                if (ch47 != null)
                {
                    ch47.Kill();
                }
            }
            );
        }
        private void OnEntitySpawned(HackableLockedCrate crate) // Ici c'est pour supprimer les crates quand elle vont apparaitre si les il y a moins de 3 joueurs
        {
            if (BasePlayer.activePlayerList.Count >= 3) return;
            NextTick(() =>
            {
                if (crate != null)
                {
                    crate.Kill();
                }
            }
            );
        }

        private void Loaded()
        {
            PrintToConsole("The MinimumPlayersForCrates plugin has been loaded");
            PrintToChat("The MinimumPlayersForCrates plugin has been loaded");
        }

    }
}
​
Yes. Only thing that needs changing would be the parameters of OnPlayerConnected(). OnPlayerConnected() only takes one parameter of type BasePlayer. So in short, OnPlayerConnected(CH47HelicopterAIController ch47, HackableLockedCrate crate) ---> OnPlayerConnected(BasePlayer).
Can you explain me why does OnPlayerConnected and OnPlayerDisconnected don't need to have the entities in parameters ?
Dolotboy
Can you explain me why does OnPlayerConnected and OnPlayerDisconnected don't need to have the entities in parameters ?

Because those entities are not valid arguments for those hooks. You can't add random entities to hooks. ;)

Dolotboy
Can you explain me why does OnPlayerConnected and OnPlayerDisconnected don't need to have the entities in parameters ?
Look in the rust docs (https://umod.org/documentation/games/rust) to see the correct arguments for each of the hooks.
Thx for the documentation, it will be really useful and btw It worked :D thx !!