save score in y_ini?
#1

Hi,i have a problem,i don't know how to save score...
I put this on OnPlayerDisconnect:
PHP код:
INI_WriteInt(File,"Score",GetPlayerScore(playerid)); 
It saves in .ini but when i go relog it restore score to 0..i don't know what is wrong.
Reply
#2

you need to load it after relog..
you got LoadUser_data or something like that?
Reply
#3

yes i have this:
PHP код:
public LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Score",PlayerInfo[playerid][pScore]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("VIP",PlayerInfo[playerid][pVIP]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_Int("Locked",PlayerInfo[playerid][pLocked]);
    
INI_Int("Online",PlayerInfo[playerid][pOnline]);
    return 
1;

Reply
#4

pawn Код:
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
Reply
#5

Quote:
Originally Posted by SmiT
Посмотреть сообщение
pawn Код:
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
where to put that? i think thats for dini..?
Reply
#6

It has nothing to do with dini. Put it when the player login.
Reply
#7

@SmiT
thank you so much...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)