12.10.2011, 02:35
Hello,
I have a problem in my script.It doesnt saves players kills and deaths when they disconnect or server gets restart.
It shows 0 kills and deaths when they come again i want it to save anyone please help.
Please anyone fix it !
I have a problem in my script.It doesnt saves players kills and deaths when they disconnect or server gets restart.
It shows 0 kills and deaths when they come again i want it to save anyone please help.
Код:
public OnPlayerDisconnect(playerid, reason) { #if Leavemessages new PlayerName[30], string[256]; switch (reason) { case 0: { GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, 256, "%s has left the server (Timeout)", PlayerName); SendClientMessageToAll(leavemessagecolor, string); } case 1: { GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, 256, "%s has left the server (Leaving)", PlayerName); SendClientMessageToAll(leavemessagecolor, string); } case 2: { GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, 256, "%s has left the server (Kicked/banned)", PlayerName); SendClientMessageToAll(leavemessagecolor, string); } } TextDrawHideForPlayer(playerid,TotalStats[playerid]); PlayerInfo[playerid][pDeaths]=0; PlayerInfo[playerid][pKills]=0; #endif }