Help with saving stats (Money and Score)
#1

Hey all. I'm working on a little adminscript and need a bit of help with it :/

So im trying to get it to save stats. Here's what i got:

Код:
public OnPlayerDisconnect(playerid, reason)
{
	new pname[MAX_PLAYER_NAME];
	new Destination[50];
	format(Destination,sizeof(Destination),"\\Users\\%s.ini",pname);
	if (Logged[playerid] == 1)
 	{
 		GetPlayerName(playerid, pname, sizeof(pname));
 		dini_IntSet(udb_encode(Destination),"Money", GetPlayerMoney(playerid));
 		dini_IntSet(udb_encode(Destination),"Score", GetPlayerScore(playerid));
 	}
	return 1;
}
That code doesn't work, The stats dont save D: Please help :P

-V3-
Reply
#2

doesnt that code work, or what is wrong with it?
Reply
#3

It doesn't work.
Reply
#4

Код:
public OnPlayerDisconnect(playerid, reason)
{
	new pname[MAX_PLAYER_NAME],Destination[256];
	GetPlayerName(playerid, pname, sizeof(pname));
	format(Destination,sizeof(Destination),"\\Users\\%s.ini",pname);
	if (dini_Exists(Destination) && Logged[playerid])
 	{
 		dini_IntSet(Destination,"Money", GetPlayerMoney(playerid));
 		dini_IntSet(Destination,"Score", GetPlayerScore(playerid));
 	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)