I've been trying this ->
- Code: Select all
if(!p.ExtraData.ContainsKey("info"))
{
p.ExtraData.Add("info",0);
}
<- but when I log out and then back in it clears itself.
if(!p.ExtraData.ContainsKey("info"))
{
p.ExtraData.Add("info",0);
}
ismellike wrote:Is there anyway I could store player info from a command?
I've been trying this ->
- Code: Select all
if(!p.ExtraData.ContainsKey("info"))
{
p.ExtraData.Add("info",0);
}
<- but when I log out and then back in it clears itself.
dzienny wrote:What Ultima said. There's no API for saving a player's variable to persistent storage. Unless it's a boolean then there's a simple trick available.
Conor wrote:dzienny wrote:What Ultima said. There's no API for saving a player's variable to persistent storage. Unless it's a boolean then there's a simple trick available.
I'm intrigued - what is the simple trick?
dzienny wrote:Conor wrote:dzienny wrote:What Ultima said. There's no API for saving a player's variable to persistent storage. Unless it's a boolean then there's a simple trick available.
I'm intrigued - what is the simple trick?
There's a 32bit integer value saved into Flags column of Players table. I can spare a few bits for booleans or even for a short number(up to 8bits). Or even more if it's necessary. So, if you need it just ask me. I will add masks for these variables.
I originally planned to use flags for achievements, but there are better ways to do it anyway. Also, I don't plan to add achievements anytime soon, because there are other things I'm focused on.
Users browsing this forum: No registered users and 5 guests