Score save (help)
#1

Guys my score don't save when I relog in my server, can somebody help me please?
Reply
#2

show us ur code ?
And how did u get -1 reputation lol wtf
Reply
#3

Witch code should I show, onplayerdeath?
And idk how I get -1 reputation
Reply
#4

Assuming you use Y_INI, save the player's score when he disconnects, if that doesn't work make a timer.
Reply
#5

not onplayerdeath,
show "OnPlayerDisconnect"
Reply
#6

Код:
public OnPlayerDisconnect(playerid, reason)
{
  	     new spieler[256];
  	     new string[256];
             GetPlayerName(playerid, player, sizeof(player));
             format(string, sizeof(string), "*** %s [ID: %d] has left the server.", player,playerid);
             SendLanguageMessageToAll(Yellow, string);
	     OnPlayerUpdateAccount(playerid);
	     AccountInfo[playerid][Jail] = 0;
             AccountInfo[playerid][AdminLevel] = 0;
             AccountInfo[playerid][Logged] = 0;
             AccountInfo[playerid][Mute] = 0;
	     AccountInfo[playerid][pInt] = 0;
	     AccountInfo[playerid][pLocal] = 255;
	     AccountInfo[playerid][DBKilled] = 0;
	     AccountInfo[playerid][DMLeft] = 0;
	     AccountInfo[playerid][Score] = 0;
             Drugs[playerid] = 0;
             Hide[playerid] = 0;
             SuperPunch[playerid] = 0;
	     DM[playerid] = 0;
	     DMInvited[playerid] = 0;
             PlayerAFK[playerid] = 0;
	     Spam[playerid] = 0;
	     SpamCMD[playerid] = 0;
	     Spawned[playerid] = 0;
	     PlayerCapital[playerid][Money] = 0;
	return true;
}
Reply
#7

Try Changing
PHP код:
AccountInfo[playerid][Score] = 0
to
PHP код:
AccountInfo[playerid][Score] = GetPlayerScore(playerid); 
Reply


Forum Jump:


Users browsing this thread: