Advertisement
Guest User

Untitled

a guest
May 20th, 2019
6,502
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.84 KB | None | 1 0
  1. /*
  2.  
  3. ------------------------------- CIDADE VIDA REAL -------------------------------
  4.  
  5. Gamemode original feito por [L.K] WillianL e [L.K] Rafhael.
  6. Cópia para estudos por SirMorningstar.
  7.  
  8. Versão atual deste gamemode é 0.0.1.
  9.  
  10. » Sistemas completos:
  11. » Login, Registro e Salvamento.
  12. » Mensagens Aleatórias.
  13. » Level e Experiência.
  14. » Spawn Civíl.
  15. » Última Posição Salva.
  16. » Chat local.
  17. » Chat kill.
  18.  
  19. --------------------------------------------------------------------------------
  20.  
  21. */
  22.  
  23. // ------------ INCLUDES ------------ //
  24. #include <a_samp>
  25. #include <zcmd>
  26. #include <sscanf2>
  27. #include <dof2>
  28. #include <progress>
  29.  
  30. // ---------- DEFINIÇÕES ----------- //
  31. #define SendClientMessageEx(%0,%1,%2,%3) \
  32. format(String, sizeof(String), %2, %3) , SendClientMessage(%0, %1, String)
  33. #define strcatEx(%0,%1,%2) \
  34. format(String, sizeof(String), %1, %2) , strcat(%0, String)
  35.  
  36. #define DESTINO_USUARIOS "CVR/usuarios/%s.ini"
  37.  
  38. // ----------- VARIÁVEIS ----------- //
  39. enum
  40. {
  41. COR_ERRO = 0xFF4500FF,
  42. COR_BRANCO = 0xFFFFFFFF,
  43. COR_CINZA = 0xC0C0C0FF
  44. }
  45.  
  46. enum
  47. {
  48. DIALOG_NULL,
  49. DIALOG_CAIXA_ELETRONICO,
  50. DIALOG_LOGIN,
  51. DIALOG_REGISTER
  52. }
  53.  
  54. enum pInfo
  55. {
  56. pAdmin,
  57. pLevel,
  58. pExperiencia,
  59. pSkin,
  60. pAvisos,
  61. pGasolina,
  62. pDiesel,
  63. pEtanol,
  64. pGasJetPack,
  65. pAvGas,
  66.  
  67. bool: pVIP,
  68. bool: pPorteDeArmas,
  69. bool: pHabilitacaoTerrestre,
  70. bool: pHabilitacaoNautica,
  71. bool: pHabilitacaoAerea,
  72. bool: pHabilitacaoEspecialHEVG,
  73. bool: pHabilitacaoEspecialHELG,
  74. bool: pHabilitacaoEspecialHEAG,
  75. bool: pCelular,
  76. bool: pMP3,
  77. bool: pGPS,
  78. bool: pSemParar,
  79. bool: pRelogioUP,
  80. bool: pCapacete,
  81. bool: pOculos,
  82. bool: pBone,
  83. bool: pGorro,
  84. bool: pArara,
  85. bool: pBandana,
  86.  
  87. Float: pX,
  88. Float: pY,
  89. Float: pZ,
  90. Float: pAngle,
  91. pInt,
  92. pVW,
  93.  
  94. bool: Logado
  95. }
  96. new playerInfo[MAX_PLAYERS][pInfo];
  97.  
  98. enum pPick
  99. {
  100. PickUpBANCOENTRADA,
  101. PickUpBANCOSAIDA,
  102. PickUpAGENCIAEMPREGOSENTRADA,
  103. PickUpAGENCIAEMPREGOSSAIDA
  104. };
  105. new Pickup[pPick];
  106.  
  107. new String[1000];
  108.  
  109. new mensagensAleatorias[10][256] = {
  110. "{FFFFFF}[!] {00FF00}Caso esteja com pouco combustível, procure um dos 20 postos espalhados por San Andreas",
  111. "{FFFFFF}[!] {00FF00}Ofensa à Staff será punida com ban",
  112. "{FFFFFF}[!] {00FF00}Deseja comprar VIP? Acesse nosso site e confira: www.loskatchorros.com.br/store",
  113. "{FFFFFF}[!] {00FF00}Visite nosso Shopping em Los Santos, localizado por um ' S ' no mapa!",
  114. "{FFFFFF}[!] {00FF00}Venha você também para nosso TeamSpeak³ ts.loskatchorros.com.br",
  115. "{FFFFFF}[!] {FF8C00}Inscreva-se em nosso canal no YouTube: www.youtube.com/LosKatchorrosGames",
  116. "{FFFFFF}[!] {00FF00}Se cadastrem no Fórum e fique por dentro das novidades ~~> /Ajuda Contato",
  117. "{FFFFFF}[!] {00FF00}Para ver os comandos do servidor ~~> /Ajuda Comandos",
  118. "{FFFFFF}[!] {00FF00}Veja nossas vantagens VIP ~~> /VantagensVip",
  119. "{FFFFFF}[!] {00FF00}Jogar em nosso servidor é um privilégio e não um direito!"
  120. };
  121.  
  122. new Timer_UP[MAX_PLAYERS];
  123.  
  124. new Text:TextoFome;
  125. new Text:TextoSede;
  126. new Text:TextoSono;
  127.  
  128. new Bar:BarraFome;
  129. new Bar:BarraSede;
  130. new Bar:BarraSono;
  131.  
  132. // ---------- DECLARAÇÕES ---------- //
  133. forward CB_mensagensAleatorias();
  134. forward ganharExperiencia(playerid);
  135.  
  136. // ---------- SCRIPT MAIN ---------- //
  137. main()
  138. {
  139. print("\n--------------------------------------");
  140. print(" [CVR] CIDADE VIDA REAL.");
  141. print("--------------------------------------\n");
  142. }
  143.  
  144. // ------ CALLBACKS GLOBAIS ------- //
  145. public OnGameModeInit()
  146. {
  147. UsePlayerPedAnims();
  148. ShowPlayerMarkers(false);
  149. DisableInteriorEnterExits();
  150. EnableStuntBonusForAll(false);
  151.  
  152. SendRconCommand("hostname Cidade Vida Real RPG ® | Server: 1 | #HeavyHost");
  153. SendRconCommand("mapname Brasil - CVR RPG v0.0.1-RC1");
  154. SendRconCommand("language Português - Brasil");
  155. SetGameModeText("Brasil - CVR RPG v0.0.1-RC1");
  156.  
  157. // Pickup's Entradas e Saídas:
  158. Pickup[PickUpBANCOENTRADA] = CreatePickup(1274, 1, 592.8407,-1248.2235,18.1530, -1); //Entrada Banco
  159. Pickup[PickUpBANCOSAIDA] = CreatePickup(1239, 1, 2305.5181,-16.1052,26.7496, -1); //Saida Banco
  160. Pickup[PickUpAGENCIAEMPREGOSENTRADA] = CreatePickup(1314, 1, 1153.9910,-1771.7023,16.5992, -1); //Entrada Agência de Empregos
  161. Pickup[PickUpAGENCIAEMPREGOSSAIDA] = CreatePickup(1239, 1, 1494.3116,1303.6232,1093.2891, -1); //Saida Agência de Empregos
  162.  
  163. // Textos 3D Entradas e Saídas:
  164. Create3DTextLabel("Banco de Los Santos", -1, 592.8407,-1248.2235,18.1530, 40.0, 0, 0); // Entrada Banco
  165. Create3DTextLabel("Agência de Empregos", -1, 1153.9910,-1771.7023,16.5992, 40.0, 0, 0); // Entrada Agência de Empregos
  166.  
  167. // Pickup's Caixas Eletrônicos:
  168. CreatePickup(1274, 1, 1929.4681,-1785.3741,13.5469, -1); // Caixas Eletronicos
  169. CreatePickup(1274, 1, 2123.1787,897.4747,11.1797, -1); // Caixas Eletronicos
  170. CreatePickup(1274, 1, 2188.4717,2464.3057,11.2422, -1); // Caixas Eletronicos
  171. CreatePickup(1274, 1, 2156.4546,2734.6196,11.1763, -1); // Caixas Eletronicos
  172. CreatePickup(1274, 1, 1590.4004,2217.2566,11.0692, -1); // Caixas Eletronicos
  173. CreatePickup(1274, 1, 59.8137,1212.8947,18.8400, -1); // Caixas Eletronicos
  174. CreatePickup(1274, 1, -2032.1680,151.0729,29.0461, -1); // Caixas Eletronicos
  175. CreatePickup(1274, 1, -2419.2571,959.3170,45.2969, -1); // Caixas Eletronicos
  176. CreatePickup(1274, 1, -2233.2070,-2560.2319,31.9219, -1); // Caixas Eletronicos
  177. CreatePickup(1274, 1, -1572.9586,-2725.5581,48.7435, -1); // Caixas Eletronicos
  178. CreatePickup(1274, 1, -80.2851,-1171.9331,2.1556, -1); // Caixas Eletronicos
  179. CreatePickup(1274, 1, 1009.5620,-930.2037,42.3281, -1); // Caixas Eletronicos
  180. CreatePickup(1274, 1, 1389.1398,461.9337,20.2020, -1); // Caixas Eletronicos
  181.  
  182. // Textos 3D Caixas Eletrônicos:
  183. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 1929.4681,-1785.3741,13.5469, 40.0, 0, 0);
  184. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 2123.1787,897.4747,11.1797, 40.0, 0, 0);
  185. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 2188.4717,2464.3057,11.2422, 40.0, 0, 0);
  186. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 2156.4546,2734.6196,11.1763, 40.0, 0, 0);
  187. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 1590.4004,2217.2566,11.0692, 40.0, 0, 0);
  188. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 59.8137,1212.8947,18.8400, 40.0, 0, 0);
  189. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, -2032.1680,151.0729,29.0461, 40.0, 0, 0);
  190. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, -2419.2571,959.3170,45.2969, 40.0, 0, 0);
  191. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, -2233.2070,-2560.2319,31.9219, 40.0, 0, 0);
  192. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, -1572.9586,-2725.5581,48.7435, 40.0, 0, 0);
  193. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, -80.2851,-1171.9331,2.1556, 40.0, 0, 0);
  194. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 1009.5620,-930.2037,42.3281, 40.0, 0, 0);
  195. Create3DTextLabel("{2fcc38}Caixa Eletrônico\n{FFFFFF}Aperte a letra '{2fcc38}Y{FFFFFF}' para utiliza-lo", -1, 1389.1398,461.9337,20.2020, 40.0, 0, 0);
  196.  
  197. // Objetos dos Caixas Eletrônicos:
  198. CreateObject(2942,1928.6000000,-1785.4000000,13.0000000,0.0000000,0.0000000,88.0000000);
  199. CreateObject(2942,2123.2000000,896.7999900,10.8000000,0.0000000,0.0000000,182.0000000);
  200. CreateObject(2942,2187.8000000,2464.2000000,10.9000000,0.0000000,0.0000000,94.0000000);
  201. CreateObject(2942,2156.5000000,2733.8999000,10.8000000,0.0000000,0.0000000,184.0000000);
  202. CreateObject(2942,1590.4000000,2218.0000000,10.7000000,0.0000000,0.0000000,0.0000000);
  203. CreateObject(2942,58.9000000,1212.9000000,18.5000000,0.0000000,0.0000000,90.0000000);
  204. CreateObject(2942,-2032.9000000,151.0000000,28.7000000,0.0000000,0.0000000,92.0000000);
  205. CreateObject(2942,-2420.1001000,959.2999900,44.9000000,0.0000000,0.0000000,92.0000000);
  206. CreateObject(2942,-2232.6001000,-2560.5000000,31.6000000,0.0000000,0.0000000,244.0000000);
  207. CreateObject(2942,-1572.6000000,-2725.0000000,48.4000000,0.0000000,0.0000000,326.0000000);
  208. CreateObject(2942,-79.5000000,-1172.3000000,1.8000000,0.0000000,0.0000000,246.0000000);
  209. CreateObject(2942,1009.5000000,-929.5000000,42.0000000,0.0000000,0.0000000,6.0000000);
  210. CreateObject(2942,1389.4000000,462.7999900,19.8000000,0.0000000,0.0000000,340.0000000);
  211.  
  212. // Mensagens Aleatórias:
  213. SetTimer("CB_mensagensAleatorias", 30000, true);
  214.  
  215. // Veículos Civís:
  216. AddStaticVehicleEx(481,828.1000,-1336.2281,13.0619,0.0000,-1,-1,7); //
  217. AddStaticVehicleEx(481,829.2000,-1336.2155,13.0631,0.0001,-1,-1,7); //
  218. AddStaticVehicleEx(481,830.4990,-1336.2117,13.0625,0.0384,-1,-1,7); //
  219. AddStaticVehicleEx(481,831.7000,-1336.1813,13.0626,0.0010,-1,-1,7); //
  220. AddStaticVehicleEx(481,832.9989,-1336.1932,13.0617,0.0351,-1,-1,7); //
  221. AddStaticVehicleEx(481,834.2000,-1336.2159,13.0625,0.0003,-1,-1,7); //
  222. AddStaticVehicleEx(481,835.5829,-1336.2028,13.0628,1.1567,-1,-1,7); //
  223.  
  224. // Texto de sono:
  225. TextoFome = TextDrawCreate(562.111083, 278.257659, "Fome");
  226. TextDrawBackgroundColor(TextoFome, 255);
  227. TextDrawFont(TextoFome, 0);
  228. TextDrawLetterSize(TextoFome, 0.620000, 1.400000);
  229. TextDrawColor(TextoFome, -1);
  230. TextDrawSetOutline(TextoFome, 1);
  231. TextDrawSetProportional(TextoFome, 1);
  232.  
  233. // Texto de sede:
  234. TextoSede = TextDrawCreate(562.222290, 307.626708, "Sede");
  235. TextDrawBackgroundColor(TextoSede, 255);
  236. TextDrawFont(TextoSede, 0);
  237. TextDrawLetterSize(TextoSede, 0.620000, 1.400000);
  238. TextDrawColor(TextoSede, -1);
  239. TextDrawSetOutline(TextoSede, 1);
  240. TextDrawSetProportional(TextoSede, 1);
  241.  
  242. // Texto de sono:
  243. TextoSono = TextDrawCreate(562.222290, 339.982208, "Sono");
  244. TextDrawBackgroundColor(TextoSono, 255);
  245. TextDrawFont(TextoSono, 0);
  246. TextDrawLetterSize(TextoSono, 0.620000, 1.400000);
  247. TextDrawColor(TextoSono, -1);
  248. TextDrawSetOutline(TextoSono, 1);
  249. TextDrawSetProportional(TextoSono, 1);
  250.  
  251. // Barrinhas fome/sede/sono:
  252. BarraFome = CreateProgressBar(553.00, 300.00, 55.50, 3.20, -16776961, 100.0);
  253. SetProgressBarMaxValue(BarraFome, 100);
  254. BarraSede = CreateProgressBar(553.00, 331.00, 55.50, 3.20, 16711935, 100.0);
  255. SetProgressBarMaxValue(BarraSede, 100);
  256. BarraSono = CreateProgressBar(553.00, 362.00, 55.50, 3.20, 7777255, 100.0);
  257. SetProgressBarMaxValue(BarraSono, 100);
  258. return true;
  259. }
  260.  
  261. public OnGameModeExit()
  262. {
  263. HideProgressBarForAll(BarraFome);
  264. HideProgressBarForAll(BarraSede);
  265. HideProgressBarForAll(BarraSono);
  266. TextDrawDestroy(TextoFome);
  267. TextDrawDestroy(TextoSede);
  268. TextDrawDestroy(TextoSono);
  269. return true;
  270. }
  271.  
  272. public OnPlayerRequestClass(playerid, classid)
  273. {
  274. SetPlayerPos(playerid, -2626.3479, 1422.0120, 24.5625);
  275. SetPlayerFacingAngle(playerid, 239.9000);
  276. SetPlayerCameraPos(playerid, -2622.5000, 1418.6584, 24.5625);
  277. SetPlayerCameraLookAt(playerid, -2625.0000, 1423.1483, 24.5625);
  278. SetPlayerSkin(playerid, 154);
  279.  
  280. // MapIcon's Globais:
  281. SetPlayerMapIcon(playerid, 1, 592.8407,-1248.2235,18.1530, 52, 0, MAPICON_GLOBAL); // Banco
  282. SetPlayerMapIcon(playerid, 2, 1153.9910,-1771.7023,16.5992, 23, 0, MAPICON_GLOBAL); // Agência de Empregos
  283.  
  284. // Mensagem de boas vindas:
  285. for(new i; i < 100; i++)
  286. {
  287. SendClientMessage(playerid, COR_BRANCO, " ");
  288. }
  289. SendClientMessage(playerid, COR_BRANCO, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  290. SendClientMessageEx(playerid, COR_BRANCO, "» Bem vindo(a) ao servidor Cidade Vida Real, '{00FF00}%s{FFFFFF}'", playerName(playerid));
  291. SendClientMessage(playerid, COR_BRANCO, "» Para ver os comandos do servidor Digite: /Ajuda Comandos");
  292. SendClientMessage(playerid, COR_BRANCO, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  293.  
  294. // Verificar conta:
  295. new file[70];
  296. format(file, sizeof(file), DESTINO_USUARIOS, playerName(playerid));
  297. if(DOF2_FileExists(file))
  298. {
  299. format(String, sizeof String, "{6090E0}Usuário:{FFFFFF} %s\n\n{FFFFFF}Conta: {00FF00}Registrada\n\n{FFFFFF}Informe sua Senha:", playerName(playerid));
  300. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}Conta", String, "Logar", "Sair");
  301. }
  302. else if(!DOF2_FileExists(file))
  303. {
  304. format(String, sizeof String, "{6090E0}Usuário:{FFFFFF} %s\n\n{FFFFFF}Conta: {FF0000}Não registrada\n\n{FFFFFF}Informe uma Senha:", playerName(playerid));
  305. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FF0000}Conta", String, "Registrar", "Sair");
  306. }
  307. return true;
  308. }
  309.  
  310. public OnPlayerConnect(playerid)
  311. {
  312. playerInfo[playerid][Logado] = false;
  313. SetPlayerColor(playerid, COR_CINZA);
  314. return true;
  315. }
  316.  
  317. public OnPlayerDisconnect(playerid, reason)
  318. {
  319. if(!playerInfo[playerid][Logado])
  320. return false;
  321.  
  322. salvarJogador(playerid);
  323.  
  324. KillTimer(Timer_UP[playerid]);
  325. return true;
  326. }
  327.  
  328. public OnPlayerSpawn(playerid)
  329. {
  330. if(!playerInfo[playerid][Logado])
  331. return Kick(playerid);
  332.  
  333. SetPlayerPos(playerid, playerInfo[playerid][pX], playerInfo[playerid][pY], playerInfo[playerid][pZ]);
  334. SetPlayerFacingAngle(playerid, playerInfo[playerid][pAngle]);
  335. SetPlayerVirtualWorld(playerid, playerInfo[playerid][pVW]);
  336. SetPlayerSkin(playerid, playerInfo[playerid][pSkin]);
  337. SetPlayerColor(playerid, COR_BRANCO);
  338.  
  339. SetProgressBarValue(BarraFome, 100);
  340. SetProgressBarValue(BarraSede, 100);
  341. SetProgressBarValue(BarraSono, 100);
  342.  
  343. ShowProgressBarForPlayer(playerid, BarraFome);
  344. ShowProgressBarForPlayer(playerid, BarraSede);
  345. ShowProgressBarForPlayer(playerid, BarraSono);
  346.  
  347. UpdateProgressBar(BarraFome, playerid);
  348. UpdateProgressBar(BarraSede, playerid);
  349. UpdateProgressBar(BarraSono, playerid);
  350.  
  351. TextDrawShowForPlayer(playerid, TextoFome);
  352. TextDrawShowForPlayer(playerid, TextoSede);
  353. TextDrawShowForPlayer(playerid, TextoSono);
  354. return true;
  355. }
  356.  
  357. public OnPlayerDeath(playerid, killerid, reason)
  358. {
  359. SendDeathMessage(killerid, playerid, reason);
  360. return true;
  361. }
  362.  
  363. public OnVehicleSpawn(vehicleid)
  364. {
  365. return true;
  366. }
  367.  
  368. public OnVehicleDeath(vehicleid, killerid)
  369. {
  370. return true;
  371. }
  372.  
  373. public OnPlayerText(playerid, text[])
  374. {
  375. // Chat Local:
  376. new Float: x, Float: y, Float: z;
  377. GetPlayerPos(playerid, x, y, z);
  378.  
  379. new string_chat_local[256];
  380. format(string_chat_local, sizeof(string_chat_local), "%s [%d]: %s", playerName(playerid), playerid, text);
  381.  
  382. for(new i; i < MAX_PLAYERS; i++)
  383. {
  384. if(IsPlayerInRangeOfPoint(i, 2.0, x, y, z))
  385. {
  386. SendClientMessage(i, GetPlayerColor(playerid), string_chat_local);
  387. }
  388. }
  389. return false;
  390. }
  391.  
  392. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  393. {
  394. return true;
  395. }
  396.  
  397. public OnPlayerExitVehicle(playerid, vehicleid)
  398. {
  399. return true;
  400. }
  401.  
  402. public OnPlayerStateChange(playerid, newstate, oldstate)
  403. {
  404. return true;
  405. }
  406.  
  407. public OnPlayerEnterCheckpoint(playerid)
  408. {
  409. return true;
  410. }
  411.  
  412. public OnPlayerLeaveCheckpoint(playerid)
  413. {
  414. return true;
  415. }
  416.  
  417. public OnPlayerEnterRaceCheckpoint(playerid)
  418. {
  419. return true;
  420. }
  421.  
  422. public OnPlayerLeaveRaceCheckpoint(playerid)
  423. {
  424. return true;
  425. }
  426.  
  427. public OnRconCommand(cmd[])
  428. {
  429. return true;
  430. }
  431.  
  432. public OnPlayerRequestSpawn(playerid)
  433. {
  434. return true;
  435. }
  436.  
  437. public OnObjectMoved(objectid)
  438. {
  439. return true;
  440. }
  441.  
  442. public OnPlayerObjectMoved(playerid, objectid)
  443. {
  444. return true;
  445. }
  446.  
  447. public OnPlayerPickUpPickup(playerid, pickupid)
  448. {
  449. if(pickupid == Pickup[PickUpBANCOENTRADA])
  450. {
  451. SendClientMessage(playerid, -1, "| INFO | Para entrar no Banco digite '{b6b6b6}/Entrar{FFFFFF}' ou pressione a tecla '{b6b6b6}F{FFFFFF}'");
  452. }
  453. else if(pickupid == Pickup[PickUpBANCOSAIDA])
  454. {
  455. SendClientMessage(playerid, -1, "| INFO | Para sair do Banco digite '{b6b6b6}/Sair{FFFFFF}' ou pressione a tecla '{b6b6b6}F{FFFFFF}'");
  456. }
  457. else if(pickupid == Pickup[PickUpAGENCIAEMPREGOSENTRADA])
  458. {
  459. SendClientMessage(playerid, -1, "| INFO | Para entrar na Agência de Empregos digite '{b6b6b6}/Entrar{FFFFFF}' ou pressione a tecla '{b6b6b6}F{FFFFFF}'");
  460. }
  461. else if(pickupid == Pickup[PickUpAGENCIAEMPREGOSSAIDA])
  462. {
  463. SendClientMessage(playerid, -1, "| INFO | Para sair da Agência de Empregos digite '{b6b6b6}/Sair{FFFFFF}' ou pressione a tecla '{b6b6b6}F{FFFFFF}'");
  464. }
  465. return true;
  466. }
  467.  
  468. public OnVehicleMod(playerid, vehicleid, componentid)
  469. {
  470. return true;
  471. }
  472.  
  473. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  474. {
  475. return true;
  476. }
  477.  
  478. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  479. {
  480. return true;
  481. }
  482.  
  483. public OnPlayerSelectedMenuRow(playerid, row)
  484. {
  485. return true;
  486. }
  487.  
  488. public OnPlayerExitedMenu(playerid)
  489. {
  490. return true;
  491. }
  492.  
  493. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  494. {
  495. return true;
  496. }
  497.  
  498. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  499. {
  500. // Tecla ' F ':
  501. if(newkeys == KEY_SECONDARY_ATTACK)
  502. {
  503. //Entrada Banco:
  504. if(IsPlayerInRangeOfPoint(playerid, 3.0, 592.8407,-1248.2235,18.1530))
  505. {
  506. SetPlayerInterior(playerid, 0);
  507. SetPlayerPos(playerid, 2311.2605,-15.6037,26.7422);
  508. }
  509.  
  510. //Saida Banco:
  511. if(IsPlayerInRangeOfPoint(playerid, 3.0, 2305.5181,-16.1052,26.7496))
  512. {
  513. SetPlayerInterior(playerid, 0);
  514. SetPlayerPos(playerid, 591.0027,-1242.7336,17.9444);
  515. }
  516.  
  517. //Entrada Agência de Empregos:
  518. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1153.9910,-1771.7023,16.5992))
  519. {
  520. SetPlayerInterior(playerid, 3);
  521. SetPlayerPos(playerid, 1494.3116,1303.6232,1093.2891);
  522. }
  523.  
  524. //Saida Agência de Empregos:
  525. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1494.3116,1303.6232,1093.2891))
  526. {
  527. SetPlayerInterior(playerid, 0);
  528. SetPlayerPos(playerid, 1154.0641,-1767.8754,16.5938);
  529. }
  530. }
  531. // Tecla ' Y ':
  532. if(newkeys == KEY_YES)
  533. {
  534. // Menu dos Caixas Eletrônicos:
  535. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1929.4681,-1785.3741,13.5469) || IsPlayerInRangeOfPoint(playerid, 3.0, 2123.1787,897.4747,11.1797) || IsPlayerInRangeOfPoint(playerid, 3.0, 2188.4717,2464.3057,11.2422)
  536. || IsPlayerInRangeOfPoint(playerid, 3.0, 2156.4546,2734.6196,11.1763) || IsPlayerInRangeOfPoint(playerid, 3.0, 1590.4004,2217.2566,11.0692) || IsPlayerInRangeOfPoint(playerid, 3.0, 59.8137,1212.8947,18.8400) || IsPlayerInRangeOfPoint(playerid, 3.0, -2032.1680,151.0729,29.0461))
  537. {
  538. ShowPlayerDialog(playerid, DIALOG_CAIXA_ELETRONICO, DIALOG_STYLE_LIST, "{2fcc38}Caixa Eletrônico", "Saldo\nSacar\n", "Selecionar", "Cancelar");
  539. }
  540. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2419.2571,959.3170,45.2969) || IsPlayerInRangeOfPoint(playerid, 3.0, -2233.2070,-2560.2319,31.9219) || IsPlayerInRangeOfPoint(playerid, 3.0, -1572.9586,-2725.5581,48.7435) || IsPlayerInRangeOfPoint(playerid, 3.0, -80.2851,-1171.9331,2.1556) || IsPlayerInRangeOfPoint(playerid, 3.0, 1009.5620,-930.2037,42.3281) || IsPlayerInRangeOfPoint(playerid, 3.0, 1389.1398,461.9337,20.2020))
  541. {
  542. ShowPlayerDialog(playerid, DIALOG_CAIXA_ELETRONICO, DIALOG_STYLE_LIST, "{2fcc38}Caixa Eletrônico", "Saldo\nSacar\n", "Selecionar", "Cancelar");
  543. }
  544. }
  545. return true;
  546. }
  547.  
  548. public OnRconLoginAttempt(ip[], password[], success)
  549. {
  550. return true;
  551. }
  552.  
  553. public OnPlayerUpdate(playerid)
  554. {
  555. return true;
  556. }
  557.  
  558. public OnPlayerStreamIn(playerid, forplayerid)
  559. {
  560. return true;
  561. }
  562.  
  563. public OnPlayerStreamOut(playerid, forplayerid)
  564. {
  565. return true;
  566. }
  567.  
  568. public OnVehicleStreamIn(vehicleid, forplayerid)
  569. {
  570. return true;
  571. }
  572.  
  573. public OnVehicleStreamOut(vehicleid, forplayerid)
  574. {
  575. return true;
  576. }
  577.  
  578. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  579. {
  580. switch( dialogid )
  581. {
  582. case DIALOG_LOGIN:
  583. {
  584. if(!response) return Kick(playerid);
  585.  
  586. if(response)
  587. {
  588. new file[70];
  589. format(file, sizeof(file), DESTINO_USUARIOS, playerName(playerid));
  590.  
  591. if(strlen(inputtext) < 4 || strlen(inputtext) > 16)
  592. {
  593. format(String, sizeof String, "{FFFFFF}Senha muito grande ou muito pequena,{6090E0} %s{FFFFFF} !\n\n{FFFFFF}Coloque sua senha e clique em {FF0000}Logar", playerName(playerid));
  594. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}Logando em uma conta", String, "Logar", "Sair");
  595.  
  596. SendClientMessage(playerid, COR_ERRO, "| INFO | A senha deve ter entre 4 e 16 caracteres!");
  597. return false;
  598. }
  599.  
  600. if(!strcmp(inputtext, DOF2_GetString(file, "Senha"), true))
  601. {
  602. carregarJogador(playerid);
  603. }
  604. else
  605. {
  606. Kick(playerid);
  607. }
  608. }
  609. }
  610. case DIALOG_REGISTER:
  611. {
  612. if(!response) return Kick(playerid);
  613.  
  614. if(response)
  615. {
  616. new file[70];
  617. format(file, sizeof(file), DESTINO_USUARIOS, playerName(playerid));
  618.  
  619. if(strlen(inputtext) < 4 || strlen(inputtext) > 16)
  620. {
  621. format(String, sizeof String, "{FFFFFF}Senha muito grande ou muito pequena,{6090E0} %s{FFFFFF} !\n\n{FFFFFF}Coloque sua senha e clique em {FF0000}Cadastrar", playerName(playerid));
  622. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FF0000}Cadastrando uma conta", String, "Cadastrar", "Sair");
  623.  
  624. SendClientMessage(playerid, COR_ERRO, "| INFO | A senha deve ter entre 4 e 16 caracteres!");
  625. return false;
  626. }
  627.  
  628. criarJogador(playerid, inputtext);
  629. }
  630. }
  631. }
  632. return true;
  633. }
  634.  
  635. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  636. {
  637. return true;
  638. }
  639.  
  640. public CB_mensagensAleatorias()
  641. {
  642. return ( SendClientMessageToAll(-1, mensagensAleatorias[random(sizeof mensagensAleatorias)] ) );
  643. }
  644.  
  645. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  646. {
  647. if(!success) return SendClientMessage(playerid, COR_ERRO, "| ERRO | Comandos Inválido.");
  648. return true;
  649. }
  650.  
  651. public ganharExperiencia(playerid)
  652. {
  653. playerInfo[playerid][pExperiencia]++;
  654. SendClientMessageEx(playerid, 0x75EA00AA, "| UP | Você ganhou +1 ponto de experiência ( %d/5 )", playerInfo[playerid][pExperiencia]);
  655.  
  656. if(playerInfo[playerid][pExperiencia] >= 5)
  657. {
  658. playerInfo[playerid][pExperiencia] = 0;
  659. playerInfo[playerid][pLevel]++;
  660. SendClientMessageEx(playerid, 0x75EA00AA, "| UP | Você juntou 5 de Experiência, e ganhou +1 level ( %d )", playerInfo[playerid][pLevel]);
  661. SetPlayerScore(playerid, playerInfo[playerid][pLevel]);
  662. }
  663. return true;
  664. }
  665.  
  666. // -------------------------------------------------------------------------- //
  667.  
  668. // COMANDOS GERAIS:
  669.  
  670. // -------------------------------------------------------------------------- //
  671. COMMAND:ajuda(playerid, params[])
  672. {
  673. new acao[50];
  674. new dialog_ajuda[5000];
  675.  
  676. if(sscanf(params, "s[50]", acao))
  677. return SendClientMessage(playerid, COR_ERRO, "| ERRO | Digite: /Ajuda Level, Salario, Comandos, Contato, Casa, Empresa, Carro, Loteria, Concessionaria, Mercadoria");
  678.  
  679. if(!strcmp(acao, "level", true) || !strcmp(acao, "Level", true))
  680. {
  681. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Level{FFFFFF} -----------------------------------------------------------------\n\n");
  682. strcat(dialog_ajuda, "{FFFFFF}» A cada 10 minutos jogando você ganhará 1 de experiência\n\n");
  683. strcat(dialog_ajuda, "{FFFFFF}» Juntando 5 de experiência você ganhará 1 level\n\n");
  684. strcat(dialog_ajuda, "{FFFFFF}» Para ver seu level Digite: /meulevel\n\n");
  685. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Level{FFFFFF} -----------------------------------------------------------------");
  686. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  687. }
  688.  
  689. else if(!strcmp(acao, "salario", true) || !strcmp(acao, "Salario", true))
  690. {
  691. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF00}Ajuda Salário{FFFFFF} -----------------------------------------------------------------\n\n");
  692. strcat(dialog_ajuda, "{FFFFFF}» O salário vem a cada 1 hora e é depositado automaticamente em sua conta\n\n");
  693. strcat(dialog_ajuda, "{FFFFFF}» Cada profissão tem seu salário diferente e justo\n\n");
  694. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF00}Ajuda Salário{FFFFFF} -----------------------------------------------------------------");
  695. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  696. }
  697.  
  698. else if(!strcmp(acao, "comandos", true) || !strcmp(acao, "Comandos", true))
  699. {
  700. strcat(dialog_ajuda, "{FFFFFF}------------------------------------------------------------------------ {00FF7F}Ajuda Comandos{FFFFFF} ------------------------------------------------------------------------\n\n");
  701. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Regras{FFFFFF} - Para ver as regras do servidor\n");
  702. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Creditos{FFFFFF} - Para ver os créditos do servidor\n");
  703. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Admins{FFFFFF} - Para ver os Admins online no momento\n");
  704. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Ajuda{FFFFFF} - Para saber sobre Level, Salario, Comandos, Contato, Casa, Empresa, Carro, Loteria, Concessionaria, Mercadoria\n");
  705. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/MeuLevel{FFFFFF} - Para ver seu level atual\n");
  706. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Trancar{FFFFFF} - Para trancar um veículo\n");
  707. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Destrancar{FFFFFF} - Para destrancar um veículo\n");
  708. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/TrocarSenha{FFFFFF} - Para trocar sua senha\n");
  709. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Continuar{FFFFFF} - Para ir até sua última posição\n");
  710. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Advogados{FFFFFF} - Para ver os advogados online\n");
  711. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Vips{FFFFFF} - Para ver os jogadores V.I.P online\n");
  712. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/VantagensVIP{FFFFFF} - Para saber as vantagens V.I.P\n");
  713. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/VipAtivar{FFFFFF} - Para ativar ou verificar um código de transação\n");
  714. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Tutorial{FFFFFF} - Para ver os locais e saber o básico do servidor\n");
  715. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/TopLevel - /TopGrana{FFFFFF} - Para ver o top 5 de jogadores com maior level e mais ricos online\n");
  716. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/SairAFK{FFFFFF} - Para sair do modo AFK\n");
  717. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/IrEvento{FFFFFF} - Para ir até um evento caso tenha\n");
  718. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Presos{FFFFFF} - Para ver a lista de presos online\n");
  719. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Profissao{FFFFFF} - Para ver os comandos da profissão\n");
  720. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Identidade{FFFFFF} - Para ver sua identidade\n");
  721. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Abastecer{FFFFFF} - Para abastecer um veículo em determinado posto\n");
  722. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Animes{FFFFFF} - Para ver todos os animes disponíveis\n");
  723. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/190 [Texto]{FFFFFF} - Para fazer alguma denuncia a polícia\n");
  724. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/192 [Texto]{FFFFFF} - Para chamar a equipe de paramédicos\n");
  725. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Taxi [Local]{FFFFFF} - Para chamar um táxi\n");
  726. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Mecanico [Local]{FFFFFF} - Para chamar um mecânico\n");
  727. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Info{FFFFFF} - Para saber sobre Celular, Semparar, MP3, GPS, Arara, Gorro, Oculos, Bone, Banana, Dinamite, Drogas\n");
  728. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Dúvida [Dúvida]{FFFFFF} - Para tirar alguma dúvida com algum membro da administração\n");
  729. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Relatorio [Id-Acusado] [Denuncia]{FFFFFF} - Para denunciar algum jogador contra as regras ou usando Hack\n");
  730. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Transferir [Id] [Quantia]{FFFFFF} - Para transferir uma determinada quantia em dinheiro a um determinado jogador\n");
  731. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/LigarVeiculo /DesligarVeiculo{FFFFFF} - Para ligar ou desligar um veículo\n");
  732. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Kits{FFFFFF} - Para ver os kits de armas disponíveis na favela\n");
  733. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/ComparKit Kit1 a Kit6{FFFFFF} - Para comprar um kit de arma de sua escolha\n");
  734. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/HQ{FFFFFF} - Para ativar / desativar a marcação da profissão atual no radar\n\n");
  735. strcat(dialog_ajuda, "{FFFFFF}------------------------------------------------------------------------ {00FF7F}Ajuda Comandos{FFFFFF} ------------------------------------------------------------------------");
  736. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  737. }
  738.  
  739. else if(!strcmp(acao, "contato", true) || !strcmp(acao, "Contato", true))
  740. {
  741. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Contato{FFFFFF} -----------------------------------------------------------------\n\n");
  742. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}Site:{FFFFFF} www.loskatchorros.com.br\n\n");
  743. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}Fórum:{FFFFFF} loskatchorros.com.br/ipb\n\n");
  744. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}TeamSpeak 3:{FFFFFF} ts.loskatchorros.com.br\n\n");
  745. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}IP Servidor 1:{FFFFFF} server1.loskatchorros.com.br:7777\n\n");
  746. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}IP Servidor 4:{FFFFFF} server4.loskatchorros.com.br:7777\n\n");
  747. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}IP Servidor 5:{FFFFFF} server5.loskatchorros.com.br:7777\n\n");
  748. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Contato{FFFFFF} -----------------------------------------------------------------");
  749. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  750. }
  751.  
  752. else if(!strcmp(acao, "casa", true) || !strcmp(acao, "Casa", true))
  753. {
  754. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF7F}Ajuda Casa{FFFFFF} -----------------------------------------------------------------\n\n");
  755. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/ComprarCasa:{FFFFFF} Para comprar uma casa\n\n");
  756. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/VenderCasa:{FFFFFF} Para vender sua casa\n\n");
  757. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/AbrirCasa:{FFFFFF} Para abrir uma casa\n\n");
  758. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/FecharCasa:{FFFFFF} Para fechar uma casa\n\n");
  759. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/InfoCasa:{FFFFFF} Ve as info de uma casa\n\n");
  760. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Convidar [id]:{FFFFFF} Para adicionar um morador\n\n");
  761. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Remover:{FFFFFF} Para remover o morador\n\n");
  762. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/MensagemCasa [texto]:{FFFFFF} Adiciona uma mensagem\n\n");
  763. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Aceitar:{FFFFFF} Para aceitar uma moradia caso alguém lhe convide\n\n");
  764. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Recusar:{FFFFFF} Para recusar uma moradia caso alguém lhe convide\n\n");
  765. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/Revogar:{FFFFFF} Para perder a moradia\n\n");
  766. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/MinhaCasa:{FFFFFF} Para localizar / deslocalizar sua casa caso tenha\n\n");
  767. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF7F}Ajuda Casa{FFFFFF} -----------------------------------------------------------------");
  768. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  769. }
  770.  
  771. else if(!strcmp(acao, "empresa", true) || !strcmp(acao, "Empresa", true))
  772. {
  773. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Empresa{FFFFFF} -----------------------------------------------------------------\n\n");
  774. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/VenderEmpresa:{FFFFFF} Para comprar uma empresa\n\n");
  775. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/VenderEmpresa:{FFFFFF} Para vender sua empresa\n\n");
  776. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/InfoEmpresa:{FFFFFF} Ve as info de uma empresa\n\n");
  777. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/Contratar:{FFFFFF} Para liberar as contratações ou bloquea-las\n\n");
  778. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/Demitir:{FFFFFF} Para demitir um empregado\n\n");
  779. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/SacarEmpresa:{FFFFFF} Para sacar a renda da sua empresa\n\n");
  780. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/PegarMercadoria:{FFFFFF} Para pegar a mercadoria\n\n");
  781. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/EntregarMercadoria:{FFFFFF} Para entregar a mercadoria em sua empresa\n\n");
  782. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/MensagemEmpresa [texto]:{FFFFFF} Adiciona uma mensagem\n\n");
  783. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/SairEmprego:{FFFFFF} Para se demitir de uma empresa\n\n");
  784. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/Trabalho:{FFFFFF} Para começar um trabalho em uma determinada vaga\n\n");
  785. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/MinhaEmpresa:{FFFFFF} Para localizar / deslocalizar sua empresa caso tenha\n\n");
  786. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Empresa{FFFFFF} -----------------------------------------------------------------");
  787. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  788. }
  789.  
  790. else if(!strcmp(acao, "carro", true) || !strcmp(acao, "Carro", true))
  791. {
  792. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF7F}Ajuda Carro{FFFFFF} -----------------------------------------------------------------\n\n");
  793. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/MenuVeiculo:{FFFFFF} Para ver o menu do seu veículo\n\n");
  794. strcat(dialog_ajuda, "{FFFFFF}» {00FF7F}/LocalizarVeiculo:{FFFFFF} Para localizar o veículo caso tenha\n\n");
  795. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF7F}Ajuda Carro{FFFFFF} -----------------------------------------------------------------");
  796. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  797. }
  798.  
  799. else if(!strcmp(acao, "loteria", true) || !strcmp(acao, "Loteria", true))
  800. {
  801. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF00}Ajuda Loteria{FFFFFF} -----------------------------------------------------------------\n\n");
  802. strcat(dialog_ajuda, "{FFFFFF}» A loteria é sorteada a cada 1 hora, caso ninguem ganhar o valor vai acumulando\n\n");
  803. strcat(dialog_ajuda, "{FFFFFF}» {00FF00}/Loteria [ Numero 1 a 300 ]:{FFFFFF} Para comprar um número {00FF00}$100\n\n");
  804. strcat(dialog_ajuda, "{FFFFFF}» {00FF00}/Premio:{FFFFFF} Para saber o valor que está acumulado\n\n");
  805. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF00}Ajuda Loteria{FFFFFF} -----------------------------------------------------------------");
  806. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  807. }
  808.  
  809. else if(!strcmp(acao, "concessionaria", true) || !strcmp(acao, "Concessionaria", true))
  810. {
  811. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF00}Ajuda Concessionária{FFFFFF} -----------------------------------------------------------------\n\n");
  812. strcat(dialog_ajuda, "{FFFFFF}» A concessionária está localizada por um ' {FF1493}C{FFFFFF} ' no mapa, temos 6 concessionárias no total\n\n");
  813. strcat(dialog_ajuda, "{FFFFFF}» 4 de veículos terrestre - Localizadas em Los Santos, Las Venturas e San Fierro\n\n");
  814. strcat(dialog_ajuda, "{FFFFFF}» 1 de veículos aquáticos - Localizada em Bayside\n\n");
  815. strcat(dialog_ajuda, "{FFFFFF}» 1 de veículos aéreos - Localizada no Aeroporto Abandonado\n\n");
  816. strcat(dialog_ajuda, "{FFFFFF}» Cada veículo tem um valor fixo e justo, caso desejar vender irá ganhar apenas 90% do valor pago\n\n");
  817. strcat(dialog_ajuda, "{FFFFFF}» {00FF00}/MenuVeiculo:{FFFFFF} Para ver o menu do seu veículo\n\n");
  818. strcat(dialog_ajuda, "{FFFFFF}» {00FF00}/LocalizarVeiculo:{FFFFFF} Para localizar o veículo salvo\n\n");
  819. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {00FF00}Ajuda Concessionária{FFFFFF} -----------------------------------------------------------------");
  820. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  821. }
  822.  
  823. else if(!strcmp(acao, "mercadoria", true) || !strcmp(acao, "Mercadoria", true))
  824. {
  825. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Mercadoria{FFFFFF} -----------------------------------------------------------------\n\n");
  826. strcat(dialog_ajuda, "{FFFFFF}» Ao começar trabalhar em uma empresa você deverá\n\n");
  827. strcat(dialog_ajuda, "{FFFFFF}» ir até BaySide (opcional = Canto esquerdo encima de San Fierro) até o checkpoint\n\n");
  828. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/PegarMercadoria:{FFFFFF} Para poder pegar uma mercadoria a cada level\n\n");
  829. strcat(dialog_ajuda, "{FFFFFF}» {6495ED}/EntregarMercadoria:{FFFFFF} Para entregar a mercadoria em sua empresa ou na que trabalha\n\n");
  830. strcat(dialog_ajuda, "{FFFFFF}----------------------------------------------------------------- {6495ED}Ajuda Mercadoria{FFFFFF} -----------------------------------------------------------------");
  831. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_ajuda, "Fechar", #);
  832. }
  833. else
  834. return SendClientMessage(playerid, COR_ERRO, "| ERRO | Digite: /Ajuda Level, Salario, Comandos, Contato, Casa, Empresa, Carro, Loteria, Concessionaria, Mercadoria");
  835. return true;
  836. }
  837.  
  838. COMMAND:creditos(playerid)
  839. {
  840. new dialog_creditos[500];
  841. strcat(dialog_creditos, "{FFFFFF}-------------------------------------- {6495ED}Créditos{FFFFFF} --------------------------------------\n\n");
  842. strcat(dialog_creditos, "{FFFFFF}» {6495ED}GameMode:{FFFFFF} Cidade Vida Real CVR - [L.K] RPG v0.0.1-RC1\n\n");
  843. strcat(dialog_creditos, "{FFFFFF}» Desenvolvido e Atualizado por: {4169E1}[L.K]WilliamL {FFFFFF}&{6090E0} [L.K]Rafhael\n\n");
  844. strcat(dialog_creditos, "{FFFFFF}» [L.K]Los Katchorros jogos online ®\n\n");
  845. strcat(dialog_creditos, "{FFFFFF}» {006400}www.LosKatchorros.com.br\n\n");
  846. strcat(dialog_creditos, "{FFFFFF}-------------------------------------- {6495ED}Créditos{FFFFFF} --------------------------------------");
  847. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_creditos, "Fechar", #);
  848. return true;
  849. }
  850.  
  851. COMMAND:identidade(playerid)
  852. {
  853. new dialog_creditos[2000];
  854. strcat(dialog_creditos, "{FFFFFF}-------------------------- {00FF00}Identidade{FFFFFF} --------------------------\n");
  855. strcatEx(dialog_creditos, "{FFFFFF}» Level: {00FF00}%d\n", playerInfo[playerid][pLevel]);
  856. strcatEx(dialog_creditos, "{FFFFFF}» Experiência: {00FF00}%d\n", playerInfo[playerid][pExperiencia]);
  857. strcatEx(dialog_creditos, "{FFFFFF}» V.I.P: {FF4500}%s\n", playerInfo[playerid][pVIP] ? ("Sim") : ("Não"));
  858. strcatEx(dialog_creditos, "{FFFFFF}» Skin ID: {00FF00}%d\n", playerInfo[playerid][pSkin]);
  859. strcatEx(dialog_creditos, "{FFFFFF}» Avisos: {FF0000}%d\n", playerInfo[playerid][pAvisos]);
  860. strcatEx(dialog_creditos, "{FFFFFF}» Porte de Armas: {FF4500}%s\n", playerInfo[playerid][pPorteDeArmas] ? ("Sim") : ("Não"));
  861. strcatEx(dialog_creditos, "{FFFFFF}» Habilitação Terrestre: {FF4500}%s\n", playerInfo[playerid][pHabilitacaoTerrestre] ? ("Sim") : ("Não"));
  862. strcatEx(dialog_creditos, "{FFFFFF}» Habilitação Nautica: {FF4500}%s\n", playerInfo[playerid][pHabilitacaoNautica] ? ("Sim") : ("Não"));
  863. strcatEx(dialog_creditos, "{FFFFFF}» Habilitação Aérea: {FF4500}%s\n", playerInfo[playerid][pHabilitacaoAerea] ? ("Sim") : ("Não"));
  864. strcatEx(dialog_creditos, "{FFFFFF}» Habilitação Especial HEVG: {FF4500}%s\n", playerInfo[playerid][pHabilitacaoEspecialHEVG] ? ("Sim") : ("Não"));
  865. strcatEx(dialog_creditos, "{FFFFFF}» Habilitação Especial HELG: {FF4500}%s\n", playerInfo[playerid][pHabilitacaoEspecialHELG] ? ("Sim") : ("Não"));
  866. strcatEx(dialog_creditos, "{FFFFFF}» Habilitação Especial HEAG: {FF4500}%s\n", playerInfo[playerid][pHabilitacaoEspecialHEAG] ? ("Sim") : ("Não"));
  867. strcatEx(dialog_creditos, "{FFFFFF}» Celular: {FF4500}%s\n", playerInfo[playerid][pCelular] ? ("Sim") : ("Não"));
  868. strcatEx(dialog_creditos, "{FFFFFF}» MP3: {FF4500}%s\n", playerInfo[playerid][pMP3] ? ("Sim") : ("Não"));
  869. strcatEx(dialog_creditos, "{FFFFFF}» GPS: {FF4500}%s\n", playerInfo[playerid][pGPS] ? ("Sim") : ("Não"));
  870. strcatEx(dialog_creditos, "{FFFFFF}» SemParar: {FF4500}%s\n", playerInfo[playerid][pSemParar] ? ("Sim") : ("Não"));
  871. strcatEx(dialog_creditos, "{FFFFFF}» RelogioUP: {FF4500}%s\n", playerInfo[playerid][pRelogioUP] ? ("Sim") : ("Não"));
  872. strcatEx(dialog_creditos, "{FFFFFF}» Capacete: {FF4500}%s\n", playerInfo[playerid][pCapacete] ? ("Sim") : ("Não"));
  873. strcatEx(dialog_creditos, "{FFFFFF}» Oculos: {FF4500}%s\n", playerInfo[playerid][pOculos] ? ("Sim") : ("Não"));
  874. strcatEx(dialog_creditos, "{FFFFFF}» Bone: {FF4500}%s\n", playerInfo[playerid][pBone] ? ("Sim") : ("Não"));
  875. strcatEx(dialog_creditos, "{FFFFFF}» Gorro: {FF4500}%s\n", playerInfo[playerid][pGorro] ? ("Sim") : ("Não"));
  876. strcatEx(dialog_creditos, "{FFFFFF}» Arara: {FF4500}%s\n", playerInfo[playerid][pArara] ? ("Sim") : ("Não"));
  877. strcatEx(dialog_creditos, "{FFFFFF}» Bandana: {FF4500}%s\n", playerInfo[playerid][pBandana] ? ("Sim") : ("Não"));
  878. strcatEx(dialog_creditos, "{FFFFFF}» Gasolina: {00FF00}%d Litros\n", playerInfo[playerid][pGasolina]);
  879. strcatEx(dialog_creditos, "{FFFFFF}» Diesel: {00FF00}%d Litros\n", playerInfo[playerid][pDiesel]);
  880. strcatEx(dialog_creditos, "{FFFFFF}» Etanol: {00FF00}%d Litros\n", playerInfo[playerid][pEtanol]);
  881. strcatEx(dialog_creditos, "{FFFFFF}» AvGas: {00FF00}%d Litros\n", playerInfo[playerid][pAvGas]);
  882. strcatEx(dialog_creditos, "{FFFFFF}» Gas JetPack: {00FF00}%d Litros\n", playerInfo[playerid][pGasJetPack]);
  883. strcat(dialog_creditos, "{FFFFFF}» Email: {00FF00}seuemail@corporativa.com\n");
  884. strcat(dialog_creditos, "{FFFFFF}-------------------------- {00FF00}Identidade{FFFFFF} --------------------------");
  885. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF} ", dialog_creditos, "Fechar", #);
  886. return true;
  887. }
  888.  
  889. COMMAND:meulevel(playerid)
  890. {
  891. SendClientMessage(playerid, COR_BRANCO, "{4169E1}~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Level ~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  892. SendClientMessageEx(playerid, COR_BRANCO, "» Nick: %s[%d]", playerName(playerid), playerid);
  893. SendClientMessageEx(playerid, COR_BRANCO, "» Level: %d", playerInfo[playerid][pLevel]);
  894. SendClientMessageEx(playerid, COR_BRANCO, "» Experiência: %d", playerInfo[playerid][pExperiencia]);
  895. SendClientMessage(playerid, COR_BRANCO, "{4169E1}~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Level ~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  896. return true;
  897. }
  898.  
  899. COMMAND:vantagensvip(playerid)
  900. {
  901. new DIALOG_VIP[2000];
  902. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Salario VIP 3000 cada 1 hora\n");
  903. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Área VIP com armas GRATIS\n");
  904. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Sistema Auto-Tuning\n");
  905. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Nitro infinito\n");
  906. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Nick com prefixo [VIP] no chat\n");
  907. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Mudar a cor da Tag [VIP]\n");
  908. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Reparo de veículo\n");
  909. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Virar veículo caso capote-o\n");
  910. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Pintar veículo\n");
  911. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Tunar veículo\n");
  912. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Colete\n");
  913. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}JetPack\n");
  914. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Plano de Saúde sem taxas\n");
  915. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Grupo no fórum VIP\n");
  916. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Tag VIP acima do skin\n");
  917. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Chat VIP\n");
  918. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Neon\n");
  919. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Laser para armas\n");
  920. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Relatório VIP\n");
  921. strcat(DIALOG_VIP, "{1E90FF}» {FFFFFF}Pode ter até 10 veículos exclusivos\n\n");
  922. strcat(DIALOG_VIP, "{FFFFFF}Mais informações no site\n");
  923. strcat(DIALOG_VIP, "{FFFFFF}Acesse {006400}www.loskatchorros.com.br/loja\n");
  924. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "{FFFFFF}Vantagens VIP", DIALOG_VIP, "Fechar", #);
  925. return true;
  926. }
  927.  
  928. COMMAND:admins(playerid)
  929. {
  930. new dialog_admins[300];
  931. new count = 0;
  932.  
  933. strcat(dialog_admins, "{FFFFFF}Admin\t{FFFFFF}Cargo\t{FFFFFF}Status\n");
  934.  
  935. for(new i; i < MAX_PLAYERS; i++)
  936. {
  937. if(playerInfo[i][pAdmin] > 0)
  938. {
  939. strcatEx(dialog_admins, "{FFFFFF}%s[%d]\t{FF4500}%s\t{33AA33}Online\n", playerName(i), i, adminLevelName(playerInfo[i][pAdmin]));
  940. count++;
  941. }
  942. }
  943.  
  944. if(!count)
  945. {
  946. strcat(dialog_admins, "{FF0000}Não há ninguem da Staff online no momento.");
  947. }
  948.  
  949. format(String, sizeof(String), "Admins Online: [ {33AA33}%d{FFFFFF} ]", count);
  950. ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, String, dialog_admins, "Fechar", #);
  951. return true;
  952. }
  953.  
  954.  
  955. // -------------------------------------------------------------------------- //
  956.  
  957. // FUNÇÕES STOCK:
  958.  
  959. // -------------------------------------------------------------------------- //
  960. stock adminLevelName(level)
  961. {
  962. new adm_lvl_name[30];
  963.  
  964. switch(level)
  965. {
  966. case 1: adm_lvl_name = "Moderador(a)";
  967. case 2: adm_lvl_name = "Administrador(a)";
  968. case 3: adm_lvl_name = "Sub-Staff";
  969. case 4: adm_lvl_name = "Diretor(a)";
  970. }
  971.  
  972. return ( adm_lvl_name );
  973. }
  974.  
  975. stock playerName(playerid)
  976. {
  977. new sendername[MAX_PLAYER_NAME];
  978. GetPlayerName(playerid, sendername, sizeof(sendername));
  979. return ( sendername );
  980. }
  981.  
  982. stock criarJogador(playerid, password[])
  983. {
  984. new file[70];
  985. format(file, sizeof(file), DESTINO_USUARIOS, playerName(playerid));
  986.  
  987. // DOF2_CreateFile:
  988. DOF2_CreateFile(file);
  989.  
  990. // DOF2_SetString:
  991. DOF2_SetString(file, "Senha", password);
  992.  
  993. // DOF2_SetInt:
  994. DOF2_SetInt(file, "Admin", 0);
  995. DOF2_SetInt(file, "Level", 0);
  996. DOF2_SetInt(file, "Experiencia", 0);
  997. DOF2_SetInt(file, "Skin", 154);
  998. DOF2_SetInt(file, "Avisos", 0);
  999. DOF2_SetInt(file, "Gasolina", 20);
  1000. DOF2_SetInt(file, "Diesel", 20);
  1001. DOF2_SetInt(file, "Etanol", 20);
  1002. DOF2_SetInt(file, "GasJetPack", 20);
  1003. DOF2_SetInt(file, "AvGas", 20);
  1004.  
  1005. // DOF2_SetBool:
  1006. DOF2_SetBool(file, "VIP", false);
  1007. DOF2_SetBool(file, "PorteDeArmas", false);
  1008. DOF2_SetBool(file, "HabilitacaoTerrestre", false);
  1009. DOF2_SetBool(file, "HabilitacaoNautica", false);
  1010. DOF2_SetBool(file, "HabilitacaoAerea", false);
  1011. DOF2_SetBool(file, "HabilitacaoEspecialHEVG", false);
  1012. DOF2_SetBool(file, "HabilitacaoEspecialHELG", false);
  1013. DOF2_SetBool(file, "HabilitacaoEspecialHEAG", false);
  1014. DOF2_SetBool(file, "Celular", false);
  1015. DOF2_SetBool(file, "MP3", false);
  1016. DOF2_SetBool(file, "GPS", false);
  1017. DOF2_SetBool(file, "SemParar", false);
  1018. DOF2_SetBool(file, "RelogioUP", false);
  1019. DOF2_SetBool(file, "Capacete", false);
  1020. DOF2_SetBool(file, "Oculos", false);
  1021. DOF2_SetBool(file, "Bone", false);
  1022. DOF2_SetBool(file, "Gorro", false);
  1023. DOF2_SetBool(file, "Arara", false);
  1024. DOF2_SetBool(file, "Bandana", false);
  1025.  
  1026. // Última Posição:
  1027. DOF2_SetFloat(file, "Pos X", 820.0127);
  1028. DOF2_SetFloat(file, "Pos Y", -1344.0992);
  1029. DOF2_SetFloat(file, "Pos Z", 13.5225);
  1030. DOF2_SetFloat(file, "Pos ANGLE", 0.0);
  1031. DOF2_SetInt(file, "Interior", 0);
  1032. DOF2_SetInt(file, "Virtual World", 0);
  1033.  
  1034. // DOF2_SaveFile:
  1035. DOF2_SaveFile();
  1036.  
  1037. SendClientMessage(playerid, COR_BRANCO, "| CONTA | Registrado com sucesso!");
  1038. format(String, sizeof String, "{6090E0}Usuário:{FFFFFF} %s\n\n{FFFFFF}Conta: {00FF00}Registrada\n\n{FFFFFF}Informe sua Senha:", playerName(playerid));
  1039. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}Conta", String, "Logar", "Sair");
  1040. return true;
  1041. }
  1042.  
  1043. stock salvarJogador(playerid)
  1044. {
  1045. new file[70];
  1046. format(file, sizeof(file), DESTINO_USUARIOS, playerName(playerid));
  1047.  
  1048. // DOF2_SetInt:
  1049. DOF2_SetInt(file, "Admin", playerInfo[playerid][pAdmin]);
  1050. DOF2_SetInt(file, "Level", playerInfo[playerid][pLevel]);
  1051. DOF2_SetInt(file, "Experiencia", playerInfo[playerid][pExperiencia]);
  1052. DOF2_SetInt(file, "Skin", playerInfo[playerid][pSkin]);
  1053. DOF2_SetInt(file, "Avisos", playerInfo[playerid][pAvisos]);
  1054. DOF2_SetInt(file, "Gasolina", playerInfo[playerid][pGasolina]);
  1055. DOF2_SetInt(file, "Diesel", playerInfo[playerid][pDiesel]);
  1056. DOF2_SetInt(file, "Etanol", playerInfo[playerid][pEtanol]);
  1057. DOF2_SetInt(file, "GasJetPack", playerInfo[playerid][pGasJetPack]);
  1058. DOF2_SetInt(file, "AvGas", playerInfo[playerid][pAvGas]);
  1059.  
  1060. // DOF2_SetBool:
  1061. DOF2_SetBool(file, "VIP", playerInfo[playerid][pVIP]);
  1062. DOF2_SetBool(file, "PorteDeArmas", playerInfo[playerid][pPorteDeArmas]);
  1063. DOF2_SetBool(file, "HabilitacaoTerrestre", playerInfo[playerid][pHabilitacaoTerrestre]);
  1064. DOF2_SetBool(file, "HabilitacaoNautica", playerInfo[playerid][pHabilitacaoNautica]);
  1065. DOF2_SetBool(file, "HabilitacaoAerea", playerInfo[playerid][pHabilitacaoAerea]);
  1066. DOF2_SetBool(file, "HabilitacaoEspecialHEVG", playerInfo[playerid][pHabilitacaoEspecialHEVG]);
  1067. DOF2_SetBool(file, "HabilitacaoEspecialHELG", playerInfo[playerid][pHabilitacaoEspecialHELG]);
  1068. DOF2_SetBool(file, "HabilitacaoEspecialHEAG", playerInfo[playerid][pHabilitacaoEspecialHEAG]);
  1069. DOF2_SetBool(file, "Celular", playerInfo[playerid][pCelular]);
  1070. DOF2_SetBool(file, "MP3", playerInfo[playerid][pMP3]);
  1071. DOF2_SetBool(file, "GPS", playerInfo[playerid][pGPS]);
  1072. DOF2_SetBool(file, "SemParar", playerInfo[playerid][pSemParar]);
  1073. DOF2_SetBool(file, "RelogioUP", playerInfo[playerid][pRelogioUP]);
  1074. DOF2_SetBool(file, "Capacete", playerInfo[playerid][pCapacete]);
  1075. DOF2_SetBool(file, "Oculos", playerInfo[playerid][pOculos]);
  1076. DOF2_SetBool(file, "Bone", playerInfo[playerid][pBone]);
  1077. DOF2_SetBool(file, "Gorro", playerInfo[playerid][pGorro]);
  1078. DOF2_SetBool(file, "Arara", playerInfo[playerid][pArara]);
  1079. DOF2_SetBool(file, "Bandana", playerInfo[playerid][pBandana]);
  1080.  
  1081. // Última Posição:
  1082. new Float: x, Float: y, Float: z, Float: angle;
  1083. GetPlayerPos(playerid, x, y, z) && GetPlayerFacingAngle(playerid, angle);
  1084.  
  1085. DOF2_SetFloat(file, "Pos X", x);
  1086. DOF2_SetFloat(file, "Pos Y", y);
  1087. DOF2_SetFloat(file, "Pos Z", z);
  1088. DOF2_SetFloat(file, "Pos ANGLE", angle);
  1089. DOF2_SetInt(file, "Interior", GetPlayerInterior(playerid));
  1090. DOF2_SetInt(file, "Virtual World", GetPlayerVirtualWorld(playerid));
  1091.  
  1092. // DOF2_SaveFile:
  1093. DOF2_SaveFile();
  1094. return true;
  1095. }
  1096.  
  1097. stock carregarJogador(playerid)
  1098. {
  1099. new file[70];
  1100. format(file, sizeof(file), DESTINO_USUARIOS, playerName(playerid));
  1101.  
  1102. // DOF2_GetInt:
  1103. playerInfo[playerid][pAdmin] = DOF2_GetInt(file, "Admin");
  1104. playerInfo[playerid][pLevel] = DOF2_GetInt(file, "Level");
  1105. playerInfo[playerid][pExperiencia] = DOF2_GetInt(file, "Experiencia");
  1106. playerInfo[playerid][pSkin] = DOF2_GetInt(file, "Skin");
  1107. playerInfo[playerid][pAvisos] = DOF2_GetInt(file, "Avisos");
  1108. playerInfo[playerid][pGasolina] = DOF2_GetInt(file, "Gasolina");
  1109. playerInfo[playerid][pDiesel] = DOF2_GetInt(file, "Diesel");
  1110. playerInfo[playerid][pEtanol] = DOF2_GetInt(file, "Etanol");
  1111. playerInfo[playerid][pGasJetPack] = DOF2_GetInt(file, "GasJetPack");
  1112. playerInfo[playerid][pAvGas] = DOF2_GetInt(file, "AvGas");
  1113.  
  1114. // DOF2_GetBool:
  1115. playerInfo[playerid][pVIP] = DOF2_GetBool(file, "VIP");
  1116. playerInfo[playerid][pPorteDeArmas] = DOF2_GetBool(file, "PorteDeArmas");
  1117. playerInfo[playerid][pHabilitacaoTerrestre] = DOF2_GetBool(file, "HabilitacaoTerrestre");
  1118. playerInfo[playerid][pHabilitacaoNautica] = DOF2_GetBool(file, "HabilitacaoNautica");
  1119. playerInfo[playerid][pHabilitacaoAerea] = DOF2_GetBool(file, "HabilitacaoAerea");
  1120. playerInfo[playerid][pHabilitacaoEspecialHEVG] = DOF2_GetBool(file, "HabilitacaoEspecialHEVG");
  1121. playerInfo[playerid][pHabilitacaoEspecialHELG] = DOF2_GetBool(file, "HabilitacaoEspecialHELG");
  1122. playerInfo[playerid][pHabilitacaoEspecialHEAG] = DOF2_GetBool(file, "HabilitacaoEspecialHEAG");
  1123. playerInfo[playerid][pCelular] = DOF2_GetBool(file, "Celular");
  1124. playerInfo[playerid][pMP3] = DOF2_GetBool(file, "MP3");
  1125. playerInfo[playerid][pGPS] = DOF2_GetBool(file, "GPS");
  1126. playerInfo[playerid][pSemParar] = DOF2_GetBool(file, "SemParar");
  1127. playerInfo[playerid][pRelogioUP] = DOF2_GetBool(file, "RelogioUP");
  1128. playerInfo[playerid][pCapacete] = DOF2_GetBool(file, "Capacete");
  1129. playerInfo[playerid][pOculos] = DOF2_GetBool(file, "Oculos");
  1130. playerInfo[playerid][pBone] = DOF2_GetBool(file, "Bone");
  1131. playerInfo[playerid][pGorro] = DOF2_GetBool(file, "Gorro");
  1132. playerInfo[playerid][pArara] = DOF2_GetBool(file, "Arara");
  1133. playerInfo[playerid][pBandana] = DOF2_GetBool(file, "Bandana");
  1134.  
  1135. // Última Posição:
  1136. playerInfo[playerid][pX] = DOF2_GetFloat(file, "Pos X");
  1137. playerInfo[playerid][pY] = DOF2_GetFloat(file, "Pos Y");
  1138. playerInfo[playerid][pZ] = DOF2_GetFloat(file, "Pos Z");
  1139. playerInfo[playerid][pAngle] = DOF2_GetFloat(file, "Pos ANGLE");
  1140. playerInfo[playerid][pAngle] = DOF2_GetFloat(file, "Pos ANGLE");
  1141. playerInfo[playerid][pInt] = DOF2_GetInt(file, "Interior");
  1142. playerInfo[playerid][pVW] = DOF2_GetInt(file, "Virtual World");
  1143.  
  1144. // Iniciar sessão:
  1145. for(new i; i < 100; i++)
  1146. {
  1147. SendClientMessage(playerid, COR_BRANCO, " ");
  1148. }
  1149.  
  1150. SendClientMessage(playerid, COR_BRANCO, "| CONTA | Logado com sucesso!");
  1151.  
  1152. playerInfo[playerid][Logado] = true;
  1153.  
  1154. Timer_UP[playerid] = SetTimerEx("ganharExperiencia", 10*60000, true, "u", playerid);
  1155.  
  1156. SetPlayerScore(playerid, playerInfo[playerid][pLevel]);
  1157.  
  1158. SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, -1, -1, -1);
  1159. SpawnPlayer(playerid);
  1160. return true;
  1161. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement