Reset problem stats
#1

Hello,

Today I have a problem , once 10 we will say , my stats players reset to the player's connection simply .

Here is my code :

pawn Код:
if(dialogid == PLAYER_CONNEXION)
    {
        if(!response)
        {
            Player_erreur(playerid, "Kick", "Vous venez de mettre fin а votre connexion, re-connectez vous pour recommencer.");
            SetTimerEx("Player_kick", 1000, 0, "d", playerid);
            return 1;
        }

        new string[MAX_STRING];

        if(!strlen(inputtext) || strlen(inputtext) > 20)
        {
            format(string, sizeof(string), "Entrez le mot de passe pour continuer :");
            ShowPlayerDialog(playerid, PLAYER_CONNEXION, DIALOG_STYLE_PASSWORD, "Connexion", string, "Valider", "Quitter");
            return 1;
        }

        if(Player_tentative_pass[playerid] >= PLAYER_MAX_TENTATIVE)
        {
            Player_erreur_dialog(playerid, "Kick", "Vous avez dйpassй le nombre de tentative.");
            SetTimerEx("Player_kick", 1000, 0, "d", playerid);
            return 1;
        }

        new tmp[64];
        new tmpPass[64],idx;

        tmp = strtok(inputtext, idx);
        strmid(tmpPass, tmp, 0, strlen(inputtext), 255);

        if(strlen(tmpPass) > 0 && strcmp(Player_infos[playerid][p_Password],tmpPass, false ) == 0)
        {
            Player_charger_statistiques(playerid);
            Player_load_description(playerid);
            Avertissements_load(playerid);
            Player_spawn(playerid);
            return 1;
        }
        else
        {
            Player_tentative_pass[playerid] += 1;
            format(string, sizeof(string), "Personnage : %s\n\n{B90E00}Le mot de passe est inccorect\n{FFFFFF}Tentative : %d/%d :", GetName(playerid), Player_tentative_pass[playerid], PLAYER_MAX_TENTATIVE);
            ShowPlayerDialog(playerid, PLAYER_CONNEXION, DIALOG_STYLE_PASSWORD, "Connexion", string, "Valider", "Quitter");
            return 1;
        }

    }

Sincerely,
Drek .
Reply


Messages In This Thread
Reset problem stats - by Drek - 02.06.2015, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)