Advertisement
Guest User

Salvamento das contas bpu owna

a guest
Nov 12th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.53 KB | None | 0 0
  1. ##Define
  2. #define Pasta_Contas "Contas/%s.ini"
  3.  
  4. //Foward
  5. forward login_dialog(playerid);
  6. public login_dialog(playerid)
  7. {
  8. if(!gPlayerLogged[playerid])
  9. {
  10.  
  11. new string2[150],Str[500],gstring[400];
  12. format(string2, sizeof(string2), Pasta_Contas, PlayerName(playerid));
  13. if (gPlayerLogged[playerid] != 1)
  14. {
  15. if(fexist(string2))
  16. {
  17. //Colocar nome da textdraw aqui
  18. format(gstring, sizeof gstring,
  19. "\n{FFFFFF}Sua conta: {00BFFF}%s {FFFFFF}está REGISTRADA\n\n\
  20. {FFFFFF}Digite sua senha para efetuar o LOGIN\n\n\
  21. {FF0000}OBS:{FFFFFF} Não passe sua senha á ninguém!\n\n", PlayerName(playerid));
  22. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{FFFFFF}Efetuando {00BFFF}Login", gstring, "Logar", "Sair");//Mecher no dialog que está a text
  23. }
  24. else
  25. {
  26. //Colocar nome da textdraw aqui
  27. format(gstring, sizeof gstring,
  28. "\n{FFFFFF}Bem vindo ao servidor Brasil PlayFacil RPG\n\n\
  29. {FFFFFF}Sua conta: {00BFFF}%s {FFFFFF}está {FF0000}NÃO REGISTRADA\n\
  30. {FFFFFF}Digite sua senha para efetuar o REGISTRO\n\n\
  31. {FF0000}OBS:{FFFFFF} Não passe sua senha á ninguém!\n\n", PlayerName(playerid));
  32. ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{FFFFFF}Efetuando {00BFFF}Registro", gstring, "Registrar", "Sair"); //Mecher no dialog que está a text
  33.  
  34. }
  35. // Colocar sistema de login a baixo exemplo : setpos e etc
  36. }
  37. return 1;
  38. }
  39. BPU::OnPlayerSave(playerid) //Salvamento das contas
  40. {
  41. if(gPlayerLogged[playerid])
  42. {
  43. new string3[120];
  44. format(string3, sizeof(string3), Pasta_Contas, PlayerName(playerid));
  45. PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
  46. DOF2_SetInt(string3,"Level",PlayerInfo[playerid][pLevel]);
  47. DOF2_SetString(string3,"Email",PlayerInfo[playerid][pEmail]);
  48. DOF2_SetInt(string3,"AdminLevel",PlayerInfo[playerid][pAdmin]);
  49. DOF2_SetString(string3,"AdminFuncao",PlayerInfo[playerid][pFuncao]);
  50. DOF2_SetInt(string3,"AdminTemp",PlayerInfo[playerid][pAdminTemp]);
  51. DOF2_SetInt(string3,"HelperLevel",PlayerInfo[playerid][pHelper]);
  52. DOF2_SetInt(string3,"Securekey",PlayerInfo[playerid][pSeckey]);
  53. DOF2_SetInt(string3,"DonateRank",PlayerInfo[playerid][pVIP]);
  54. DOF2_SetInt(string3,"UpgradePoints",PlayerInfo[playerid][gPupgrade]);
  55. DOF2_SetInt(string3,"ConnectedTime",PlayerInfo[playerid][pConnectTime]);
  56. DOF2_SetInt(string3,"Registered",PlayerInfo[playerid][pReg]);
  57. DOF2_SetInt(string3,"Sex",PlayerInfo[playerid][pSex]);
  58. DOF2_SetInt(string3,"Muted",PlayerInfo[playerid][pMuted]);
  59. DOF2_SetInt(string3,"Respect",PlayerInfo[playerid][pExp]);
  60. DOF2_SetInt(string3,"Money",PlayerInfo[playerid][pCash]);
  61. DOF2_SetInt(string3,"TempoConce",PlayerInfo[playerid][pTempoConce]);
  62. DOF2_SetInt(string3,"Bank",PlayerInfo[playerid][pConta]);
  63. DOF2_SetInt(string3,"Cashing",PlayerInfo[playerid][pCasher]);
  64. DOF2_SetInt(string3,"Explosivos",PlayerInfo[playerid][pExplosivos]);
  65. DOF2_SetInt(string3,"Cigarros",PlayerInfo[playerid][pCigarros]);
  66. DOF2_SetInt(string3,"Mochila",PlayerInfo[playerid][pMochila]);
  67. DOF2_SetInt(string3,"pJackSkill",PlayerInfo[playerid][pJackSkill]);
  68. DOF2_SetInt(string3,"Crimes",PlayerInfo[playerid][pCrimes]);
  69. DOF2_SetInt(string3,"Kills",PlayerInfo[playerid][pKills]);
  70. DOF2_SetInt(string3,"Deaths",PlayerInfo[playerid][pDeaths]);
  71. DOF2_SetInt(string3,"Phonebook",PlayerInfo[playerid][pPhoneBook]);
  72. DOF2_SetInt(string3,"LottoNr",PlayerInfo[playerid][pLottoNr]);
  73. DOF2_SetInt(string3,"LottoWin",PlayerInfo[playerid][pLottoWin]);
  74. DOF2_SetInt(string3,"Emprego",PlayerInfo[playerid][pEmprego]);
  75. DOF2_SetInt(string3,"Caixinha",PlayerInfo[playerid][pCaixinha]);
  76. DOF2_SetInt(string3,"Paycheck",PlayerInfo[playerid][pSalario]);
  77. DOF2_SetInt(string3,"HeadValue",PlayerInfo[playerid][pHeadValue]);
  78. DOF2_SetInt(string3,"HeadValueT",PlayerInfo[playerid][pHeadValueT]);
  79. DOF2_SetInt(string3,"HeadValueM",PlayerInfo[playerid][pHeadValueM]);
  80. DOF2_SetInt(string3,"Jailed",PlayerInfo[playerid][pJailed]);
  81. DOF2_SetInt(string3,"TempoFDrugs",PlayerInfo[playerid][pTempoFDrugs]);
  82. DOF2_SetInt(string3,"DrugType",PlayerInfo[playerid][pDrugType]);
  83. DOF2_SetInt(string3,"JailTime",PlayerInfo[playerid][pJailTime]);
  84. DOF2_SetInt(string3,"Capacete",PlayerInfo[playerid][pCapacete]);
  85. DOF2_SetInt(string3,"Materiais",PlayerInfo[playerid][pMats]);
  86. DOF2_SetInt(string3,"Contratos",PlayerInfo[playerid][pContratos]);
  87. DOF2_SetInt(string3,"Maconha",PlayerInfo[playerid][pDrogas]);
  88. DOF2_SetInt(string3,"Cocaina",PlayerInfo[playerid][pDrogas2]);
  89. DOF2_SetInt(string3,"Crack",PlayerInfo[playerid][pDrogas3]);
  90. DOF2_SetInt(string3,"Gam",PlayerInfo[playerid][pGam]);
  91. DOF2_SetInt(string3,"PFc",PlayerInfo[playerid][pPFc]);
  92. DOF2_SetInt(string3,"Mcr",PlayerInfo[playerid][pMcr]);
  93. DOF2_SetInt(string3,"Coc",PlayerInfo[playerid][pCoc]);
  94. DOF2_SetInt(string3,"Vam",PlayerInfo[playerid][pVam]);
  95. DOF2_SetInt(string3,"Vsc",PlayerInfo[playerid][pVsc]);
  96. DOF2_SetInt(string3,"Líder",PlayerInfo[playerid][pLider]);
  97. DOF2_SetInt(string3,"Member",PlayerInfo[playerid][pMembro]);
  98. DOF2_SetInt(string3,"Rank",PlayerInfo[playerid][pCargo]);
  99. DOF2_SetInt(string3,"Multas",PlayerInfo[playerid][pMultas]);
  100. DOF2_SetInt(string3,"Char",PlayerInfo[playerid][pSkin]);
  101. DOF2_SetInt(string3,"ContractTime",PlayerInfo[playerid][pContractTime]);
  102. DOF2_SetInt(string3,"pegouvip5",PlayerInfo[playerid][pegouvip]);
  103. DOF2_SetInt(string3,"DetSkill",PlayerInfo[playerid][pDetSkill]);
  104. DOF2_SetInt(string3,"SexSkill",PlayerInfo[playerid][pSexSkill]);
  105. DOF2_SetInt(string3,"BoxSkill",PlayerInfo[playerid][pBoxSkill]);
  106. DOF2_SetInt(string3,"LawSkill",PlayerInfo[playerid][pLawSkill]);
  107. DOF2_SetInt(string3,"MechSkill",PlayerInfo[playerid][pMechSkill]);
  108. DOF2_SetInt(string3,"NewsSkill",PlayerInfo[playerid][pNewsSkill]);
  109. DOF2_SetInt(string3,"CarSkill",PlayerInfo[playerid][pCarSkill]);
  110. DOF2_SetInt(string3,"DrogasSkill",PlayerInfo[playerid][pDrogasSkill]);
  111. DOF2_SetInt(string3,"CookSkill",PlayerInfo[playerid][pCookSkill]);
  112. DOF2_SetInt(string3,"Limparb",PlayerInfo[playerid][pLimparb]);
  113. DOF2_SetFloat(string3,"pSHealth",PlayerInfo[playerid][pSHealth]);
  114. DOF2_SetFloat(string3,"pSArmour",PlayerInfo[playerid][pSArmour]);
  115. DOF2_SetInt(string3,"PhoneNr",PlayerInfo[playerid][pPnumber]);
  116. DOF2_SetInt(string3,"TelCor",PlayerInfo[playerid][pTelColor]);
  117. DOF2_SetInt(string3,"House",PlayerInfo[playerid][pPhousekey]);
  118. DOF2_SetInt(string3,"AimBot", GetPVarInt(playerid,"WarnningAimbot"));
  119. DOF2_SetInt(string3,"AutoCbug", GetPVarInt(playerid, "WarnningMacro"));
  120. DOF2_SetInt(string3,"Bizz",PlayerInfo[playerid][pPbiskey]);
  121. DOF2_SetInt(string3,"Faz",PlayerInfo[playerid][pPFazkey]);
  122. DOF2_SetInt(string3,"Spawn",PlayerInfo[playerid][pSpawn]);
  123. DOF2_SetInt(string3,"SafeMaconha",PlayerInfo[playerid][pSafeDrogas]);
  124. DOF2_SetInt(string3,"SafeCocaina",PlayerInfo[playerid][pSafeDrogas2]);
  125. DOF2_SetInt(string3,"SafeCrack",PlayerInfo[playerid][pSafeDrogas3]);
  126. DOF2_SetInt(string3,"NivelProcurado",WantedPoints[playerid]);
  127. DOF2_SetInt(string3,"SafeMateriais",PlayerInfo[playerid][psMats]);
  128. DOF2_SetInt(string3,"Age",PlayerInfo[playerid][pAge]);
  129. DOF2_SetInt(string3,"AcP",PlayerInfo[playerid][pAcP]);
  130. DOF2_SetInt(string3,"Ouros",PlayerInfo[playerid][pOuros]);
  131. DOF2_SetInt(string3,"Avisado",PlayerInfo[playerid][pAviso]);
  132. DOF2_SetInt(string3,"DiasBanTemp",PlayerInfo[playerid][pDiaBanTemp]);
  133. DOF2_SetInt(string3,"MesBanTemp",PlayerInfo[playerid][pMesBanTemp]);
  134. DOF2_SetInt(string3,"AnoBanTemp",PlayerInfo[playerid][pAnoBanTemp]);
  135. DOF2_SetInt(string3,"DiasVIP",PlayerInfo[playerid][pDiaVIP]);
  136. DOF2_SetInt(string3,"diasvip",PlayerInfo[playerid][pDiasvip]);
  137. DOF2_SetInt(string3,"MesVIP",PlayerInfo[playerid][pMesVIP]);
  138. DOF2_SetInt(string3,"AnoVIP",PlayerInfo[playerid][pAnoVIP]);
  139. DOF2_SetInt(string3,"diasTO",PlayerInfo[playerid][pDiasTO]);
  140. DOF2_SetInt(string3,"DiasTO",PlayerInfo[playerid][pDiaTO]);
  141. DOF2_SetInt(string3,"MesTO",PlayerInfo[playerid][pMesTO]);
  142. DOF2_SetInt(string3,"AnoTO",PlayerInfo[playerid][pAnoTO]);
  143. DOF2_SetInt(string3,"TO",PlayerInfo[playerid][pTO]);
  144. DOF2_SetInt(string3,"OrgVIP",PlayerInfo[playerid][pOrgVIP]);
  145. DOF2_SetInt(string3,"CarLic",PlayerInfo[playerid][pCarLic]);
  146. DOF2_SetInt(string3,"FlyLic",PlayerInfo[playerid][pFlyLic]);
  147. DOF2_SetInt(string3,"BoatLic",PlayerInfo[playerid][pBoatLic]);
  148. DOF2_SetInt(string3,"GunLic",PlayerInfo[playerid][pGunLic]);
  149. DOF2_SetInt(string3,"PayDay",PlayerInfo[playerid][pPayDay]);
  150. DOF2_SetInt(string3,"CDPlayer",PlayerInfo[playerid][pCDPlayer]);
  151. DOF2_SetInt(string3,"Wins",PlayerInfo[playerid][pWins]);
  152. DOF2_SetInt(string3,"Loses",PlayerInfo[playerid][pLoses]);
  153. DOF2_SetInt(string3,"AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
  154. DOF2_SetInt(string3,"DrugPerk",PlayerInfo[playerid][pDrugPerk]);
  155. DOF2_SetInt(string3,"MiserPerk",PlayerInfo[playerid][pMiserPerk]);
  156. DOF2_SetInt(string3,"PainPerk",PlayerInfo[playerid][pPainPerk]);
  157. DOF2_SetInt(string3,"TraderPerk",PlayerInfo[playerid][pTraderPerk]);
  158. DOF2_SetInt(string3,"Tutorial",PlayerInfo[playerid][pTut]);
  159. DOF2_SetInt(string3,"Avisos",PlayerInfo[playerid][pWarns]);
  160. DOF2_SetString(string3,"MarriedTo",PlayerInfo[playerid][pMarriedTo]);
  161. DOF2_SetString(string3,"SERIAL",PlayerInfo[playerid][pSERIAL]);
  162. DOF2_SetInt(string3,"Married",PlayerInfo[playerid][pMarried]);
  163. DOF2_SetInt(string3,"Luta",PlayerInfo[playerid][pLuta]);
  164. DOF2_SetString(string3,"LU",PlayerInfo[playerid][pLaastLogin]);
  165. DOF2_SetString(string3,"LV",PlayerInfo[playerid][pLastVerification]);
  166. DOF2_SetInt(string3,"Ban",PlayerInfo[playerid][pBan]);
  167. DOF2_SetBool(string3,"Ajustado",PlayerInfo[playerid][pAjustado]);
  168. DOF2_SetBool(string3,"HAjustado",PlayerInfo[playerid][pHAjustado]);
  169. DOF2_SetBool(string3,"Galao",PlayerInfo[playerid][pGalao]);
  170. DOF2_SetBool(string3,"Isqueiro",PlayerInfo[playerid][pIsqueiro]);
  171. DOF2_SetBool(string3,"Patins",PlayerInfo[playerid][pPatins]);
  172. DOF2_SetBool(string3,"Televisao",PlayerInfo[playerid][pTelevisao]);
  173. DOF2_SetBool(string3,"Radio",PlayerInfo[playerid][pRadio]);
  174.  
  175. DOF2_SetBool(string3,"resetado",PlayerInfo[playerid][pResetado]);
  176.  
  177. DOF2_SetInt(string3, "Agendado",PlayerInfo[playerid][pAgendado]);
  178. DOF2_SetInt(string3, "CoinsAgendado",PlayerInfo[playerid][pCoinsAgendado]);
  179. DOF2_SetInt(string3, "QCoinAgendado",PlayerInfo[playerid][pQCoinAgendado]);
  180. DOF2_SetInt(string3, "Sementes", PlayerInfo[playerid][pSementes]);
  181. DOF2_SetInt(string3,"BiggestFish", PlayerInfo[playerid][pBiggestFish]);
  182. DOF2_SetInt(string3,"CookSkill", PlayerInfo[playerid][pCookSkill]);
  183. DOF2_SetInt(string3,"FishSkill", PlayerInfo[playerid][pFishSkill]);
  184. DOF2_SetInt(string3,"FishLic", PlayerInfo[playerid][pFishLic]);
  185. DOF2_SetInt(string3,"GasReserva", PlayerInfo[playerid][pGasReserva]);
  186.  
  187. DOF2_SetBool(string3, "Hospital", PlayerInfo[playerid][pHospital]);
  188. DOF2_SetInt(string3,"TempoHospital", PlayerInfo[playerid][pTempoHospital]);
  189. DOF2_SetBool(string3,"LocalHospital", PlayerInfo[playerid][pLocalHospital]);
  190. DOF2_SetInt(string3,"PrecoHospital", PlayerInfo[playerid][pPrecoHospital]);
  191.  
  192. new str[28];
  193. for(new i = 1; i < MAX_ITEMS; i++)
  194. {
  195. format(str, sizeof str, "ArmasGuardada%d", i);
  196. DOF2_SetInt(string3,str,ArmasGuardadas[playerid][i]);
  197.  
  198. format(str, sizeof str, "BalasGuardada%d", i);
  199. DOF2_SetInt(string3,str,BalasGuardadas[playerid][i]);
  200. }
  201. //Crime
  202. DOF2_SetString(string3,"cCrime",PlayerCrime[playerid][pAccusedof]);
  203. DOF2_SetString(string3,"cRelato",PlayerCrime[playerid][pVictim]);
  204.  
  205. DOF2_SaveFile();
  206. SalvarInventario(playerid);
  207. SalvarAtividade(playerid);
  208. }
  209. return true;
  210. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement