[AYUDA] Nose que pasa cuando haces login
#1

Bueno, acabo de terminar de hacer el login en mysql. Se registra bien. Pero cuando tocas login se pone la pantalla mirando a unity y manda un sendclientmesage que dice "Bienvenido a Los Santos nosequecosa.. y no loginiea, bue, entonces le doy cntl f en el script y busco eso, y bueno me encuentro con esto.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
   
    new string[128];
    PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
    PlayerInfo[playerid][pModel] = Peds[classid][0];

    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        ClearChatbox(playerid, 10);
        format(string, sizeof(string), "Bienvenido a Los Santos || Version %s", SCRIPT_VERSION);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        SendClientMessage(playerid, COLOR_YELLOW2, " ");
        SetPlayerPos(playerid, 1809.1567,-1846.6804,39.8038);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerInterior(playerid, 0);
        SetPlayerCameraPos(playerid, 1810.8529,-1844.0466,19.0966);
        SetPlayerCameraLookAt(playerid, 1810.8529,-1844.0466,19.0966);
        //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
        PlayerInfo[playerid][pModel] = Peds[classid][0];
        SetPlayerTeamFromClass(playerid,classid);
       
    }
    else SpawnPlayer(playerid);
    return false;
}
mi codigo de login es este
pawn Код:
forward LoginPlayer(playerid, password[]);
public LoginPlayer(playerid, password[])
{
   if(!AccountExists[playerid])
           return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] You're not registered!");
   /*{
      new regstring[128];
      format(regstring,sizeof(regstring),"{4FC7C9}Bienvenido a nuestro servidor.\n\n{4FC7C9}Esta cuenta no se encuentra registrada.\n{4FC7C9}Coloca tu contraseсa abajo para crear un cuenta y poder entrar.");
      ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"{E50000}Virtual Rol {BB9000}RP - {D8711B}Registro",regstring,"Registrar","Salir");
   }*/

        //return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] You're not registered!");

    if(PlayerLogged[playerid])
            return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] You're already logged in!");

    if(strlen(password) < 3 || strlen(password) >= 32)
            return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] Your password is too short or too long!");

    CheckMySQL();

        new string[128];
    format(string, sizeof(string), "SELECT * FROM Users WHERE Name = '%s' AND Password = '%s'", PlayerInfo[playerid][pName],password);
    mysql_query(string);
    mysql_store_result();

    if(!mysql_num_rows())
        return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] Incorrect password!");//dialog de incorrect

    new row[128]; // The length of 1 'row' total.
    new field[128][128]; // [4] = Amount of fields, [24] = Max length of the bigest field.

    mysql_fetch_row_format(row, "|");
    explode(row, field, "|");
    mysql_free_result();

    // The field starts here with 1, because the field 'Name' = 0, and we already have the name in a variable.
    format(PlayerInfo[playerid][pPassword], 32, "%s", field[2]);
   

PlayerInfo[playerid][pKey] = strval(field[3]);
PlayerInfo[playerid][pLevel] = strval(field[4]);
PlayerInfo[playerid][pAdmin] = strval(field[5]);
PlayerInfo[playerid][pDonateRank] = strval(field[6]);
PlayerInfo[playerid][gPupgrade] = strval(field[7]);
PlayerInfo[playerid][pConnectTime] = strval(field[8]);
PlayerInfo[playerid][pReg] = strval(field[9]);
PlayerInfo[playerid][pSex] = strval(field[10]);
PlayerInfo[playerid][pAge] = strval(field[11]);
PlayerInfo[playerid][pOrigin] = strval(field[12]);
PlayerInfo[playerid][pCK] = strval(field[13]);
PlayerInfo[playerid][pMuted] = strval(field[14]);
PlayerInfo[playerid][pExp] = strval(field[15]);
PlayerInfo[playerid][pCash] = strval(field[16]);
PlayerInfo[playerid][pAccount] = strval(field[17]);
PlayerInfo[playerid][pCrimes] = strval(field[18]);
PlayerInfo[playerid][pKills] = strval(field[19]);
PlayerInfo[playerid][pDeaths] = strval(field[20]);
PlayerInfo[playerid][pArrested] = strval(field[21]);
PlayerInfo[playerid][pWantedDeaths] = strval(field[22]);
PlayerInfo[playerid][pPhoneBook] = strval(field[23]);
PlayerInfo[playerid][pLottoNr] = strval(field[24]);
PlayerInfo[playerid][pFishes] = strval(field[25]);
PlayerInfo[playerid][pBiggestFish] = strval(field[26]);
PlayerInfo[playerid][pJob] = strval(field[27]);
PlayerInfo[playerid][pPayCheck] = strval(field[28]);
PlayerInfo[playerid][pHeadValue] = strval(field[29]);
PlayerInfo[playerid][pJailed] = strval(field[30]);
PlayerInfo[playerid][pJailTime] = strval(field[31]);
PlayerInfo[playerid][pMats] = strval(field[32]);
PlayerInfo[playerid][pDrugs] = strval(field[33]);
PlayerInfo[playerid][pLeader] = strval(field[34]);
PlayerInfo[playerid][pMember] = strval(field[35]);
PlayerInfo[playerid][pFMember] = strval(field[36]);
PlayerInfo[playerid][pRank] = strval(field[37]);
PlayerInfo[playerid][pChar] = strval(field[38]);
PlayerInfo[playerid][pContractTime] = strval(field[39]);
PlayerInfo[playerid][pDetSkill] = strval(field[40]);
PlayerInfo[playerid][pSexSkill] = strval(field[41]);
PlayerInfo[playerid][pBoxSkill] = strval(field[42]);
PlayerInfo[playerid][pLawSkill] = strval(field[43]);
PlayerInfo[playerid][pMechSkill] = strval(field[44]);
PlayerInfo[playerid][pJackSkill] = strval(field[45]);
PlayerInfo[playerid][pCarSkill] = strval(field[46]);
PlayerInfo[playerid][pNewsSkill] = strval(field[47]);
PlayerInfo[playerid][pDrugsSkill] = strval(field[48]);
PlayerInfo[playerid][pCookSkill] = strval(field[49]);
PlayerInfo[playerid][pFishSkill] = strval(field[50]);
PlayerInfo[playerid][pHealth] = strval(field[51]);
PlayerInfo[playerid][pSHealth] = strval(field[52]);
PlayerInfo[playerid][pInt] = strval(field[53]);
PlayerInfo[playerid][pLocal] = strval(field[54]);
PlayerInfo[playerid][pTeam] = strval(field[55]);
PlayerInfo[playerid][pModel] = strval(field[56]);
PlayerInfo[playerid][pPnumber] = strval(field[57]);
PlayerInfo[playerid][pPhousekey] = strval(field[58]);
PlayerInfo[playerid][pPcarkey] = strval(field[59]);
PlayerInfo[playerid][pPcarkey2] = strval(field[60]);
PlayerInfo[playerid][pPcarkey3] = strval(field[61]);
PlayerInfo[playerid][pGangKey] = strval(field[62]);
PlayerInfo[playerid][pPbiskey] = strval(field[63]);
PlayerInfo[playerid][pPos_x] = strval(field[64]);
PlayerInfo[playerid][pPos_y] = strval(field[65]);
PlayerInfo[playerid][pPos_z] = strval(field[66]);
PlayerInfo[playerid][pCarLic] = strval(field[67]);
PlayerInfo[playerid][pFlyLic] = strval(field[68]);
PlayerInfo[playerid][pBoatLic] = strval(field[69]);
PlayerInfo[playerid][pFishLic] = strval(field[70]);
PlayerInfo[playerid][pGunLic] = strval(field[71]);
PlayerInfo[playerid][pGun1] = strval(field[72]);
PlayerInfo[playerid][pGun2] = strval(field[73]);
PlayerInfo[playerid][pGun3] = strval(field[74]);
PlayerInfo[playerid][pGun4] = strval(field[75]);
PlayerInfo[playerid][pAmmo1] = strval(field[76]);
PlayerInfo[playerid][pAmmo2] = strval(field[77]);
PlayerInfo[playerid][pAmmo3] = strval(field[78]);
PlayerInfo[playerid][pAmmo4] = strval(field[79]);
PlayerInfo[playerid][pCarTime] = strval(field[80]);
PlayerInfo[playerid][pPayDay] = strval(field[81]);
PlayerInfo[playerid][pPayDayHad] = strval(field[82]);
PlayerInfo[playerid][pWatch] = strval(field[83]);
PlayerInfo[playerid][pCrashed] = strval(field[84]);
PlayerInfo[playerid][pWins] = strval(field[85]);
PlayerInfo[playerid][pLoses] = strval(field[86]);
PlayerInfo[playerid][pAlcoholPerk] = strval(field[87]);
PlayerInfo[playerid][pDrugPerk] = strval(field[88]);
PlayerInfo[playerid][pMiserPerk] = strval(field[89]);
PlayerInfo[playerid][pPainPerk] = strval(field[90]);
PlayerInfo[playerid][pTraderPerk] = strval(field[91]);
PlayerInfo[playerid][pTut] = strval(field[92]);
PlayerInfo[playerid][pMissionNr] = strval(field[93]);
PlayerInfo[playerid][pWarns] = strval(field[94]);
PlayerInfo[playerid][pVirWorld] = strval(field[95]);
PlayerInfo[playerid][pFuel] = strval(field[96]);
PlayerInfo[playerid][pMarried] = strval(field[97]);
PlayerInfo[playerid][pMarriedTo] = strval(field[98]);
PlayerInfo[playerid][pFishTool] = strval(field[99]);
PlayerInfo[playerid][pInvWeapon] = strval(field[100]);
PlayerInfo[playerid][pInvAmmo] = strval(field[101]);
PlayerInfo[playerid][pLighter] = strval(field[102]);
PlayerInfo[playerid][pCigarettes] = strval(field[103]);
PlayerInfo[playerid][pRequestingBackup] = strval(field[104]);
PlayerInfo[playerid][pRoadblock] = strval(field[105]);
PlayerInfo[playerid][pMask] = strval(field[106]);
PlayerInfo[playerid][pBomba] = strval(field[107]);
PlayerInfo[playerid][pMaskuse] = strval(field[108]);
PlayerInfo[playerid][pHideNumber] = strval(field[109]);
PlayerInfo[playerid][pSpeaker] = strval(field[110]);
PlayerInfo[playerid][pLocked] = strval(field[111]);
PlayerInfo[playerid][pGPS] = strval(field[112]);
PlayerInfo[playerid][pCasco] = strval(field[113]);
PlayerInfo[playerid][pLente] = strval(field[114]);
PlayerInfo[playerid][pLlaveP1] = strval(field[115]);
PlayerInfo[playerid][pLlaveP2] = strval(field[116]);
PlayerInfo[playerid][pLlaveP3] = strval(field[117]);
PlayerInfo[playerid][pPuntosL] = strval(field[118]);
PlayerInfo[playerid][pRelojM] = strval(field[119]);
PlayerInfo[playerid][pSueldo] = strval(field[120]);

   

    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);


        format(string, sizeof(string), "[SERVER] %s, Has logueado correctamente!", PlayerInfo[playerid][pName]);
        SendClientMessage(playerid, COLOR_GREEN, string);
        gPlayerLogged[playerid] = 1;
        SpawnPlayer(playerid);
        PlayerLogged[playerid] = 1;
        //DestroyPlayerObject(playerid,ObjetoConectado[playerid]);
        RegistrationStep[playerid] = 1;// lo puse para ver si se arreglaba pero nop

        return 1;
}

Estoy usando el gm virtual rol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)