[POMOC] Kod logina upises krivu lozinku ono se opet ulogira

Započeo MaTTaTa, Novembar 23, 2011, 18:08:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: BG
Detaljan opis problema: Kada se idem logirati ili bilo tko drugi mozes upisati bilo koju lozinku ude i ako nije ispravna kako da to popravim??
Dio skripte:

public OnPlayerLogin(playerid,password[])
{

new tmp2[128];
    new string2[128];
new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "Racuni/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
    new keytemp[256], valtemp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytemp = ini_GetKey( PassData );
    if( strcmp( keytemp , "Key" , true ) == 0 )
{
valtemp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtemp, 0, strlen(valtemp)-1, 255);
}
if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
{
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "VehDroga" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVehDroga] = strval( val ); }
if( strcmp( key , "VehMatsi" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVehMatsi] = strval( val ); }
    if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
    if( strcmp( key , "GMDuty" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGMDuty] = strval( val ); }
    if( strcmp( key , "AdminDuty" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pADuty] = strval( val ); }
                    if( strcmp( key , "GameMasterLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGameMaster] = strval( val ); }
if( strcmp( key , "DonatorRanke" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "DonatorRank", strval( val )); }
if( strcmp( key , "Ugovor" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "Ugovor", strval( val )); }
if( strcmp( key , "PGBodovi" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "PGBodovi", strval( val )); }
// if( strcmp( key , "ManjePPoena" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pManjePoena] = strval( val ); }
if( strcmp( key , "TPhone" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "TPhone", strval( val )); }
if( strcmp( key , "Eventovi" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "Eventi", strval( val )); }
        if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
        if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
        if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
        if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
        if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
        if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
if( strcmp( key , "Kredit" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKredit] = strval( val ); }
if( strcmp( key , "KreditOstalo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKreditOstalo] = strval( val ); }
        if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = strval( val ); }
        if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
        if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
        if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
        if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
        if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
        if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
        if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
        if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
        if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedDeaths] = strval( val ); }
        if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
        if( strcmp( key , "Laptop" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLaptop] = strval( val ); }
if( strcmp( key , "Papiri" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPapiri] = strval( val ); }
if( strcmp( key , "OvjeraPapira" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOvjeraPapira] = strval( val ); }
if( strcmp( key , "Naocale" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImaNaocale] = strval( val ); }
if( strcmp( key , "Banovan" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanovan] = strval( val ); }
if( strcmp( key , "BanovanNick" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanovanNick] = strval( val ); }
if( strcmp( key , "Kaciga" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImaKacigu] = strval( val ); }
if( strcmp( key , "Kredit1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKredit1] = strval( val ); }
if( strcmp( key , "Dionica" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "KljucDionice", strval( val )); }
if( strcmp( key , "PosjedujeDionicu" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "PosjedujeDionicu", strval( val )); }
        if( strcmp( key , "Posao" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "Posao", strval( val )); }
        if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
        if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = strval( val ); }
        if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
        if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
if( strcmp( key , "MuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuteTime] = strval( val ); }
        if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
        if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); }
        if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
        if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
        if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
        if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
        if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = strval( val ); }
        if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); }
        if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); }
        if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
        if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); }
        if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); }
        if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); }
        if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); }
        if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); }
        if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); }
        if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
        if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
if( strcmp( key , "pHCPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHCPos_x] = floatstr( val ); }
if( strcmp( key , "pHCPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHCPos_y] = floatstr( val ); }
if( strcmp( key , "pHCPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHCPos_z] = floatstr( val ); }
if( strcmp( key , "pHCRot_" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHCRot_] = floatstr( val ); }
        if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
        if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
        if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
        if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
if( strcmp( key , "VoziloSpawnano" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVoziloSpawnano] = strval( val ); }
if( strcmp( key , "HCar" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHCar] = strval( val ); }
        if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
        if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
        if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
if( strcmp( key , "SBizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPsbiskey] = strval( val ); }
        if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
        if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
        if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
        if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
                    if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
        if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); }
        if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
        if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); }
        if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
        if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
        if( strcmp( key , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); }
        if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugPerk] = strval( val ); }
        if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMiserPerk] = strval( val ); }
        if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainPerk] = strval( val ); }
        if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTraderPerk] = strval( val ); }
        if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "Tutorijal", strval( val )); }
if( strcmp( key , "PayDayPoeni" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayPoeni] = strval( val ); }
        if( strcmp( key , "Upozorenja" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "Upozorenja", strval( val )); }
        if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = strval( val ); }
        if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuel] = strval( val ); }
        if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); }
if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
}//end while
                fclose(UserFile);//close the file after everything has been read in the while
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FF3434}Krivi password!\n{1C8EC6}Molimo vas da unesete tacan password:",loginname);
ShowPlayerDialog(playerid,11255,DIALOG_STYLE_INPUT,"{FF3434}[ GRESKA ]",loginstring,"Login","Izlaz");
        fclose(UserFile);
        gPlayerLogTries[playerid] += 1;
        if(gPlayerLogTries[playerid] == 5) { Kick(playerid); }
        return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno): //






Onda je verovatno do toga... namesti sebi admina preko rcon...

registruj se sa drugim nalogom, nediraj nista u scriptfiles, i probaj onda da se ulogujes sa nekom levom lozinkom...


Sigurno si u users stavio sebi admina a obrisao pass. moras u igrici /changepass i nece ti moci uci s kojom zeli sifrom samo koju si postavio.


Bilanovic Eniz