1. Ok, so for our EasyXP plugin we're using this,
    Code:
            void AddLevel(BasePlayer player, float level)
            {
                player.xp.Reset();
                AddLevel(player, level);
            }
    
    But we get this error,
    Code:
    [Error] EasyXP.cs(66,23): error CS0023: The `.' operator cannot be applied to operand of type `Rust.Xp.Agent'
    We're using this, yet I guess it is incorrect,
    Code:
    using Rust.Xp;
    
    What would be the proper way to fix this?
    [DOUBLEPOST=1467876480][/DOUBLEPOST]Ignore the XP thing, we haven't expanded on it, as it's a test to make sure it works before making it read off the config ect, for example I believe the level should be replaced with a number.
     
  2. Bump. Anybody??
     
  3. Try it
    Code:
                BasePlayer.FindXpAgent(player.userID).Reset();
    
     
  4. Is such plugin already public?
     
  5. Wulf

    Wulf Community Admin

    No, it's being developed.
     
  6. And a plugin for xp would be possible just with the 4 lanes kappa wrote?
    Im tryi g yo start making plugins but i cant see to find a start.
    If thats a plugin itself im sure lesrning about from this and will be my start point :)
     
  7. Wulf

    Wulf Community Admin

    No, there is code that he didn't show there.
     
  8. Nope: [Oxide] 10:18 [Error] EasyXP.cs(69,24): error CS0117: `BasePlayer' does not contain a definition for `FindXpAgent'
     
  9. I c. Was to cool to be true xd thx
     
  10. Dylan I fixed that I believe, we have other errors before we can fix it.
    [DOUBLEPOST=1467911059][/DOUBLEPOST]Lets get starter, if we can get it on oxide before the release that would be great.
    [DOUBLEPOST=1467911409][/DOUBLEPOST]Ok so I decided to do this, not sure if I replace level with the number, if anyone knows please tell me, but anyway.
    Code:
            void OnPlayerSleepEnded(BasePlayer player)
            {
                if (playerData.playerD[player.userID].isNew)
                void SetValue(long id, float total)
                {  
                    playerData.playerD[player.userID].isNew = false;//shouldnt this be true
                    SaveData();
                    player.xp.Reset();
                    Rust.Xp.Agent.SetValue(float total);
    
    It keeps saying all the brackets are errors, I don't want to post the code sitting here but if Wulf/any other dev is willing to help PM me. Thanks :)
     
  11. Wulf

    Wulf Community Admin

    if (playerData.playerD[player.userID].isNew)
    void SetValue(long id, float total)
    {

    Your issue is there ^.
     
  12. hype hype!
     
  13. I HAVE XP SERVER ALREADY! :D:D:
    WAITING FOR CLIENT :D:D HYOPE HYPOE
    DONT OVER LOAD THE DOWNLOAD :p
     
  14. Wulf, how can i add some xp for player? (c#)
    Code:
    player.xp.Add(null,9999,null); // not working
     
  15. I am trying to manage the xp earned

    Code:
    object OnXpEarn(BasePlayer player, float amount, string source)
            {
                if (HasPermission(player, "XP2"))
                {
                    amount = (float)(amount * 3); // error
    amount = (int)(amount * 3); // no error but not working
    amount = amount * 3; // no error but not working
                    SendReply(player, amount.ToString());
                }
                return null;
            }
     
  16. Code:
           void AddLevel(BasePlayer player,float level)
           {
                player.xp.Reset();
                AddLevel(player, level);
           }
     
  17. Wulf

    Wulf Community Admin

    That will move a player to a level, not add X amount of XP. Using player.xp.Add is the correct method to just add XP, but you'd need to add // Reference: Rust.Xp to the top of the plugin.
     
  18. Oh okay.
     
  19. How do fix this error?
    Code:
    error CS0023: The `.' operator cannot be applied to operand of type `Rust.Xp.Agent'
     
  20. Bump @Wulf Our last issue before release, we don't know how to fix it.
    [DOUBLEPOST=1467930115][/DOUBLEPOST]
    I'm getting the same error, see http://oxidemod.org/threads/giving-xp-need-help.19256/#post-223467