DINI Problem
#1

Hello, my Problem is that sometimes a Playeraccount is deleted, and all Stats are beginning from 0, from that Player, here the Stock:

Код:
stock CreateAccount(playerid,pass[])
{
    format(str,64,"%s.txt",PlayerName[playerid]);

	dini_Create(str);
	dini_Set(str,"Passwort",pass);
	dini_IntSet(str,"Admin",0);
	dini_IntSet(str,"Geld",0);
	dini_IntSet(str,"Score",0);
	dini_IntSet(str,"Kills",0);
	dini_IntSet(str,"Deaths",0);
	return 1;
}

stock LoadAccount(playerid)
{
    format(str,64,"%s.txt",PlayerName[playerid]);

	PlayerAdmin[playerid] = dini_Int(str,"Admin");
	GivePlayerMoneyEx(playerid,dini_Int(str,"Geld"));
	SetPlayerScore(playerid,dini_Int(str,"Score"));
	PlayerKills[playerid] = dini_Int(str,"Kills");
	PlayerDeaths[playerid] = dini_Int(str,"Deaths");
	return 1;
}

stock SavePlayer(playerid)
{
    format(str,64,"%s.txt",PlayerName[playerid]);

    dini_IntSet(str,"Admin",PlayerAdmin[playerid]);
    dini_IntSet(str,"Geld",PlayerMoney[playerid]);
    dini_IntSet(str,"Score",GetPlayerScore(playerid));
    dini_IntSet(str,"Kills",PlayerKills[playerid]);
    dini_IntSet(str,"Deaths",PlayerDeaths[playerid]);
    return 1;
}
Reply
#2

Because of this much code is deleting the accounts?? Show other code too

like

where u use them>
show the stock codes
everything!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)