Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerLogin(playerid,password[])
- {
- if(NaoPodeLogar[playerid] == 1)
- {
- ForceClassSelection(playerid);
- return true;
- }
- new tmp2[256];
- new string2[64];
- format(string2, sizeof(string2), "Contas/%s.ini", PlayerName(playerid));
- if(strcmp(DOF2_GetString(string2,"Key",PlayerInfo[playerid][pKey]),password, false) == 0)
- {
- DOF2_GetInt(string2, "AdminLevel",PlayerInfo[playerid][pAdmin]);
- DOF2_GetInt(string2, "HelperLevel",PlayerInfo[playerid][pHelper]);
- DOF2_GetInt(string2, "DonateRank",PlayerInfo[playerid][pHelper]);
- DOF2_GetInt(string2, "UpgradePoints",PlayerInfo[playerid][gPupgrade]);
- DOF2_GetInt(string2, "AdminLevel",PlayerInfo[playerid][pAdmin]);
- DOF2_GetInt(string2, "ConnectedTime",PlayerInfo[playerid][pConnectTime]);
- DOF2_GetInt(string2, "Registered",PlayerInfo[playerid][pReg]);
- DOF2_GetInt(string2, "Sex",PlayerInfo[playerid][pSex]);
- DOF2_GetInt(string2, "Muted",PlayerInfo[playerid][pMuted]);
- DOF2_GetInt(string2, "Respect",PlayerInfo[playerid][pExp]);
- DOF2_GetInt(string2, "Money",PlayerInfo[playerid][pCash]);
- DOF2_GetInt(string2, "Bank",PlayerInfo[playerid][pConta]);
- DOF2_GetInt(string2, "Crimes",PlayerInfo[playerid][pCrimes]);
- DOF2_GetInt(string2, "Kills",PlayerInfo[playerid][pKills]);
- DOF2_GetInt(string2, "Deaths",PlayerInfo[playerid][pDeaths]);
- DOF2_GetInt(string2, "Phonebook",PlayerInfo[playerid][pPhoneBook]);
- DOF2_GetInt(string2, "LottoNr",PlayerInfo[playerid][pLottoNr]);
- DOF2_GetInt(string2, "Emprego",PlayerInfo[playerid][pEmprego]);
- DOF2_GetInt(string2, "Paycheck",PlayerInfo[playerid][pSalario]);
- DOF2_GetInt(string2, "HeadValue",PlayerInfo[playerid][pHeadValue]);
- DOF2_GetInt(string2, "HeadValueT",PlayerInfo[playerid][pHeadValueT]);
- DOF2_GetInt(string2, "Jailed",PlayerInfo[playerid][pJailed]);
- DOF2_GetInt(string2, "JailTime",PlayerInfo[playerid][pJailed]);
- DOF2_GetInt(string2, "Capacete",PlayerInfo[playerid][pCapacete]);
- DOF2_GetInt(string2, "Materiais",PlayerInfo[playerid][pMats]);
- DOF2_GetInt(string2, "Maconha",PlayerInfo[playerid][pDrogas]);
- DOF2_GetInt(string2, "Cocaina",PlayerInfo[playerid][pDrogas2]);
- DOF2_GetInt(string2, "Crack",PlayerInfo[playerid][pDrogas3]);
- DOF2_GetInt(string2, "Lider",PlayerInfo[playerid][pLider]);
- DOF2_GetInt(string2, "Member",PlayerInfo[playerid][pMembro]);
- DOF2_GetInt(string2, "Rank",PlayerInfo[playerid][pCargo]);
- DOF2_GetInt(string2, "Char",PlayerInfo[playerid][pSkin]);
- DOF2_GetInt(string2, "origin",PlayerInfo[playerid][pOrigem]);
- DOF2_GetInt(string2, "ContractTime",PlayerInfo[playerid][pContractTime]);
- DOF2_GetInt(string2, "DetSkill",PlayerInfo[playerid][pDetSkill]);
- DOF2_GetInt(string2, "SexSkill",PlayerInfo[playerid][pSexSkill]);
- DOF2_GetInt(string2, "BoxSkill",PlayerInfo[playerid][pBoxSkill]);
- DOF2_GetInt(string2, "LawSkill",PlayerInfo[playerid][pLawSkill]);
- DOF2_GetInt(string2, "MechSkill",PlayerInfo[playerid][pMechSkill]);
- DOF2_GetInt(string2, "NewsSkill",PlayerInfo[playerid][pNewsSkill]);
- DOF2_GetInt(string2, "DrogasSkill",PlayerInfo[playerid][pDrogasSkill]);
- DOF2_GetInt(string2, "CookSkill",PlayerInfo[playerid][pCookSkill]);
- DOF2_GetInt(string2, "pSHealth",PlayerInfo[playerid][pSHealth]);
- DOF2_GetInt(string2, "Team",PlayerInfo[playerid][pTeam]);
- DOF2_GetInt(string2, "PhoneNr",PlayerInfo[playerid][pPnumber]);
- DOF2_GetInt(string2, "House",PlayerInfo[playerid][pPHousekey]);
- DOF2_GetInt(string2, "Bizz",PlayerInfo[playerid][pPbiskey]);
- DOF2_GetInt(string2, "Pos_x",PlayerInfo[playerid][pPos_x]);
- DOF2_GetInt(string2, "Pos_y",PlayerInfo[playerid][pPos_y]);
- DOF2_GetInt(string2, "Pos_z",PlayerInfo[playerid][pPos_z]);
- DOF2_GetInt(string2, "CarLic",PlayerInfo[playerid][pCarLic]);
- DOF2_GetInt(string2, "FlyLic",PlayerInfo[playerid][pFlyLic]);
- DOF2_GetInt(string2, "BoatLic",PlayerInfo[playerid][pBoatLic]);
- DOF2_GetInt(string2, "GunLic",PlayerInfo[playerid][pGunLic]);
- DOF2_GetInt(string2, "PayDay",PlayerInfo[playerid][pPayDay]);
- DOF2_GetInt(string2, "CDPlayer",PlayerInfo[playerid][pCDPlayer]);
- DOF2_GetInt(string2, "Wins",PlayerInfo[playerid][pWins]);
- DOF2_GetInt(string2, "Loses",PlayerInfo[playerid][pLoses]);
- DOF2_GetInt(string2, "AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
- DOF2_GetInt(string2, "DrugPerk",PlayerInfo[playerid][pDrugPerk]);
- DOF2_GetInt(string2, "MiserPerk",PlayerInfo[playerid][pMiserPerk]);
- DOF2_GetInt(string2, "PainPerk",PlayerInfo[playerid][pPainPerk]);
- DOF2_GetInt(string2, "TraderPerk",PlayerInfo[playerid][pTraderPerk]);
- DOF2_GetInt(string2, "Tutorial",PlayerInfo[playerid][pTut]);
- DOF2_GetInt(string2, "Avisos",PlayerInfo[playerid][pWarns]);
- DOF2_GetInt(string2, "Married",PlayerInfo[playerid][pMarried]);
- DOF2_GetInt(string2, "MarriedTo",PlayerInfo[playerid][pMarriedTo]);
- DOF2_GetInt(string2, "Spawn",PlayerInfo[playerid][pSpawn]);
- DOF2_GetInt(string2, "SafeMaconha",PlayerInfo[playerid][pSafeDrogas]);
- DOF2_GetInt(string2, "pSafeDrogas2",PlayerInfo[playerid][pSafeDrogas2]);
- DOF2_GetInt(string2, "SafeCrack",PlayerInfo[playerid][pSafeDrogas3]);
- DOF2_GetInt(string2, "NivelProcurado",WantedPoints[playerid]);
- DOF2_GetInt(string2, "SafeMateriais",PlayerInfo[playerid][psMats]);
- DOF2_GetInt(string2, "TestVip",PlayerInfo[playerid][pTimeVIP]);
- DOF2_GetInt(string2, "Luta",PlayerInfo[playerid][pLuta]);
- DOF2_GetInt(string2, "Dorgado",PlayerInfo[playerid][pDorgado]);
- DOF2_GetInt(string2, "Dorgado2",PlayerInfo[playerid][pDorgado2]);
- DOF2_GetInt(string2, "Doenca",PlayerInfo[playerid][pDoenca]);
- DOF2_GetInt(string2, "Creditos",PlayerInfo[playerid][pCreditos]);
- DOF2_GetInt(string2, "LU",PlayerInfo[playerid][pLastLogin]);
- DOF2_GetInt(string2, "Ban",PlayerInfo[playerid][pBan]);
- DOF2_GetInt(string2, "Age",PlayerInfo[playerid][pAge]);
- DOF2_GetInt(string2, "Ouros",PlayerInfo[playerid][pOuros]);
- DOF2_GetInt(string2, "Avisado",PlayerInfo[playerid][pAviso]);
- DOF2_GetInt(string2, "Fome",PlayerInfo[playerid][pFome]);
- DOF2_GetInt(string2, "Velocimetro",PlayerInfo[playerid][pVelocimetro]);
- DOF2_GetInt(string2, "PegouVIP",PlayerInfo[playerid][pPVIP]);
- DOF2_GetInt(string2, "DiasBanTemp",PlayerInfo[playerid][pDiaBanTemp]);
- DOF2_GetInt(string2, "MesBanTemp",PlayerInfo[playerid][pMesBanTemp]);
- DOF2_GetInt(string2, "AnoBanTemp",PlayerInfo[playerid][pAnoBanTemp]);
- DOF2_GetInt(string2, "DiasVIP",PlayerInfo[playerid][pDiaVIP]);
- DOF2_GetInt(string2, "MesVIP",PlayerInfo[playerid][pAnoVIP]);
- DOF2_GetInt(string2, "AnoVIP",PlayerInfo[playerid][pAviso]);
- DOF2_GetInt(string2, "AdminAgendou",PlayerInfo[playerid][pAdminAgendou]);
- DOF2_GetInt(string2, "MotivoAgendou",PlayerInfo[playerid][pMotivoAgendou]);
- DOF2_GetInt(string2, "Agendado",PlayerInfo[playerid][pAgendado]);
- DOF2_GetInt(string2, "TempoAgendado",PlayerInfo[playerid][pTempoAgendado]);
- DOF2_GetInt(string2, "TempoHospital",PlayerInfo[playerid][pTempoHospitalizado]);
- DOF2_GetInt(string2, "HospitalID",PlayerInfo[playerid][pHospitalID]);
- logouagora[playerid] = 1;
- CheckOwner(playerid);
- CheckOwnerb(playerid);
- CheckOwnerh(playerid);
- }
- else
- {
- new plrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- getdate(Ano, Mes, Dia);
- SendClientMessage(playerid, -1, "[SERVIDOR] Mal vindo ao meu servidor %s[%02d] último login:%s Administrador:%s",PlayerName(playerid),playerid,DOF2_GetInt(string2, "LU"),(PlayerInfo[playerid][pAdmin] > 1) ? ("Sim") : ("Não"));
- SendClientMessage(playerid, COLOR_WHITE, "Sua senha não esta combinando com seu nick, se errar 5 Vezes será banido do servidor");
- SetPlayerCameraPos( playerid, -2864.7883, 264.9134, 23.1133 );
- SetPlayerCameraLookAt( playerid, -2864.4394, 254.9195, 20.8638 );
- XXAirBreak[playerid] += 3;SetPlayerPos(playerid, -2870.0090,272.1401,5.6831);
- SetPlayerInterior(playerid, 0);
- format(gstring,128,"*** Bem vindo novamente %s ***\n*** Você esta registrado ***\n*** Digite sua senha para logar ***",PlayerName(playerid));
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Logando...",gstring, "Logar", "Sair");
- TextDrawShowForPlayer(playerid, entrada);
- TextDrawShowForPlayer(playerid, entrada2);
- gPlayerLogTries[playerid] += 1;
- if(gPlayerLogTries[playerid] == 5)
- {
- new stri[64], tmp[20], tmp3[20], ip[16];
- GetPlayerIp(playerid, ip, sizeof ip);
- format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
- getdate(Ano, Mes, Dia);
- format(tmp, 20, "%d/%d/%d", Dia, Mes, Ano);
- gettime(Hora, Minuto, Segundo);
- format(tmp3, 20, "%d:%ud:%d", Hora, Minuto, Segundo);
- format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
- DOF2_CreateFile(stri);
- DOF2_SetString(stri,"Motivo","Errou a senha 5 vezes");
- DOF2_SetString(stri,"Admin","Automatico");
- DOF2_SetString(stri,"Data",tmp);
- DOF2_SetString(stri,"Hora",tmp3);
- DOF2_SetString(stri,"Nick",PlayerName(playerid));
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement