Ne am Streamer liegt es nicht.....
Hier mal das Einloggen:
public OnPlayerLogin(playerid,password[])
{
new string2[256];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(SpielerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(SpielerInfo[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 , "Gebannt" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGebannt] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAdmin] = strval( val ); }
if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pDonateRank] = strval( val ); }
if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][gPupgrade] = strval( val ); }
if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pConnectTime] = strval( val ); }
if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pReg] = strval( val ); }
if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pSex] = strval( val ); }
if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAge] = strval( val ); }
if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCK] = strval( val ); }
if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pMuted] = strval( val ); }
if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pExp] = strval( val ); }
if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCash] = strval( val ); }
if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAccount] = strval( val ); }
if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCrimes] = strval( val ); }
if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pKills] = strval( val ); }
if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pDeaths] = strval( val ); }
if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pArrested] = strval( val ); }
if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pWantedDeaths] = strval( val ); }
if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPhoneBook] = strval( val ); }
if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pFishes] = strval( val ); }
if( strcmp( key , "BiggestFish" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pBiggestFish] = strval( val ); }
if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][sJob] = strval( val ); }
if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPayCheck] = strval( val ); }
if( strcmp( key , "JobGehalt" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pJobGehalt] = strval( val ); }
if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pHeadValue] = strval( val ); }
if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pJailed] = strval( val ); }
if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pJailTime] = strval( val ); }
if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pMats] = strval( val ); }
if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pDrugs] = strval( val ); }
if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][sLeader] = strval( val ); }
if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][sMember] = strval( val ); }
if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pRank] = strval( val ); }
if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pChar] = strval( val ); }
if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pContractTime] = strval( val ); }
if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pDetSkill] = strval( val ); }
if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pSexSkill] = strval( val ); }
if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pBoxSkill] = strval( val ); }
if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pLawSkill] = strval( val ); }
if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pMechSkill] = strval( val ); }
if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pJackSkill] = strval( val ); }
if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCarSkill] = strval( val ); }
if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pNewsSkill] = strval( val ); }
if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pDrugsSkill] = strval( val ); }
if( strcmp( key , "CookSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCookSkill] = strval( val ); }
if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pFishSkill] = strval( val ); }
if( strcmp( key , "FarmerSkill" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pFarmerSkill] = strval( val ); }
if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pSHealth] = floatstr( val ); }
if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pHealth] = floatstr( val ); }
if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pInt] = strval( val ); }
if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pLocal] = strval( val ); }
if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pTeam] = strval( val ); }
if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pModel] = strval( val ); }
if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPnumber] = strval( val ); }
if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPhousekey] = strval( val ); }
if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPbiskey] = strval( val ); }
if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPos_x] = floatstr( val ); }
if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPos_y] = floatstr( val ); }
if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPos_z] = floatstr( val ); }
if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCarLic] = strval( val ); }
if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pFlyLic] = strval( val ); }
if( strcmp( key , "MotoLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pMotoLic] = strval( val ); }
if( strcmp( key , "LKWLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pLKWLic] = strval( val ); }
if( strcmp( key , "ARGE" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pARG] = strval( val ); }
if( strcmp( key , "CarInsurance" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCarInsurance] = strval( val ); }
if( strcmp( key , "LifeInsurance" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pLifeInsurance] = strval( val ); }
if( strcmp( key , "BoxMats" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pBoxMats] = strval( val ); }
if( strcmp( key , "BoxDrugs" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pBoxDrugs] = strval( val ); }
if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pBoatLic] = strval( val ); }
if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pFishLic] = strval( val ); }
if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGunLic] = strval( val ); }
if( strcmp( key , "Gun1" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGun1] = strval( val ); }
if( strcmp( key , "Gun2" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGun2] = strval( val ); }
if( strcmp( key , "Gun3" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGun3] = strval( val ); }
if( strcmp( key , "Gun4" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGun4] = strval( val ); }
if( strcmp( key , "Gun5" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGun5] = strval( val ); }
if( strcmp( key , "Ammo1" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAmmo1] = strval( val ); }
if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAmmo2] = strval( val ); }
if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAmmo3] = strval( val ); }
if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAmmo4] = strval( val ); }
if( strcmp( key , "Ammo5" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAmmo5] = strval( val ); }
if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCarTime] = strval( val ); }
if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPayDay] = strval( val ); }
if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPayDayHad] = strval( val ); }
if( strcmp( key , "CDPlayer" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pCDPlayer] = strval( val ); }
if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pWins] = strval( val ); }
if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pLoses] = strval( val ); }
if( strcmp( key , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pAlcoholPerk] = strval( val ); }
if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pDrugPerk] = strval( val ); }
if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pMiserPerk] = strval( val ); }
if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPainPerk] = strval( val ); }
if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pTraderPerk] = strval( val ); }
if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pTut] = strval( val ); }
if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pWarns] = strval( val ); }
if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pOnline] = strval( val ); }
if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pFuel] = strval( val ); }
if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pMarried] = strval( val ); }
if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(SpielerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Kampfstil" , true ) == 0 ) { val = ini_GetValue( Data ); Kampfstil[playerid] = strval( val ); }
if( strcmp( key , "SpawnChange" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pSpawnChange] = strval( val ); }
if( strcmp( key , "WantedLVL" , true ) == 0 ) { val = ini_GetValue( Data ); WantedLevel[playerid] = strval( val ); }
if( strcmp( key , "SFLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pSFLic] = strval( val ); }
if( strcmp( key , "LVLic" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pLVLic] = strval( val ); }
if( strcmp( key , "UhrID" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pUhrID] = strval( val ); }
if( strcmp( key , "Perso" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pOwnPerso] = strval( val ); }
if( strcmp( key , "PinB" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPinB] = strval( val ); }
if( strcmp( key , "HandyID" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pHandyID] = strval( val ); }
if( strcmp( key , "HandyTon" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pHandyTon] = strval( val ); }
if( strcmp( key , "ZigID" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pZigID] = strval( val ); }
if( strcmp( key , "Schachtel" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pZig] = strval( val ); }
if( strcmp( key , "ZigSucht" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pZigSucht] = strval( val ); }
if( strcmp( key , "HandyGeld" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pHandyGeld] = strval( val ); }
if( strcmp( key , "HandyVer" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pHandyVer] = strval( val ); }
if( strcmp( key , "GWD" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGWD] = floatstr( val ); }
if( strcmp( key , "PlayMinutes" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pPlayMinutes] = strval( val ); }
if( strcmp( key , "GesamtMinutes" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][pGesamtMinutes] = strval( val ); }
if( strcmp( key , "Monat" , true ) == 0 ) { val = ini_GetValue( Data ); SpielerInfo[playerid][sMonat] = strval( val ); }
if( strcmp( key , "Offflucht" , true ) == 0 ) { val = ini_GetValue( Data ); OfflineFlucht[playerid] = strval( val ); }
if(Kampfstil[playerid] == 1)
{
SetPlayerFightingStyle(playerid,FIGHT_STYLE_NORMAL);
}
if(Kampfstil[playerid] == 2)
{
SetPlayerFightingStyle(playerid,FIGHT_STYLE_BOXING);
}
if(Kampfstil[playerid] == 3)
{
SetPlayerFightingStyle(playerid,FIGHT_STYLE_KUNGFU);
}
if(Kampfstil[playerid] == 4)
{
SetPlayerFightingStyle(playerid,FIGHT_STYLE_KNEEHEAD);
}
if(Kampfstil[playerid] == 5)
{
SetPlayerFightingStyle(playerid,FIGHT_STYLE_GRABKICK);
}
if(Kampfstil[playerid] == 6)
{
SetPlayerFightingStyle(playerid,FIGHT_STYLE_ELBOW);
}
}//end while
fclose(UserFile);//close the file after everything has been read in the while
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
//fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 1)
{
SendClientMessage(playerid,COLOR_GREEN,"Falsches Passwort! [1/4]");
}
if(gPlayerLogTries[playerid] == 2)
{
SendClientMessage(playerid,COLOR_YELLOW,"Falsches Passwort! [2/4]");
}
if(gPlayerLogTries[playerid] == 3)
{
SendClientMessage(playerid,TEAM_ORANGE_COLOR,"Falsches Passwort! [3/4]");
}
if(gPlayerLogTries[playerid] == 4)
{
SendClientMessage(playerid,COLOR_RED,"Falsches Passwort! [4/4]");
Ban(playerid);
}
return 1;
}
LadeLoginSachen(playerid);
}
return 1;
}
//Edit:
Man kriegt auch einen Warning wenn man Spawnt.
Warning Opcode keine ahnung