Ok, so for our EasyXP plugin we're using this,
But we get this error,Code:void AddLevel(BasePlayer player, float level) { player.xp.Reset(); AddLevel(player, level); }
We're using this, yet I guess it is incorrect,Code:[Error] EasyXP.cs(66,23): error CS0023: The `.' operator cannot be applied to operand of type `Rust.Xp.Agent'
What would be the proper way to fix this?Code:using Rust.Xp;
[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.
Adding XP to player?
Discussion in 'Rust Development' started by Kappasaurus, Jul 7, 2016.
-
Bump. Anybody??
-
Try it
Code:BasePlayer.FindXpAgent(player.userID).Reset();
-
Is such plugin already public?
-
Wulf Community Admin
-
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 -
Wulf Community Admin
-
-
-
[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);
-
Wulf Community Admin
void SetValue(long id, float total)
{
Your issue is there ^. -
hype hype!
-
I HAVE XP SERVER ALREADY! :
WAITING FOR CLIENT HYOPE HYPOE
DONT OVER LOAD THE DOWNLOAD -
Wulf, how can i add some xp for player? (c#)
Code:player.xp.Add(null,9999,null); // not working
-
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; }
-
Code:
void AddLevel(BasePlayer player,float level) { player.xp.Reset(); AddLevel(player, level); }
-
Wulf Community Admin
-
-
Code:error CS0023: The `.' operator cannot be applied to operand of type `Rust.Xp.Agent'
-
[DOUBLEPOST=1467930115][/DOUBLEPOST]