Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.66 KB | None | 0 0
  1. public OnPlayerLogin(playerid,password[])
  2. {
  3. if(NaoPodeLogar[playerid] == 1)
  4. {
  5.  
  6. ForceClassSelection(playerid);
  7. return true;
  8. }
  9. new tmp2[256];
  10. new string2[64];
  11. format(string2, sizeof(string2), "Contas/%s.ini", PlayerName(playerid));
  12.  
  13. if(strcmp(DOF2_GetString(string2,"Key",PlayerInfo[playerid][pKey]),password, false) == 0)
  14. {
  15.  
  16.  
  17. DOF2_GetInt(string2, "AdminLevel",PlayerInfo[playerid][pAdmin]);
  18. DOF2_GetInt(string2, "HelperLevel",PlayerInfo[playerid][pHelper]);
  19. DOF2_GetInt(string2, "DonateRank",PlayerInfo[playerid][pHelper]);
  20. DOF2_GetInt(string2, "UpgradePoints",PlayerInfo[playerid][gPupgrade]);
  21. DOF2_GetInt(string2, "AdminLevel",PlayerInfo[playerid][pAdmin]);
  22. DOF2_GetInt(string2, "ConnectedTime",PlayerInfo[playerid][pConnectTime]);
  23. DOF2_GetInt(string2, "Registered",PlayerInfo[playerid][pReg]);
  24. DOF2_GetInt(string2, "Sex",PlayerInfo[playerid][pSex]);
  25. DOF2_GetInt(string2, "Muted",PlayerInfo[playerid][pMuted]);
  26. DOF2_GetInt(string2, "Respect",PlayerInfo[playerid][pExp]);
  27. DOF2_GetInt(string2, "Money",PlayerInfo[playerid][pCash]);
  28. DOF2_GetInt(string2, "Bank",PlayerInfo[playerid][pConta]);
  29. DOF2_GetInt(string2, "Crimes",PlayerInfo[playerid][pCrimes]);
  30. DOF2_GetInt(string2, "Kills",PlayerInfo[playerid][pKills]);
  31. DOF2_GetInt(string2, "Deaths",PlayerInfo[playerid][pDeaths]);
  32. DOF2_GetInt(string2, "Phonebook",PlayerInfo[playerid][pPhoneBook]);
  33. DOF2_GetInt(string2, "LottoNr",PlayerInfo[playerid][pLottoNr]);
  34. DOF2_GetInt(string2, "Emprego",PlayerInfo[playerid][pEmprego]);
  35. DOF2_GetInt(string2, "Paycheck",PlayerInfo[playerid][pSalario]);
  36. DOF2_GetInt(string2, "HeadValue",PlayerInfo[playerid][pHeadValue]);
  37. DOF2_GetInt(string2, "HeadValueT",PlayerInfo[playerid][pHeadValueT]);
  38. DOF2_GetInt(string2, "Jailed",PlayerInfo[playerid][pJailed]);
  39. DOF2_GetInt(string2, "JailTime",PlayerInfo[playerid][pJailed]);
  40. DOF2_GetInt(string2, "Capacete",PlayerInfo[playerid][pCapacete]);
  41. DOF2_GetInt(string2, "Materiais",PlayerInfo[playerid][pMats]);
  42. DOF2_GetInt(string2, "Maconha",PlayerInfo[playerid][pDrogas]);
  43. DOF2_GetInt(string2, "Cocaina",PlayerInfo[playerid][pDrogas2]);
  44. DOF2_GetInt(string2, "Crack",PlayerInfo[playerid][pDrogas3]);
  45. DOF2_GetInt(string2, "Lider",PlayerInfo[playerid][pLider]);
  46. DOF2_GetInt(string2, "Member",PlayerInfo[playerid][pMembro]);
  47. DOF2_GetInt(string2, "Rank",PlayerInfo[playerid][pCargo]);
  48. DOF2_GetInt(string2, "Char",PlayerInfo[playerid][pSkin]);
  49. DOF2_GetInt(string2, "origin",PlayerInfo[playerid][pOrigem]);
  50. DOF2_GetInt(string2, "ContractTime",PlayerInfo[playerid][pContractTime]);
  51. DOF2_GetInt(string2, "DetSkill",PlayerInfo[playerid][pDetSkill]);
  52. DOF2_GetInt(string2, "SexSkill",PlayerInfo[playerid][pSexSkill]);
  53. DOF2_GetInt(string2, "BoxSkill",PlayerInfo[playerid][pBoxSkill]);
  54. DOF2_GetInt(string2, "LawSkill",PlayerInfo[playerid][pLawSkill]);
  55. DOF2_GetInt(string2, "MechSkill",PlayerInfo[playerid][pMechSkill]);
  56. DOF2_GetInt(string2, "NewsSkill",PlayerInfo[playerid][pNewsSkill]);
  57. DOF2_GetInt(string2, "DrogasSkill",PlayerInfo[playerid][pDrogasSkill]);
  58. DOF2_GetInt(string2, "CookSkill",PlayerInfo[playerid][pCookSkill]);
  59. DOF2_GetInt(string2, "pSHealth",PlayerInfo[playerid][pSHealth]);
  60. DOF2_GetInt(string2, "Team",PlayerInfo[playerid][pTeam]);
  61. DOF2_GetInt(string2, "PhoneNr",PlayerInfo[playerid][pPnumber]);
  62. DOF2_GetInt(string2, "House",PlayerInfo[playerid][pPHousekey]);
  63. DOF2_GetInt(string2, "Bizz",PlayerInfo[playerid][pPbiskey]);
  64. DOF2_GetInt(string2, "Pos_x",PlayerInfo[playerid][pPos_x]);
  65. DOF2_GetInt(string2, "Pos_y",PlayerInfo[playerid][pPos_y]);
  66. DOF2_GetInt(string2, "Pos_z",PlayerInfo[playerid][pPos_z]);
  67. DOF2_GetInt(string2, "CarLic",PlayerInfo[playerid][pCarLic]);
  68. DOF2_GetInt(string2, "FlyLic",PlayerInfo[playerid][pFlyLic]);
  69. DOF2_GetInt(string2, "BoatLic",PlayerInfo[playerid][pBoatLic]);
  70. DOF2_GetInt(string2, "GunLic",PlayerInfo[playerid][pGunLic]);
  71. DOF2_GetInt(string2, "PayDay",PlayerInfo[playerid][pPayDay]);
  72. DOF2_GetInt(string2, "CDPlayer",PlayerInfo[playerid][pCDPlayer]);
  73. DOF2_GetInt(string2, "Wins",PlayerInfo[playerid][pWins]);
  74. DOF2_GetInt(string2, "Loses",PlayerInfo[playerid][pLoses]);
  75. DOF2_GetInt(string2, "AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
  76. DOF2_GetInt(string2, "DrugPerk",PlayerInfo[playerid][pDrugPerk]);
  77. DOF2_GetInt(string2, "MiserPerk",PlayerInfo[playerid][pMiserPerk]);
  78. DOF2_GetInt(string2, "PainPerk",PlayerInfo[playerid][pPainPerk]);
  79. DOF2_GetInt(string2, "TraderPerk",PlayerInfo[playerid][pTraderPerk]);
  80. DOF2_GetInt(string2, "Tutorial",PlayerInfo[playerid][pTut]);
  81. DOF2_GetInt(string2, "Avisos",PlayerInfo[playerid][pWarns]);
  82. DOF2_GetInt(string2, "Married",PlayerInfo[playerid][pMarried]);
  83. DOF2_GetInt(string2, "MarriedTo",PlayerInfo[playerid][pMarriedTo]);
  84. DOF2_GetInt(string2, "Spawn",PlayerInfo[playerid][pSpawn]);
  85. DOF2_GetInt(string2, "SafeMaconha",PlayerInfo[playerid][pSafeDrogas]);
  86. DOF2_GetInt(string2, "pSafeDrogas2",PlayerInfo[playerid][pSafeDrogas2]);
  87. DOF2_GetInt(string2, "SafeCrack",PlayerInfo[playerid][pSafeDrogas3]);
  88. DOF2_GetInt(string2, "NivelProcurado",WantedPoints[playerid]);
  89. DOF2_GetInt(string2, "SafeMateriais",PlayerInfo[playerid][psMats]);
  90. DOF2_GetInt(string2, "TestVip",PlayerInfo[playerid][pTimeVIP]);
  91. DOF2_GetInt(string2, "Luta",PlayerInfo[playerid][pLuta]);
  92. DOF2_GetInt(string2, "Dorgado",PlayerInfo[playerid][pDorgado]);
  93. DOF2_GetInt(string2, "Dorgado2",PlayerInfo[playerid][pDorgado2]);
  94. DOF2_GetInt(string2, "Doenca",PlayerInfo[playerid][pDoenca]);
  95. DOF2_GetInt(string2, "Creditos",PlayerInfo[playerid][pCreditos]);
  96. DOF2_GetInt(string2, "LU",PlayerInfo[playerid][pLastLogin]);
  97. DOF2_GetInt(string2, "Ban",PlayerInfo[playerid][pBan]);
  98. DOF2_GetInt(string2, "Age",PlayerInfo[playerid][pAge]);
  99. DOF2_GetInt(string2, "Ouros",PlayerInfo[playerid][pOuros]);
  100. DOF2_GetInt(string2, "Avisado",PlayerInfo[playerid][pAviso]);
  101. DOF2_GetInt(string2, "Fome",PlayerInfo[playerid][pFome]);
  102. DOF2_GetInt(string2, "Velocimetro",PlayerInfo[playerid][pVelocimetro]);
  103. DOF2_GetInt(string2, "PegouVIP",PlayerInfo[playerid][pPVIP]);
  104. DOF2_GetInt(string2, "DiasBanTemp",PlayerInfo[playerid][pDiaBanTemp]);
  105. DOF2_GetInt(string2, "MesBanTemp",PlayerInfo[playerid][pMesBanTemp]);
  106. DOF2_GetInt(string2, "AnoBanTemp",PlayerInfo[playerid][pAnoBanTemp]);
  107. DOF2_GetInt(string2, "DiasVIP",PlayerInfo[playerid][pDiaVIP]);
  108. DOF2_GetInt(string2, "MesVIP",PlayerInfo[playerid][pAnoVIP]);
  109. DOF2_GetInt(string2, "AnoVIP",PlayerInfo[playerid][pAviso]);
  110. DOF2_GetInt(string2, "AdminAgendou",PlayerInfo[playerid][pAdminAgendou]);
  111. DOF2_GetInt(string2, "MotivoAgendou",PlayerInfo[playerid][pMotivoAgendou]);
  112. DOF2_GetInt(string2, "Agendado",PlayerInfo[playerid][pAgendado]);
  113. DOF2_GetInt(string2, "TempoAgendado",PlayerInfo[playerid][pTempoAgendado]);
  114. DOF2_GetInt(string2, "TempoHospital",PlayerInfo[playerid][pTempoHospitalizado]);
  115. DOF2_GetInt(string2, "HospitalID",PlayerInfo[playerid][pHospitalID]);
  116.  
  117.  
  118. logouagora[playerid] = 1;
  119. CheckOwner(playerid);
  120. CheckOwnerb(playerid);
  121. CheckOwnerh(playerid);
  122.  
  123. }
  124. else
  125. {
  126.  
  127. new plrIP[16];
  128. GetPlayerIp(playerid, plrIP, sizeof(plrIP));
  129. getdate(Ano, Mes, Dia);
  130.  
  131. 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"));
  132.  
  133. SendClientMessage(playerid, COLOR_WHITE, "Sua senha não esta combinando com seu nick, se errar 5 Vezes será banido do servidor");
  134. SetPlayerCameraPos( playerid, -2864.7883, 264.9134, 23.1133 );
  135. SetPlayerCameraLookAt( playerid, -2864.4394, 254.9195, 20.8638 );
  136. XXAirBreak[playerid] += 3;SetPlayerPos(playerid, -2870.0090,272.1401,5.6831);
  137. SetPlayerInterior(playerid, 0);
  138. format(gstring,128,"*** Bem vindo novamente %s ***\n*** Você esta registrado ***\n*** Digite sua senha para logar ***",PlayerName(playerid));
  139. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Logando...",gstring, "Logar", "Sair");
  140. TextDrawShowForPlayer(playerid, entrada);
  141. TextDrawShowForPlayer(playerid, entrada2);
  142. gPlayerLogTries[playerid] += 1;
  143. if(gPlayerLogTries[playerid] == 5)
  144. {
  145.  
  146. new stri[64], tmp[20], tmp3[20], ip[16];
  147. GetPlayerIp(playerid, ip, sizeof ip);
  148. format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
  149. getdate(Ano, Mes, Dia);
  150. format(tmp, 20, "%d/%d/%d", Dia, Mes, Ano);
  151. gettime(Hora, Minuto, Segundo);
  152. format(tmp3, 20, "%d:%ud:%d", Hora, Minuto, Segundo);
  153. format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
  154. DOF2_CreateFile(stri);
  155. DOF2_SetString(stri,"Motivo","Errou a senha 5 vezes");
  156. DOF2_SetString(stri,"Admin","Automatico");
  157. DOF2_SetString(stri,"Data",tmp);
  158. DOF2_SetString(stri,"Hora",tmp3);
  159. DOF2_SetString(stri,"Nick",PlayerName(playerid));
  160. }
  161.  
  162. }
  163. return true;
  164. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement