1. I'm making an all items plugin for the XP system and I wanted to know the way to do this, it is possible, I've seen it on battlefield servers, just they didn't have all the bps unlocked.
     
  2. Wulf

    Wulf Community Admin

    If you don't want to earn XP, just return 0 in the OnEarnXp hook.
     
  3. Is it possible you could give me an example? Also, thanks for adding the hooks :)
     
  4. Wulf

    Wulf Community Admin

    object OnEarnXp(BasePlayer player, float amount) => 0f;
     
  5. thanks
    [DOUBLEPOST=1468124678][/DOUBLEPOST]Wait
    "Unexpected symbol, "float"
     
  6. Wulf

    Wulf Community Admin

    I'd need to see what you have, but it sounds like you're missing something.
     
  7. I'm not using the latest Oxide version, but the one before that, I don't want to update because the crash reports.
    Were the hooks in that version?
     
  8. Wulf

    Wulf Community Admin

    Most of the crash reports have been users not actually being updated. The hooks are the same as they've been in the past few updates.
     
  9. Code:
    namespace Oxide.Plugins
    {
        [Info("AllItems", "Kappasaurus", "0.1.0")]
        [Description("Unlocks items without spending XP")]    class AllItems : RustPlugin
        {
            void OnPlayerInit(BasePlayer player)
            {
                foreach (var item in ItemManager.itemList) player.blueprints.Unlock(item);            object OnEarnXp(BasePlayer player, float amount) => 0f;
            }
        }
    }
    
    [DOUBLEPOST=1468127820][/DOUBLEPOST]
    Ok, I'll update on next restart, but there isn't a client update so I suppose it isn't urgent.
     
  10. Wulf

    Wulf Community Admin

    You can't put a hook inside another hook. ;)
     
  11. Thanks
     
  12. Unlocked items will not displayed on client if his level lower than item unlock level, so you need to set players levels too.