Problem with saving Score
#1

Hello Everyone When i joined my server and i try to type

/setscore Myself 30000 And relog To check if its will be saved when i connected i got 0 score Why?

i'll give you OnPlayerDisconnect Code

Код:
public OnPlayerDisconnect(playerid, reason)
{
	new PlayerName[MAX_PLAYER_NAME], str[128];
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

	if(ServerInfo[ConnectMessages] == 1)
	{
		switch (reason) {
			case 0:	format(str, sizeof(str), "*** %s (%d) has left the server (Timeout)", PlayerName, playerid);
			case 1:	format(str, sizeof(str), "*** %s (%d) has left the server (Leaving)", PlayerName, playerid);
			case 2:	format(str, sizeof(str), "*** %s (%d) has left the server (Kicked/Banned)", PlayerName, playerid);
		}
		SendClientMessageToAll(grey, str);
	}

	if(PlayerInfo[playerid][LoggedIn] == 1)	SavePlayer(playerid);
	if(udb_Exists(PlayerName2(playerid))) dUserSetINT(PlayerName2(playerid)).("loggedin",0);
  	PlayerInfo[playerid][LoggedIn] = 0;
	PlayerInfo[playerid][Level] = 0;
	PlayerInfo[playerid][Jailed] = 0;
	PlayerInfo[playerid][Frozen] = 0;
	
	if(PlayerInfo[playerid][Jailed] == 1) KillTimer( JailTimer[playerid] );
	if(PlayerInfo[playerid][Frozen] == 1) KillTimer( FreezeTimer[playerid] );
	if(ServerInfo[Locked] == 1)	KillTimer( LockKickTimer[playerid] );

	if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]);
	
	#if defined ENABLE_SPEC
	for(new x=0; x<MAX_PLAYERS; x++)
	    if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid)
   		   	AdvanceSpectate(x);
	#endif
	
 	return 1;
}
is there any problem?
Reply


Messages In This Thread
Problem with saving Score - by RedRex - 12.11.2016, 11:17
Re: Problem with saving Score - by MrViolence101 - 12.11.2016, 11:19
Re: Problem with saving Score - by GoldenLion - 12.11.2016, 11:19
Re: Problem with saving Score - by RedRex - 12.11.2016, 11:20
Re: Problem with saving Score - by GoldenLion - 12.11.2016, 11:23
Re: Problem with saving Score - by RedRex - 12.11.2016, 11:32
Re: Problem with saving Score - by justice96 - 12.11.2016, 11:34
Re: Problem with saving Score - by RedRex - 12.11.2016, 11:35
Re: Problem with saving Score - by justice96 - 12.11.2016, 11:36
Re: Problem with saving Score - by RedRex - 12.11.2016, 11:37

Forum Jump:


Users browsing this thread: 1 Guest(s)