1. Hello guys, how to rewrite code below to C#? it's in Lua now
    Code:
    local ParachuteField = global.SupplyDrop._type:GetField("parachute", rust.Private())
      
         if (ParachuteField) then
           local Parachute = ParachuteField:GetValue(SupplyDrop)
        
           if (Parachute) then
    
     
    Last edited by a moderator: Jun 7, 2015
  2. At random, since the forum is probably dead.
     
  3. Why would it be dead? Because no one replied to a post that's not even 24 hours old?

    And to answer @Sanlerus' question, You'd be using Reflection (https://msdn.microsoft.com/en-us/library/ms173183.aspx)
    So in your case it will be something like this
    Code:
    ...
    private FieldInfo parachute = typeof(SupplyDrop).GetField("parachute", BindingFlags.NonPublic | BindingFlags.Instance);
    ...
    private void OnEntitySpawned(BaseEntity entity)
    {
        var airdrop = entity as SupplyDrop;
        if (airdrop == null) return;
        var supplydropParachute = parachute.GetValue(airdrop);
    }
    ...