#1

I ok the problem is what the death count for stats is bugged when a new player joins it is just giving a random number not 0 but i can find anything that is making this happen but then i cant fined anything that set it to 0, but everything else works find and they are not defined to 0

Not sure if this is the part you need but i think it is.
Код:
 if(response) {
      if (!dini_Exists(udb_encode(playername))) {
        if(strlen(inputtext) == 0) {
          ShowPlayerDialog(playerid,30,DIALOG_STYLE_MSGBOX,"Error!","Please Enter A Password!","Ok","Quit");
          return 1;
        }
        GetPlayerName(playerid, playername, sizeof(playername));
        dini_Create(udb_encode(playername));
        new pmoney[MAX_PLAYERS];
        pmoney[playerid] = GetPlayerMoney(playerid);
        pscore[playerid] = GetPlayerScore(playerid);
        dini_IntSet(udb_encode(playername), "password", udb_hash(inputtext));
        dini_IntSet(udb_encode(playername), "adminlevel", 0);
        dini_IntSet(udb_encode(playername), "money", pmoney[playerid]);
        dini_IntSet(udb_encode(playername), "score", pscore[playerid]);
        SetPlayerWantedLevel(playerid, rank[playerid]);
        dini_IntSet(udb_encode(playername), "rank", rank[playerid]);
        dini_IntSet(udb_encode(playername), "deaths", deaths[playerid]);
        dini_IntSet(udb_encode(playername), "kills", kills[playerid]);
        dini_IntSet(udb_encode(playername), "piolet", 0);
        format(string, sizeof(string), "Account created!\nYou can now login with /login and use the password %s", inputtext);
        ShowPlayerDialog(playerid,30,DIALOG_STYLE_MSGBOX,"Success!",string,"Ok","Quit");
        format(string, sizeof(string), "Account created! You can now login with /login and use the password %s", inputtext);
        SendClientMessage(playerid, COLOR_GREEN, string);
      }
    }
  }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)