public OnPlayerLogin(playerid,password[])
{
new string2[128], keystring[256], string[256];
format(string2, sizeof(string2), "users/%s.ini", PlayerName(playerid));
keystring = DOF2_GetString(string2, "Key");
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
if(strcmp(keystring, password, true) == 0) {
PlayerInfo[playerid][pCash] = DOF2_GetInt(string2,"Cash");
PlayerInfo[playerid][pAccount] = DOF2_GetInt(string2,"Account");
PlayerInfo[playerid][pAdmin] = DOF2_GetInt(string2,"AdminLevel");
PlayerInfo[playerid][pLevel] = DOF2_GetInt(string2,"Level");
PlayerInfo[playerid][pExp] = DOF2_GetInt(string2,"Respect");
PlayerInfo[playerid][gPupgrade] = DOF2_GetInt(string2,"UpgradePoints");
PlayerInfo[playerid][pKills] = DOF2_GetInt(string2,"Kills");
PlayerInfo[playerid][pSHealth] = DOF2_GetFloat(string2,"pSHealth");
PlayerInfo[playerid][pHealth] = DOF2_GetFloat(string2,"Health");
PlayerInfo[playerid][pPos_x] = DOF2_GetFloat(string2,"Pos_x");
PlayerInfo[playerid][pPos_y] = DOF2_GetFloat(string2,"Pos_y");
PlayerInfo[playerid][pPos_z] = DOF2_GetFloat(string2,"Pos_z");
PlayerInfo[playerid][pInt] = DOF2_GetInt(string2,"Int");
PlayerInfo[playerid][pLocal] = DOF2_GetInt(string2,"Local");
PlayerInfo[playerid][pTeam] = DOF2_GetInt(string2,"Team");
PlayerInfo[playerid][pModel] = DOF2_GetInt(string2,"Char");
PlayerInfo[playerid][pPnumber] = DOF2_GetInt(string2,"PhoneNr");
PlayerInfo[playerid][pHousekey] = DOF2_GetInt(string2,"pHouseKey");
PlayerInfo[playerid][pPbiskey] = DOF2_GetInt(string2,"Bizz");
PlayerInfo[playerid][pBanned] = DOF2_GetInt(string2,"Banned");
PlayerInfo[playerid][pFightSkill] = DOF2_GetInt(string2,"FightSkill");
PlayerInfo[playerid][pSex] = DOF2_GetInt(string2,"Sex");
PlayerInfo[playerid][pAge] = DOF2_GetInt(string2,"Age");
PlayerInfo[playerid][pTut] = DOF2_GetInt(string2,"Tutorial");
PlayerInfo[playerid][pMember] = DOF2_GetInt(string2,"Member");
PlayerInfo[playerid][pRank] = DOF2_GetInt(string2,"Rank");
PlayerInfo[playerid][pGun1] = DOF2_GetInt(string2,"Gun1");
PlayerInfo[playerid][pAmmo1] = DOF2_GetInt(string2,"Ammo1");
PlayerInfo[playerid][pGun2] = DOF2_GetInt(string2,"Gun2");
PlayerInfo[playerid][pAmmo2] = DOF2_GetInt(string2,"Ammo2");
PlayerInfo[playerid][pCrashed] = DOF2_GetInt(string2,"Crashed");
if(PlayerInfo[playerid][pCrashed]==1) {
PlayerInfo[playerid][pGun1] = DOF2_GetInt(string2,"Gun1");
PlayerInfo[playerid][pGun2] = DOF2_GetInt(string2,"Gun2");
PlayerInfo[playerid][pGun3] = DOF2_GetInt(string2,"Gun3");
PlayerInfo[playerid][pGun4] = DOF2_GetInt(string2,"Gun4");
PlayerInfo[playerid][pGun5] = DOF2_GetInt(string2,"Gun5");
PlayerInfo[playerid][pGun6] = DOF2_GetInt(string2,"Gun6");
PlayerInfo[playerid][pGun7] = DOF2_GetInt(string2,"Gun7");
PlayerInfo[playerid][pGun8] = DOF2_GetInt(string2,"Gun8");
PlayerInfo[playerid][pGun9] = DOF2_GetInt(string2,"Gun9");
PlayerInfo[playerid][pGun10] = DOF2_GetInt(string2,"Gun10");
PlayerInfo[playerid][pGun11] = DOF2_GetInt(string2,"Gun11");
PlayerInfo[playerid][pGun12] = DOF2_GetInt(string2,"Gun12");
PlayerInfo[playerid][pGun13] = DOF2_GetInt(string2,"Gun13");
PlayerInfo[playerid][pAmmo1] = DOF2_GetInt(string2,"Ammo1");
PlayerInfo[playerid][pAmmo2] = DOF2_GetInt(string2,"Ammo2");
PlayerInfo[playerid][pAmmo3] = DOF2_GetInt(string2,"Ammo3");
PlayerInfo[playerid][pAmmo4] = DOF2_GetInt(string2,"Ammo4");
PlayerInfo[playerid][pAmmo5] = DOF2_GetInt(string2,"Ammo5");
PlayerInfo[playerid][pAmmo6] = DOF2_GetInt(string2,"Ammo6");
PlayerInfo[playerid][pAmmo7] = DOF2_GetInt(string2,"Ammo7");
PlayerInfo[playerid][pAmmo8] = DOF2_GetInt(string2,"Ammo8");
PlayerInfo[playerid][pAmmo9] = DOF2_GetInt(string2,"Ammo9");
PlayerInfo[playerid][pAmmo10] = DOF2_GetInt(string2,"Ammo10");
PlayerInfo[playerid][pAmmo11] = DOF2_GetInt(string2,"Ammo11");
PlayerInfo[playerid][pAmmo12] = DOF2_GetInt(string2,"Ammo12");
PlayerInfo[playerid][pAmmo13] = DOF2_GetInt(string2,"Ammo13");
}
PlayerInfo[playerid][pJob] = DOF2_GetInt(string2,"Job");
PlayerInfo[playerid][pPayCheck] = DOF2_GetInt(string2,"PayCheck");
PlayerInfo[playerid][pPayDay] = DOF2_GetInt(string2,"PayDay");
PlayerInfo[playerid][pDonateRank] = DOF2_GetInt(string2,"DonateRank");
PlayerInfo[playerid][pConnectTime] = DOF2_GetInt(string2,"ConnectTime");
PlayerInfo[playerid][pDonateTime] = DOF2_GetInt(string2,"DonateTime");
PlayerInfo[playerid][pJailed] = DOF2_GetInt(string2,"Jailed");
PlayerInfo[playerid][pJailTime] = DOF2_GetInt(string2,"JailTime");
PlayerInfo[playerid][pDrugs] = DOF2_GetInt(string2,"Drugs");
PlayerInfo[playerid][pMats] = DOF2_GetInt(string2,"Materials");
PlayerInfo[playerid][pVaultOwned] = DOF2_GetInt(string2,"VaultOwned");
PlayerInfo[playerid][pVaultDrugs] = DOF2_GetInt(string2,"VaultDrugs");
PlayerInfo[playerid][pVaultMats] = DOF2_GetInt(string2,"VaultMats");
PlayerInfo[playerid][pWatch] = DOF2_GetInt(string2,"Watch");
PlayerInfo[playerid][pPhoneBook] = DOF2_GetInt(string2,"PhoneBook");
PlayerInfo[playerid][pDrivLic] = DOF2_GetInt(string2,"CarLic");
PlayerInfo[playerid][pCarkey] = DOF2_GetInt(string2,"Car");
PlayerInfo[playerid][pCarkey2] = DOF2_GetInt(string2,"Car2");
PlayerInfo[playerid][pCarkey3] = DOF2_GetInt(string2,"Car3");
PlayerInfo[playerid][pMarried] = DOF2_GetInt(string2,"Married");
PlayerInfo[playerid][pHelper] = DOF2_GetInt(string2,"Helper");
WantedLevel[playerid] = DOF2_GetInt(string2,"WantedLevel");
PlayerInfo[playerid][pGunLic] = DOF2_GetInt(string2,"GunLic");
PlayerInfo[playerid][pCrimes] = DOF2_GetInt(string2,"Crimes");
PlayerInfo[playerid][pArrested] = DOF2_GetInt(string2,"Arrested");
string = DOF2_GetString(string2, "MarriedTo");
strmid(PlayerInfo[playerid][pMarriedTo], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Taunt");
strmid(PlayerInfo[playerid][pTaunt], string, 0, strlen(string), 255);
PlayerInfo[playerid][pInvWeapon] = DOF2_GetInt(string2,"InvWeapon");
PlayerInfo[playerid][pInvAmmo] = DOF2_GetInt(string2,"InvAmmo");
PlayerInfo[playerid][pCaseDrugs] = DOF2_GetInt(string2,"CaseDrugs");
PlayerInfo[playerid][pCaseMats] = DOF2_GetInt(string2,"CaseMats");
PlayerInfo[playerid][pInvBeer] = DOF2_GetInt(string2,"InvBeer");
PlayerInfo[playerid][pInvWine] = DOF2_GetInt(string2,"InvWine");
PlayerInfo[playerid][pInvCiggy] = DOF2_GetInt(string2,"InvCiggy");
PlayerInfo[playerid][pHidden] = DOF2_GetInt(string2,"Hidden");
PlayerInfo[playerid][pWalkie] = DOF2_GetInt(string2,"Walkie");
PlayerInfo[playerid][pWalkieFreq] = DOF2_GetInt(string2,"WalkieFreq");
PlayerInfo[playerid][pLighter] = DOF2_GetInt(string2,"Lighter");
PlayerInfo[playerid][pCigs] = DOF2_GetInt(string2,"Cigs");
string = DOF2_GetString(string2, "BanReason");
strmid(PlayerInfo[playerid][pBanReason], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Fishes1");
strmid(PlayerInfo[playerid][pFishes1], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Fishes2");
strmid(PlayerInfo[playerid][pFishes2], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Fishes3");
strmid(PlayerInfo[playerid][pFishes3], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Fishes4");
strmid(PlayerInfo[playerid][pFishes4], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Fishes5");
strmid(PlayerInfo[playerid][pFishes5], string, 0, strlen(string), 255);
PlayerInfo[playerid][pFish][0] = DOF2_GetInt(string2,"Fish1");
PlayerInfo[playerid][pFish][1] = DOF2_GetInt(string2,"Fish2");
PlayerInfo[playerid][pFish][2] = DOF2_GetInt(string2,"Fish3");
PlayerInfo[playerid][pFish][3] = DOF2_GetInt(string2,"Fish4");
PlayerInfo[playerid][pFish][4] = DOF2_GetInt(string2,"Fish5");
PlayerInfo[playerid][pNote1s] = DOF2_GetInt(string2,"Note1s");
PlayerInfo[playerid][pNote2s] = DOF2_GetInt(string2,"Note2s");
PlayerInfo[playerid][pNote3s] = DOF2_GetInt(string2,"Note3s");
PlayerInfo[playerid][pNote4s] = DOF2_GetInt(string2,"Note4s");
PlayerInfo[playerid][pNote5s] = DOF2_GetInt(string2,"Note5s");
string = DOF2_GetString(string2, "Note1");
strmid(PlayerInfo[playerid][pNote1], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Note2");
strmid(PlayerInfo[playerid][pNote2], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Note3");
strmid(PlayerInfo[playerid][pNote3], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Note4");
strmid(PlayerInfo[playerid][pNote4], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "Note5");
strmid(PlayerInfo[playerid][pNote5], string, 0, strlen(string), 255);
JobDelay[playerid] = DOF2_GetInt(string2,"JobDelay");
string = DOF2_GetString(string2, "Accent");
strmid(PlayerInfo[playerid][pAccent], string, 0, strlen(string), 255);
PlayerInfo[playerid][pVoted] = DOF2_GetInt(string2,"Voted2");
string = DOF2_GetString(string2, "AdmName");
strmid(PlayerInfo[playerid][pAdmName], string, 0, strlen(string), 255);
PlayerInfo[playerid][pHeadValue] = DOF2_GetInt(string2,"HeadValue");
PlayerInfo[playerid][pHiddenNum] = DOF2_GetInt(string2,"HiddenNum");
PlayerInfo[playerid][pSkate] = DOF2_GetInt(string2,"Skate");
PlayerInfo[playerid][pRadio] = DOF2_GetInt(string2,"Radio");
PlayerInfo[playerid][pTicket][0] = DOF2_GetInt(string2,"Ticket0");
PlayerInfo[playerid][pTicket][1] = DOF2_GetInt(string2,"Ticket1");
PlayerInfo[playerid][pTicket][2] = DOF2_GetInt(string2,"Ticket2");
PlayerInfo[playerid][pTicket][3] = DOF2_GetInt(string2,"Ticket3");
PlayerInfo[playerid][pTicket][4] = DOF2_GetInt(string2,"Ticket4");
string = DOF2_GetString(string2, "TicketReason0");
strmid(PlayerInfo[playerid][pTicketReason0], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "TicketReason1");
strmid(PlayerInfo[playerid][pTicketReason1], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "TicketReason2");
strmid(PlayerInfo[playerid][pTicketReason2], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "TicketReason3");
strmid(PlayerInfo[playerid][pTicketReason3], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "TicketReason4");
strmid(PlayerInfo[playerid][pTicketReason4], string, 0, strlen(string), 255);
string = DOF2_GetString(string2, "App");
strmid(PlayerInfo[playerid][pApp], string, 0, strlen(string), 255);
PlayerInfo[playerid][pChanges] = DOF2_GetInt(string2,"Changes");
PlayerInfo[playerid][pFamNum] = DOF2_GetInt(string2,"FamNum");
string = DOF2_GetString(string2, "Tattoo");
strmid(PlayerInfo[playerid][pTattoo], string, 0, strlen(string), 255);
PlayerInfo[playerid][pCellphone] = DOF2_GetInt(string2,"Cellphone");
PlayerInfo[playerid][pCelltime] = DOF2_GetInt(string2,"Celltime");
PlayerInfo[playerid][pCellplan] = DOF2_GetInt(string2,"Cellplan");
PlayerInfo[playerid][pDonerGate1] = DOF2_GetInt(string2,"DonerGate1");
BreakAllow[playerid] = DOF2_GetInt(string2,"BreakAllow");
PlayerInfo[playerid][pFurnLocked] = DOF2_GetInt(string2,"FurnLocked");
PlayerInfo[playerid][pDonatorCarDate] = DOF2_GetInt(string2,"DonateCarDate");
PlayerInfo[playerid][pWarrant] = DOF2_GetInt(string2,"Warrant");
PlayerInfo[playerid][pLockTime] = DOF2_GetInt(string2,"LockTime");
string = DOF2_GetString(string2, "WarrentReason");
PlayerInfo[playerid][pFactionIden] = DOF2_GetInt(string2,"FactionIdent");
strmid(PlayerInfo[playerid][pWarrantReason], string, 0, strlen(string), 255);
if(PlayerInfo[playerid][pCrashed] != 0) {
HouseEntered[playerid] = DOF2_GetInt(string2,"HouseEntered");
IntEntered[playerid] = DOF2_GetInt(string2,"IntEntered");
PlayerInfo[playerid][pWorld] = DOF2_GetInt(string2,"World");
PlayerInfo[playerid][pCrashArmour] = DOF2_GetFloat(string2,"CrashArmour");
PlayerInfo[playerid][pCrashHealth] = DOF2_GetFloat(string2,"CrashHealth");
PlayerInfo[playerid][pMask] = DOF2_GetInt(string2,"Mask");
PlayerInfo[playerid][pMaskUse] = DOF2_GetInt(string2,"MaskUse");
}
if(PlayerInfo[playerid][pDonateRank] != 0) {
PlayerInfo[playerid][pMask] = DOF2_GetInt(string2,"Mask");
}
}
else {
if(WrongPass[playerid] < 5)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "[ERROR]: Invalid Password.");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login!", "Welcome back.\n\nPlease enter your password below to login.", "Login", "Cancel");
WrongPass[playerid]++;
}
else
{
BanEx(playerid,"Wrong Password");
WrongPass[playerid] = 0;
}
return 1;
}
When someone logs in ( by dialog or /login ), the server is crashing ( on Volt-Host. ).
When someone logs in on my homehosted server, the server isn't crashed, and using same files. OnPlayerLogin function : pawn Код:
|
make sure you have sended to your server a folder called "users" in the "scriptfiles" folder
and why are you banning the player for typing 5 times wrong the password? o.0 |
He is banning the player when he inputs a wrong password 5 times in a row.
You could have missed some file or folder, or volt host is not using Windows. |