Help on scores
#1

why my server dont save scores
when i set score to anyplayer its work but after restart the score move away


help!!!!!!!!!!
Reply
#2

what is tha system ? mysql yini ? or..
show us your code players info and OnPlayerDisconnect
Reply
#3

im using satdm
Reply
#4

i cant help you without codes
Reply
#5

the player disconnect codes ?
Reply
#6

yea and the playerinfo enume
Reply
#7

//==============================Player Disconnect===============================
public OnPlayerDisconnect(playerid,reason)
{
new PlayerName[30], str[128];
GetPlayerName(playerid, PlayerName, 30);
if(playerInMiniMission[playerid]>0)
{
terminarMission(playerid);
}
OnBusAsPassenger[playerid]=-1;
OnTaxiAsPassenger[playerid]=-1;
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(COLOR_PINK, 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 defined ENABLE_SPEC
for(new x=0; x<MAX_PLAYERS; x++)
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid)
AdvanceSpectate(x);
#endif
if(RaceParticipant[playerid]>=1)
{
if(Participants==1) //Last participant leaving, ending race.
{
endrace();
}
if(RaceParticipant[playerid] < 3 && RaceStart == 0 && !(RaceParticipant[playerid]==3 && RaceStart == 1))
{ //Doing readycheck since someone left, but not if they disconnected during countdown.
ReadyRefresh(playerid);
}
Participants--;
RaceParticipant[playerid]=0;
DisablePlayerRaceCheckpoint(playerid);
}
if(RaceBuilders[playerid] != 0)
{
DisablePlayerRaceCheckpoint(playerid);
for(new i;i<BCurrentCheckpoints[b(playerid)];i++)
{
BRaceCheckpoints[b(playerid)][i][0]=0.0;
BRaceCheckpoints[b(playerid)][i][1]=0.0;
BRaceCheckpoints[b(playerid)][i][2]=0.0;
}
BuilderSlots[b(playerid)] = GetMaxPlayers()+1;
RaceBuilders[playerid] = 0;
}
new leaveMsg[128], playname[MAX_PLAYER_NAME], reasonMsg[8];
switch(reason)
{
case 0: { reasonMsg = "Timeout"; }
case 1: { reasonMsg = "Leaving"; }
case 2: { reasonMsg = "Kicked"; }
}
GetPlayerName(playerid, playname, sizeof(playname));
format(leaveMsg, sizeof(leaveMsg), "02[%d] 04*** %s has left the server. (%s)", playerid, playname, reasonMsg);
IRC_GroupSay(gGroupID, IRC_CHANNEL, leaveMsg);

InShamal[playerid] = 0;
InAndrom[playerid] = 0;
TextDrawHideForPlayer(playerid,vehiclehpbar[playerid]);
KZI_OnPlayerDisconnect( playerid, reason );
return 1;
}
{
enum pInfo
{
bool:SpawnDance,
Float:SpawnAngle,
SpawnTimer,
name[MAX_PLAYER_NAME],
bowner,
bowned,
pass,
pcash,
bank,
team,
Jailed,
vhpb,
weed,
gang,
condoms,
inalcatraz,

Registered,
LoggedIn,
Level,
Muted,
Caps,
LJailTime,
Frozen,
FreezeTime,
Kills,
Deaths,
hours,
mins,
secs,
TotalTime,
ConnectTime,
MuteWarnings,
Warnings,
Spawned,
TimesSpawned,
God,
DoorsLocked,
SpamCount,
SpamTime,
PingCount,
PingTime,
BotPing,
pPing[PING_MAX_EXCEEDS],
blip,
blipS,
pColour,
SpecID,
SpecType,
bool:AllowedIn,
FailLogin,
vowned,
vowner,
vowned2,
vowner2,
vowned3,
vowner3,
vowned4,
vowner4,
vowned5,
vowner5,
vowned6,
vowner6,
vowned7,
vowner7,
vowned8,
vowner8,
vowned9,
vowner9,
vowned10,
vowner10,
Reply
#8

Help
Reply
#9

Hello!

We need the funtion
PHP код:
SavePlayer(playerid); 
.

Mencent
Reply
#10

i have LoginPlayer and under it some codes but SavePlayer(playerid); no
Reply


Forum Jump:


Users browsing this thread: