Vice City: Multiplayer

VC:MP Discussion => Support => Topic started by: Coolkid on Jan 25, 2016, 02:02 AM

Title: Stat
Post by: Coolkid on Jan 25, 2016, 02:02 AM
HI now my databse is loaded and my register login function is also working but when i reconnect my all stats money and kills are back to 0 plzz help me and thanks in advance
Title: Re: Stat
Post by: Mashreq on Jan 25, 2016, 02:08 AM
Some functions are expected from you, without it we cannot help you.
Title: Re: Stat
Post by: Decent_946 on Jan 25, 2016, 01:40 PM
if you are using fuzzie'ss account system. then there is a function like function Update( player, sqliteDB ). this is to save players stats. you need to put this function onplayerpart if you notice, in fuzzie's account system it is already added
function onPlayerPart( player, reason ){
if( pstats[ player.ID ].Level != 0 ){
pstats[ player.ID ].Update( player, sqliteDB );
}
pstats[ player.ID ] = null;
}

otherwise make your own save-stats function.