• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Player.cpp, player.h information needed

desalib

New Member
Joined
Jul 4, 2010
Messages
30
Reaction score
0
Hello everyone !

Okay, so what I want to know is : If I add a new variable in player source code will it be saved when logout or else ?

Here an exemple about what I mean : http://otland.net/f35/doplayersetextraattackspeed-cid-speed-58945/

In this code Darkhaos add a new variable to increase the attackspeed. Will it stay when the player logout ? I mean will the value remain or it will reset to the default value of the variable ?
 
I'm trying to use his code but I want to know if the variable (extraattackspeed in this case) will keep the value when the player will log out.
 
As far as I can see, no.

But having that function you can make onLogin script and setExtraAttackSpeed to whatever you want :p
 
You can add to database a field extraAttackSpeed(or whatever) and make it load and save in iologindata.cpp in functions savePlayer and loadPlayer.
 
@nclx
Ok yeah I don't see where it would be saved like this as character is loaded from db everytime.
But the goal is to have a different attackspeed depending on factors so onlogin will not do it.

@Amino
I will try using the db, yeah it should works.
 
Back
Top