21.09.2013, 17:33
hello ,
I've experienced a weird bug in which the server doesn't save any stats , but i can't find the problem. if anyone can help me with this. nvm the hit script in OnPlayerDisconnect , but i can't get why it isn't saving. if anyone can help me then 100 thank you
I've experienced a weird bug in which the server doesn't save any stats , but i can't find the problem. if anyone can help me with this. nvm the hit script in OnPlayerDisconnect , but i can't get why it isn't saving. if anyone can help me then 100 thank you

Quote:
public OnPlayerConnect(playerid) { new string[256], playername[MAX_PLAYER_NAME], file[255]; GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "%s has joined Cops N Robbers RolePlay!", playername); Announce(string); IsPlayerLogged[playerid] = 0; RecentlyRobbed[playerid] = 0; SelectBM[playerid] = 0; AMMUBOX[playerid] = 0; CSKINZ[playerid] = 0; CSKINU[playerid] = 0; CSKIN[playerid] = 0; CHALLBOX[playerid] = 0; IcmdCar[playerid][CarcmdI] = -1; IsSpawned[playerid] =0; GPSTimer[playerid] = 0; HaveGPS[playerid] = false; Muted[playerid] = 0; AccountInfo[playerid][aLevel] = 0; //Text Draws TextDrawShowForPlayer(playerid, BOX); TextDrawShowForPlayer(playerid, Welcome); TextDrawShowForPlayer(playerid, text1); TextDrawShowForPlayer(playerid, text2); TextDrawShowForPlayer(playerid, text3); HaveTicket[playerid] = false; new Registre[250]; if(fexist(file)) return 1; } public OnPlayerDisconnect(playerid, reason) { new string[256], playername[MAX_PLAYER_NAME], file[256]; PlayersOnline--; GetPlayerName(playerid, playername, sizeof(playername)); format(file, sizeof(file), "%s", playername); format(string, sizeof(string), "%s has left Cops and Robbers RolePlay!", playername); Announce(string); IsPlayerLogged[playerid] = 0; RecentlyRobbed[playerid] = 0; dini_IntSet(file, "Money", GetPlayerMoney(playerid)); dini_IntSet(file, "Score", GetPlayerScore(playerid)); dini_IntSet(file, "Admin", AccountInfo[playerid][aLevel]); dini_IntSet(file, "WantedLevel", GetPlayerWantedLevel(playerid)); if(IcmdCar[playerid][CarcmdI] != -1) UcideMasinileBoule(IcmdCar[playerid][CarcmdI]); if(playerInJob[playerid]>0) { terminarMission(playerid); } OnTaxiAsPassenger[playerid]=-1; if (playerInMiniMission2[playerid]>0) { terminarMission2(playerid); } OnBusAsPassenger[playerid]=-1; SelectBM[playerid] = 0; AMMUBOX[playerid] = 0; CSKINZ[playerid] = 0; CSKINU[playerid] = 0; CSKIN[playerid] = 0; CHALLBOX[playerid] = 0; AccountInfo[playerid][aLevel] = 0; if(HaveGPS[playerid]) { KillTimer(GPSTimer[playerid]); HaveGPS[playerid] = false; GPSTimer[playerid] = 0; } if(hit[playerid] > 0) { format(string, sizeof(string), "The hit on %s (%i) has been cancelled (disconnected)", ReturnPlayerName(playerid), playerid); SendClientMessageToAll(COLOR_MSG, string); hit[playerid] = 0; } return true; } |