Posts: 17
Threads: 5
Joined: Oct 2015
Reputation:
0
Hi guys,i got old database of players and when they login with same name and password like before,their stats there,but if that player gets more score,xp,money or anything ( same with new player) nothing will save....So when new players comes in server,his name stays registered but score and other stuff no.Please help.
Posts: 1,767
Threads: 124
Joined: Mar 2010
Show the code where you have saving player's data (if you have one, that's a first question).
Posts: 17
Threads: 5
Joined: Oct 2015
Reputation:
0
Is this?Or maybe i dont have it
public OnPlayerDisconnect(playerid, reason)
{
new namez[MAX_PLAYER_NAME];
if(IsValidLineSegment(Rope[playerid])) DestroyLineSegment(Rope[playerid]);
Rappel[playerid] = 0;
IsRappelling[playerid] = 0;
KillTimer(LandingChecker[playerid]);
KillTimer(playerData[playerid][skydiveTimer]);
GetPlayerName(playerid, namez, MAX_PLAYER_NAME);
if(FindIP(namez))
{
return 1;
}
SetPlayerColor(playerid, 0xFFFFFFFF);
if(playerData[playerid][playerLoggedIn])
{
savePlayerStats(playerid);
}
Posts: 1,767
Threads: 124
Joined: Mar 2010
Put your code in BBCode tags [.pawn] [./pawn] (without the dots).
Show us "savePlayerStats(playerid)" stock function from your script.
Posts: 17
Threads: 5
Joined: Oct 2015
Reputation:
0
I HOPE THIS IS WHAT U ASKED.....
public OnPlayerDisconnect(playerid, reason)
{
new namez[MAX_PLAYER_NAME];
if(IsValidLineSegment(Rope[playerid])) DestroyLineSegment(Rope[playerid]);
Rappel[playerid] = 0;
IsRappelling[playerid] = 0;
KillTimer(LandingChecker[playerid]);
KillTimer(playerData[playerid][skydiveTimer]);
GetPlayerName(playerid, namez, MAX_PLAYER_NAME);
if(FindIP(namez))
{
return 1;
}
SetPlayerColor(playerid, 0xFFFFFFFF);
if(playerData[playerid][playerLoggedIn])
{
savePlayerStats(playerid);
}
if(reason == 1) // Manual game-quit.
{
new administratorAlert[128];
if(playerData[playerid][playerIsTazed])
{
format(administratorAlert, sizeof(administratorAlert), "{C73E3E}[AVOID-DETECTION] {FFFFFF}%s(%i) quit the game while tazed.", playerData[playerid][playerNamee], playerid);
adminchat(COLOR_WHITE, administratorAlert);
}
else if(playerData[playerid][playerIsCuffed])
{
format(administratorAlert, sizeof(administratorAlert), "{C73E3E}[AVOID-DETECTION] {FFFFFF}%s(%i) quit the game while cuffed.", playerData[playerid][playerNamee], playerid);
adminchat(COLOR_WHITE, administratorAlert);
}
else if(playerData[playerid][playerIsTied])
{
format(administratorAlert, sizeof(administratorAlert), "{C73E3E}[AVOID-DETECTION] {FFFFFF}%s(%i) quit the game while tied.", playerData[playerid][playerNamee], playerid);
adminchat(COLOR_WHITE, administratorAlert);
}
}
Posts: 1,767
Threads: 124
Joined: Mar 2010
Okay, I consider you're stupid.
Posts: 1,547
Threads: 122
Joined: Jun 2014
Reputation:
0
This is what will happen if you download a script and feel like a coder
XD
Posts: 17
Threads: 5
Joined: Oct 2015
Reputation:
0
Dude im not stupid im just not into samp scripting,my friend gave it to me...If i know problem i will solve it alone -.-