Jeffry:
Ja Gesperrt ist in der Datei, ich meinte oben aber das da "1" nicht steht sondern 0.
Und hier OnPlayerLogin:
new string2[128];
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 valtmp[256];
valtmp = dini_Get(string2, "Key");
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp), 255);
if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
{
PlayerInfo[playerid][pLevel] = dini_Int(string2, "Level");
PlayerInfo[playerid][pAdmin] = dini_Int(string2, "AdminLevel");
PlayerInfo[playerid][pSupporter] = dini_Int(string2, "Supporter");
PlayerInfo[playerid][pDonateRank] = dini_Int(string2, "DonateRank");
PlayerInfo[playerid][gPupgrade] = dini_Int(string2, "UpgradePoints");
PlayerInfo[playerid][pConnectTime] = dini_Int(string2, "ConnectedTime");
PlayerInfo[playerid][pReg] = dini_Int(string2, "Registered");
PlayerInfo[playerid][pSex] = dini_Int(string2, "Sex");
PlayerInfo[playerid][pAge] = dini_Int(string2, "Age");
PlayerInfo[playerid][pOrigin] = dini_Int(string2, "Origin");
PlayerInfo[playerid][pCK] = dini_Int(string2, "CK");
PlayerInfo[playerid][pMuted] = dini_Int(string2, "Muted");
PlayerInfo[playerid][pExp] = dini_Int(string2, "Respect");
PlayerInfo[playerid][pCash] = dini_Int(string2, "Money");
PlayerInfo[playerid][pAccount] = dini_Int(string2, "Bank");
PlayerInfo[playerid][pPlayerKredit] = dini_Int(string2, "Kredit");
PlayerInfo[playerid][pPlayerKreditDauer] = dini_Int(string2, "KreditDauer");
PlayerInfo[playerid][pCrimes] = dini_Int(string2, "Crimes");
PlayerInfo[playerid][pKills] = dini_Int(string2, "Kills");
PlayerInfo[playerid][pDeaths] = dini_Int(string2, "Deaths");
PlayerInfo[playerid][pArrested] = dini_Int(string2, "Arrested");
PlayerInfo[playerid][pWantedDeaths] = dini_Int(string2, "WantedDeaths");
PlayerInfo[playerid][pPhoneBook] = dini_Int(string2, "Phonebook");
PlayerInfo[playerid][pLottoNr] = dini_Int(string2, "LottoNr");
PlayerInfo[playerid][pFishes] = dini_Int(string2, "Fishes");
PlayerInfo[playerid][pBiggestFish] = dini_Int(string2, "BiggestFish");
PlayerInfo[playerid][pJob] = dini_Int(string2, "Job");
PlayerInfo[playerid][pPayCheck] = dini_Int(string2, "Paycheck");
PlayerInfo[playerid][pHeadValue] = dini_Int(string2, "HeadValue");
PlayerInfo[playerid][pJailed] = dini_Int(string2, "Jailed");
PlayerInfo[playerid][pGangJailed] = dini_Int(string2, "GangJailed");
PlayerInfo[playerid][pMauled] = dini_Int(string2, "Mauled");
PlayerInfo[playerid][pJailTime] = dini_Int(string2, "JailTime");
PlayerInfo[playerid][pMats] = dini_Int(string2, "Materials");
PlayerInfo[playerid][pDrugs] = dini_Int(string2, "Drugs");
PlayerInfo[playerid][pBoxMats] = dini_Int(string2, "BoxMaterials");
PlayerInfo[playerid][pBoxDrugs] = dini_Int(string2, "BoxDrugs");
SetPlayerFightingStyle(playerid, dini_Int(string2, "FightingStyle"));
PlayerInfo[playerid][pLeader] = dini_Int(string2, "Leader");
PlayerInfo[playerid][pMember] = dini_Int(string2, "Member");
PlayerInfo[playerid][pFMember] = dini_Int(string2, "FMember");
PlayerInfo[playerid][pRank] = dini_Int(string2, "Rank");
PlayerInfo[playerid][pChar] = dini_Int(string2, "Char");
PlayerInfo[playerid][pContractTime] = dini_Int(string2, "ContractTime");
PlayerInfo[playerid][pDetSkill] = dini_Int(string2, "DetSkill");
PlayerInfo[playerid][pSexSkill] = dini_Int(string2, "SexSkill");
PlayerInfo[playerid][pBoxSkill] = dini_Int(string2, "BoxSkill");
PlayerInfo[playerid][pLawSkill] = dini_Int(string2, "LawSkill");
PlayerInfo[playerid][pMechSkill] = dini_Int(string2, "MechSkill");
PlayerInfo[playerid][pJackSkill] = dini_Int(string2, "JackSkill");
PlayerInfo[playerid][pCarSkill] = dini_Int(string2, "CarSkill");
PlayerInfo[playerid][pNewsSkill] = dini_Int(string2, "NewsSkill");
PlayerInfo[playerid][pDrugsSkill] = dini_Int(string2, "DrugsSkill");
PlayerInfo[playerid][pCookSkill] = dini_Int(string2, "CookSkill");
PlayerInfo[playerid][pFishSkill] = dini_Int(string2, "pFishSkill");
PlayerInfo[playerid][pSHealth] = dini_Float(string2, "pSHealth");
PlayerInfo[playerid][pHealth] = dini_Float(string2, "pHealth");
PlayerInfo[playerid][pInt] = dini_Int(string2, "pInt");
PlayerInfo[playerid][pLocal] = dini_Int(string2, "pLocal");
PlayerInfo[playerid][pTeam] = dini_Int(string2, "pTeam");
PlayerInfo[playerid][pModel] = dini_Int(string2, "pModel");
PlayerInfo[playerid][pPnumber] = dini_Int(string2, "PhoneNr");
PlayerInfo[playerid][pPhousekey] = dini_Int(string2, "House");
PlayerInfo[playerid][pPbiskey] = dini_Int(string2, "Bizz");
PlayerInfo[playerid][pHandyGeld] = dini_Int(string2, "HandyGeld");
PlayerInfo[playerid][pHandyVer] = dini_Int(string2, "HandyVer");
PlayerInfo[playerid][pPos_x] = dini_Float(string2, "Pos_x");
PlayerInfo[playerid][pPos_y] = dini_Float(string2, "Pos_y");
PlayerInfo[playerid][pPos_z] = dini_Float(string2, "Pos_z");
PlayerInfo[playerid][pCarLic] = dini_Int(string2, "CarLic");
PlayerInfo[playerid][pNewLic] = dini_Int(string2, "NewLic");
PlayerInfo[playerid][pFlyLic] = dini_Int(string2, "FlyLic");
PlayerInfo[playerid][pBoatLic] = dini_Int(string2, "BoatLic");
PlayerInfo[playerid][pFishLic] = dini_Int(string2, "FishLic");
PlayerInfo[playerid][pGunLic] = dini_Int(string2, "GunLic");
PlayerInfo[playerid][pLKWLic] = dini_Int(string2, "LKWLic");
PlayerInfo[playerid][pRollerLic] = dini_Int(string2, "RollerLic");
PlayerInfo[playerid][pMotoLic] = dini_Int(string2, "MotoLic");
PlayerInfo[playerid][pZig] = dini_Int(string2, "Zig");
PlayerInfo[playerid][pKekse] = dini_Int(string2, "Kekse");
PlayerInfo[playerid][pZigSucht] = dini_Int(string2, "ZigSucht");
PlayerInfo[playerid][pGun1] = dini_Int(string2, "Gun1");
PlayerInfo[playerid][pGun2] = dini_Int(string2, "Gun2");
PlayerInfo[playerid][pGun3] = dini_Int(string2, "Gun3");
PlayerInfo[playerid][pGun4] = dini_Int(string2, "Gun4");
PlayerInfo[playerid][pAmmo1] = dini_Int(string2, "Ammo1");
PlayerInfo[playerid][pAmmo2] = dini_Int(string2, "Ammo2");
PlayerInfo[playerid][pAmmo3] = dini_Int(string2, "Ammo3");
PlayerInfo[playerid][pAmmo4] = dini_Int(string2, "Ammo4");
PlayerInfo[playerid][pCarTime] = dini_Int(string2, "CarTime");
PlayerInfo[playerid][pMulltime] = dini_Int(string2, "Mulltime");
PlayerInfo[playerid][pPayDay] = dini_Int(string2, "PayDay");
PlayerInfo[playerid][pPayDayHad] = dini_Int(string2, "PayDayHad");
PlayerInfo[playerid][pCDPlayer] = dini_Int(string2, "CDPlayer");
PlayerInfo[playerid][pWins] = dini_Int(string2, "Wins");
PlayerInfo[playerid][pLoses] = dini_Int(string2, "Loses");
PlayerInfo[playerid][pAlcoholPerk] = dini_Int(string2, "AlcoholPerk");
PlayerInfo[playerid][pDrugPerk] = dini_Int(string2, "DrugPerk");
PlayerInfo[playerid][pMiserPerk] = dini_Int(string2, "MiserPerk");
PlayerInfo[playerid][pPainPerk] = dini_Int(string2, "PainPerk");
PlayerInfo[playerid][pTraderPerk] = dini_Int(string2, "TraderPerk");
PlayerInfo[playerid][pTut] = dini_Int(string2, "Tutorial");
PlayerInfo[playerid][pWarns] = dini_Int(string2, "Warnings");
PlayerInfo[playerid][pAdjustable] = dini_Int(string2, "Adjustable");
PlayerInfo[playerid][pFuel] = dini_Int(string2, "Fuel");
PlayerInfo[playerid][pMarried] = dini_Int(string2, "Married");
PlayerInfo[playerid][pMarriedTo] = dini_Int(string2, "MarriedTo");
SpawnChange[playerid] = dini_Int(string2, "SpawnChange");
WantedLevel[playerid] = dini_Int(string2, "WantedLevel");
WantedLevel[playerid] = dini_Int(string2, "WantedPoints");
PlayerInfo[playerid][pPlayMinutes] = dini_Int(string2, "PlayMinutes");
PlayerInfo[playerid][pGesamtMinutes] = dini_Int(string2, "GesamtMinutes");
PlayerInfo[playerid][pMinutesSinceAn] = dini_Int(string2, "MinutesSinceAn");
OfflineFlucht[playerid] = dini_Int(string2, "Offflucht");
Knast[playerid] = dini_Int(string2, "Knast");
PlayerInfo[playerid][pHandyID] = dini_Int(string2, "Handy");
PlayerInfo[playerid][pUhrID] = dini_Int(string2, "Uhr");
KnastTime[playerid] = dini_Int(string2, "KnastTime");
PlayerInfo[playerid][pOwnPerso] = dini_Int(string2, "Perso");
PlayerInfo[playerid][pFrakSperre] = dini_Int(string2, "FrakSperre");
PlayerInfo[playerid][pGehalt] = dini_Int(string2, "Gehalt");
PlayerInfo[playerid][pInvWeapon] = dini_Int(string2, "InvWeapon");
PlayerInfo[playerid][pInvAmmo] = dini_Int(string2, "InvAmmo");
PlayerInfo[playerid][pInvWeapon2] = dini_Int(string2, "InvWeapon2");
PlayerInfo[playerid][pInvAmmo2] = dini_Int(string2, "InvAmmo2");
PlayerInfo[playerid][pInvMats] = dini_Int(string2, "InvMats");
PlayerInfo[playerid][pInvDrugs] = dini_Int(string2, "InvDrugs");
PlayerInfo[playerid][pFlugTime] = dini_Int(string2, "FlugTime");
PlayerInfo[playerid][pFarmTime] = dini_Int(string2, "FarmTime");
PlayerInfo[playerid][pGDeaths] = dini_Int(string2, "GDeaths");
PlayerInfo[playerid][pGKills] = dini_Int(string2, "GKills");
PlayerInfo[playerid][pGWD] = dini_Float(string2, "GWD");
PlayerInfo[playerid][pMeldung] = dini_Int(string2, "Meldung");
PlayerInfo[playerid][pPtankekey] = dini_Int(string2, "Tanke");
PlayerInfo[playerid][pGesperrt] = dini_Int(string2, "Gesperrt");
PlayerInfo[playerid][Punkte] = dini_Int(string2, "Punkte");
new weapon[14];
new ammo[14];
new tmpstring[128];
for(new i = 1;i< 14;i++)
{
format(tmpstring,sizeof tmpstring, "waffenslot%d",i);
weapon[i-1] = dini_Int(string2, tmpstring);
format(tmpstring,sizeof tmpstring, "ammoslot%d",i);
ammo[i-1] = dini_Int(string2, tmpstring);
GivePlayerWeaponEx(playerid,weapon[i-1],ammo[i-1]);
}
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"{A50000}Login","Das Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
return 1;
}
PlayerInfo[playerid][pAdjustable] = 0;
ResetPlayerMoney(playerid);
ConsumingMoney[playerid] = 1;
GivePlayerMoneyEx(playerid,PlayerInfo[playerid][pCash]);
CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
for(new fs;fs<sizeof(FightSystem);fs++){
GangZoneShowForPlayer(playerid,FightSystem[fs][fsZoneID],GetZoneColorOfFaction(FightSystem[fs][fsOwnerFaction]));
}
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pSHealth] = 0.0;
PlayerInfo[playerid][pHealth] = 99.0;
PlayerInfo[playerid][pPos_x] = 2246.6;
PlayerInfo[playerid][pPos_y] = -1161.9;
PlayerInfo[playerid][pPos_z] = 1029.7;
PlayerInfo[playerid][pInt] = 15;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pModel] = 230;
PlayerInfo[playerid][pPhousekey] = 255;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pReg] = 1;
}
if(PlayerInfo[playerid][pGesperrt] == 1)//PlayerInfo[playerid][pLevel] == -999) //autoban
{
format(string2,sizeof(string2)," %s versucht mit seinem gebannten Account online zu kommen und wurde gekickt!",playername2);
ABroadCast(COLOR_LIGHTRED,string2,1);
SendClientMessage(playerid,COLOR_ROT," Du bist hier gebannt. Schau im Forum für mehr Informationen");
Kick(playerid);
return 1;
}
else if(PlayerInfo[playerid][pCK] > 0)
{
Kick(playerid);
}
printf("%s has logged in.",playername2);
if(PlayerInfo[playerid][pDonateRank] > 0)
{
SendClientMessage(playerid, 0x787878FF,"Willkommen, du besitzt einen Premiumrang");
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
format(string2, sizeof(string2), "Willkommen, du hast den Adminrang %d.",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, 0x787878FF,string2);
}
if(PlayerInfo[playerid][pSupporter] > 0)
{
format(string2, sizeof(string2), "Willkommen, du hast den Supporterrang %d.",PlayerInfo[playerid][pSupporter]);
SendClientMessage(playerid, 0x787878FF,string2);
}
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
if(gTeam[playerid] == 0)
{
gTeam[playerid] = 3;
}
else
{
gTeam[playerid] = PlayerInfo[playerid][pTeam];
}
gPlayerLogged[playerid] = 1;
SpawnPlayer(playerid);
DateProp(playerid);
SendClientMessage(playerid, COLOR_YELLOW4, motd);
}