Advertisement
Guest User

hEmp System - Criador de empresas In-Game [v1.0]

a guest
May 26th, 2013
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 87.98 KB | None | 0 0
  1. /*
  2. *****************************************
  3. * H H eeee m m pppp *
  4. * H H e m m m m p p *
  5. * HHHHH eee m m m m ppp *
  6. * H H e m m m p *
  7. * H H eeee m m p *
  8. ***************************************** System ®
  9.  
  10. VERSÃO: [1.0]
  11. ***************
  12.  
  13. |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|
  14. |=-=-=-=-=-=-=-=-=-=-=-=-=-=[hEmp System - Criado e Desenvolvido por: HeyHoLetsGo]=-=-=-=-=-=-=-=-=-=-=-=-=|
  15. |=-=-=-=-=-=-=-=-=-=-=-=-=-=[Créditos ao Tonisaltolia por BETA Tester + Ajuda ]=-=-=-=-=-=-=-=-=-=-=-=-=|
  16. |=-=-=-=-=-=-=-=-=-=-=-=-=-=[Visite: forum.sa-mp.com | NÃO RETIRE OS CRÉDITOS! ]=-=-=-=-=-=-=-=-=-=-=-=-=|
  17. |=-=-=-=-=-=-=-=-=-=-=-=-=-=[ Felipe Paiva Postador Da FS na HomeHots.net ]=-=-=-=-=-=-=-=-=-=-=-=-=|
  18. |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|
  19.  
  20. */
  21.  
  22. #include a_samp
  23. #include ZCMD
  24. #include DOF2
  25.  
  26. #define DIALOG_VALOR_EMP (1)
  27. #define DIALOG_EMP_INT_ID (2)
  28. #define DIALOG_INT_ID (3)
  29. #define DIALOG_EXTORCAO (4)
  30. #define DIALOG_PICKUP (5)
  31. #define DIALOG_NOME (6)
  32. #define DIALOG_INT_CHOOSE1 (7)
  33. #define DIALOG_INT_CHOOSE2 (8)
  34. #define DIALOG_CONCLUSAO (9)
  35. #define DIALOG_SALDO_EMP (10)
  36. #define DIALOG_COMPRAR_EMP (11)
  37. #define DIALOG_VENDER_EMP (12)
  38. #define DIALOG_DELETAR_EMP (13)
  39. #define DIALOG_INFOS_EMP (14)
  40. #define DIALOG_INFOS_EMP_SHOW (15)
  41. #define DIALOG_CREDITOS (16)
  42. #define DIALOG_EDIT_LIST (18)
  43. #define DIALOG_EDITAR_EMP (19)
  44. #define DIALOG_EDIT_DONO (20)
  45. #define DIALOG_EDIT_NOME (21)
  46. #define DIALOG_EDIT_VALOR (22)
  47. #define DIALOG_EDIT_INTERIOR (23)
  48. #define DIALOG_EDIT_EXTORCAO (24)
  49. #define DIALOG_EDIT_PICKUP (25)
  50. #define DIALOG_EDIT_COFRE (26)
  51. #define DIALOG_AJUDA_EMP (27)
  52.  
  53. enum EnumEmp
  54. {
  55. Float:X,
  56. Float:Y,
  57. Float:Z,
  58. ValorEmp,
  59. IntID,
  60. Extorcao,
  61. Pickup,
  62. Float:UltimaPosX,
  63. Float:UltimaPosY,
  64. Float:UltimaPosZ,
  65. bool:DentroEmp,
  66. IDEmpPresente
  67. };
  68.  
  69. new InfosEmp[MAX_PLAYERS][EnumEmp],NomeEmp[64],IDEmp[MAX_PLAYERS],Text3D:IDTextEmp[999],EmpPickup[999];
  70.  
  71. public OnFilterScriptInit()
  72. {
  73. CarregarEmps();
  74. print("\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  75. print("hEmp System - Criador de empresas In-Game");
  76. print("Criado por: HeyHoLetsGo | forum.sa-mp.com");
  77. print("CARREGADO COM SUCESSO! Bom jogo!");
  78. print("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
  79. return 1;
  80. }
  81.  
  82. public OnFilterScriptExit()
  83. {
  84. DOF2_Exit();
  85. return 1;
  86. }
  87.  
  88. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  89. {
  90. if ((newkeys==KEY_SECONDARY_ATTACK))
  91. {
  92. for(new e = 0; e <= 999; ++e)
  93. {
  94. new Emps[128];
  95. format(Emps,sizeof(Emps),"Empresas/%d.ini",e);
  96. {
  97. if(IsPlayerInRangeOfPoint(playerid,2.0,DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z")))
  98. {
  99. if(DOF2_GetInt(Emps,"IDInterior") == 0)
  100. {
  101. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  102. SetPlayerInterior(playerid,17);
  103. SetPlayerPos(playerid,-25.884498,-185.868988,1003.546875);
  104. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  105. InfosEmp[playerid][DentroEmp] = true;
  106. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  107. new AtualCofre[MAX_PLAYERS],GameText[128];
  108. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  109. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  110. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  111. GameTextForPlayer(playerid,GameText,4000,1);
  112. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  113. break;
  114. }
  115. if(DOF2_GetInt(Emps,"IDInterior") == 1)
  116. {
  117. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  118. SetPlayerInterior(playerid,10);
  119. SetPlayerPos(playerid,6.091179,-29.271898,1003.549438);
  120. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  121. InfosEmp[playerid][DentroEmp] = true;
  122. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  123. new AtualCofre[MAX_PLAYERS],GameText[128];
  124. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  125. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  126. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  127. GameTextForPlayer(playerid,GameText,4000,1);
  128. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  129. break;
  130. }
  131. if(DOF2_GetInt(Emps,"IDInterior") == 2)
  132. {
  133. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  134. SetPlayerInterior(playerid,18);
  135. SetPlayerPos(playerid,-30.946699,-89.609596,1003.546875);
  136. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  137. InfosEmp[playerid][DentroEmp] = true;
  138. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  139. new AtualCofre[MAX_PLAYERS],GameText[128];
  140. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  141. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  142. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  143. GameTextForPlayer(playerid,GameText,4000,1);
  144. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  145. break;
  146. }
  147. if(DOF2_GetInt(Emps,"IDInterior") == 3)
  148. {
  149. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  150. SetPlayerInterior(playerid,16);
  151. SetPlayerPos(playerid,-25.132598,-139.066986,1003.546875);
  152. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  153. InfosEmp[playerid][DentroEmp] = true;
  154. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  155. new AtualCofre[MAX_PLAYERS],GameText[128];
  156. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  157. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  158. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  159. GameTextForPlayer(playerid,GameText,4000,1);
  160. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  161. break;
  162. }
  163. if(DOF2_GetInt(Emps,"IDInterior") == 4)
  164. {
  165. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  166. SetPlayerInterior(playerid,4);
  167. SetPlayerPos(playerid,-27.312299,-29.277599,1003.557250);
  168. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  169. InfosEmp[playerid][DentroEmp] = true;
  170. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  171. new AtualCofre[MAX_PLAYERS],GameText[128];
  172. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  173. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  174. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  175. GameTextForPlayer(playerid,GameText,4000,1);
  176. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  177. break;
  178. }
  179. if(DOF2_GetInt(Emps,"IDInterior") == 5)
  180. {
  181. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  182. SetPlayerInterior(playerid,6);
  183. SetPlayerPos(playerid,-26.691598,-55.714897,1003.546875);
  184. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  185. InfosEmp[playerid][DentroEmp] = true;
  186. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  187. new AtualCofre[MAX_PLAYERS],GameText[128];
  188. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  189. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  190. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  191. GameTextForPlayer(playerid,GameText,4000,1);
  192. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  193. break;
  194. }
  195. if(DOF2_GetInt(Emps,"IDInterior") == 6)
  196. {
  197. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  198. SetPlayerInterior(playerid,14);
  199. SetPlayerPos(playerid,-1827.147338,7.207417,1061.143554);
  200. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  201. InfosEmp[playerid][DentroEmp] = true;
  202. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  203. new AtualCofre[MAX_PLAYERS],GameText[128];
  204. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  205. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  206. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  207. GameTextForPlayer(playerid,GameText,4000,1);
  208. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  209. break;
  210. }
  211. if(DOF2_GetInt(Emps,"IDInterior") == 7)
  212. {
  213. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  214. SetPlayerInterior(playerid,14);
  215. SetPlayerPos(playerid,-1861.936889,54.908092,1061.143554);
  216. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  217. InfosEmp[playerid][DentroEmp] = true;
  218. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  219. new AtualCofre[MAX_PLAYERS],GameText[128];
  220. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  221. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  222. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  223. GameTextForPlayer(playerid,GameText,4000,1);
  224. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  225. break;
  226. }
  227. if(DOF2_GetInt(Emps,"IDInterior") == 8)
  228. {
  229. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  230. SetPlayerInterior(playerid,1);
  231. SetPlayerPos(playerid,1.808619,32.384357,1199.593750);
  232. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  233. InfosEmp[playerid][DentroEmp] = true;
  234. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  235. new AtualCofre[MAX_PLAYERS],GameText[128];
  236. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  237. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  238. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  239. GameTextForPlayer(playerid,GameText,4000,1);
  240. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  241. break;
  242. }
  243. if(DOF2_GetInt(Emps,"IDInterior") == 9)
  244. {
  245. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  246. SetPlayerInterior(playerid,9);
  247. SetPlayerPos(playerid,315.745086,984.969299,1958.919067);
  248. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  249. InfosEmp[playerid][DentroEmp] = true;
  250. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  251. new AtualCofre[MAX_PLAYERS],GameText[128];
  252. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  253. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  254. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  255. GameTextForPlayer(playerid,GameText,4000,1);
  256. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  257. break;
  258. }
  259. if(DOF2_GetInt(Emps,"IDInterior") == 10)
  260. {
  261. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  262. SetPlayerInterior(playerid,1);
  263. SetPlayerPos(playerid,286.148986,-40.644397,1001.515625);
  264. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  265. InfosEmp[playerid][DentroEmp] = true;
  266. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  267. new AtualCofre[MAX_PLAYERS],GameText[128];
  268. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  269. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  270. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  271. GameTextForPlayer(playerid,GameText,4000,1);
  272. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  273. break;
  274. }
  275. if(DOF2_GetInt(Emps,"IDInterior") == 11)
  276. {
  277. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  278. SetPlayerInterior(playerid,4);
  279. SetPlayerPos(playerid,286.800994,-82.547599,1001.515625);
  280. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  281. InfosEmp[playerid][DentroEmp] = true;
  282. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  283. new AtualCofre[MAX_PLAYERS],GameText[128];
  284. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  285. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  286. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  287. GameTextForPlayer(playerid,GameText,4000,1);
  288. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  289. break;
  290. }
  291. if(DOF2_GetInt(Emps,"IDInterior") == 12)
  292. {
  293. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  294. SetPlayerInterior(playerid,6);
  295. SetPlayerPos(playerid,296.919982,-108.071998,1001.515625);
  296. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  297. InfosEmp[playerid][DentroEmp] = true;
  298. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  299. new AtualCofre[MAX_PLAYERS],GameText[128];
  300. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  301. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  302. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  303. GameTextForPlayer(playerid,GameText,4000,1);
  304. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  305. break;
  306. }
  307. if(DOF2_GetInt(Emps,"IDInterior") == 13)
  308. {
  309. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  310. SetPlayerInterior(playerid,7);
  311. SetPlayerPos(playerid,314.820983,-141.431991,999.601562);
  312. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  313. InfosEmp[playerid][DentroEmp] = true;
  314. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  315. new AtualCofre[MAX_PLAYERS],GameText[128];
  316. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  317. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  318. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  319. GameTextForPlayer(playerid,GameText,4000,1);
  320. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  321. break;
  322. }
  323. if(DOF2_GetInt(Emps,"IDInterior") == 14)
  324. {
  325. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  326. SetPlayerInterior(playerid,6);
  327. SetPlayerPos(playerid,316.524993,-167.706985,999.593750);
  328. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  329. InfosEmp[playerid][DentroEmp] = true;
  330. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  331. new AtualCofre[MAX_PLAYERS],GameText[128];
  332. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  333. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  334. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  335. GameTextForPlayer(playerid,GameText,4000,1);
  336. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  337. break;
  338. }
  339. if(DOF2_GetInt(Emps,"IDInterior") == 15)
  340. {
  341. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  342. SetPlayerInterior(playerid,7);
  343. SetPlayerPos(playerid,302.292877,-143.139099,1004.062500);
  344. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  345. InfosEmp[playerid][DentroEmp] = true;
  346. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  347. new AtualCofre[MAX_PLAYERS],GameText[128];
  348. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  349. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  350. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  351. GameTextForPlayer(playerid,GameText,4000,1);
  352. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  353. break;
  354. }
  355. if(DOF2_GetInt(Emps,"IDInterior") == 16)
  356. {
  357. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  358. SetPlayerInterior(playerid,7);
  359. SetPlayerPos(playerid,298.507934,-141.647048,1004.054748);
  360. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  361. InfosEmp[playerid][DentroEmp] = true;
  362. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  363. new AtualCofre[MAX_PLAYERS],GameText[128];
  364. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  365. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  366. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  367. GameTextForPlayer(playerid,GameText,4000,1);
  368. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  369. break;
  370. }
  371. if(DOF2_GetInt(Emps,"IDInterior") == 17)
  372. {
  373. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  374. SetPlayerInterior(playerid,3);
  375. SetPlayerPos(playerid,1038.531372,0.111030,1001.284484);
  376. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  377. InfosEmp[playerid][DentroEmp] = true;
  378. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  379. new AtualCofre[MAX_PLAYERS],GameText[128];
  380. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  381. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  382. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  383. GameTextForPlayer(playerid,GameText,4000,1);
  384. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  385. break;
  386. }
  387. if(DOF2_GetInt(Emps,"IDInterior") == 18)
  388. {
  389. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  390. SetPlayerInterior(playerid,12);
  391. SetPlayerPos(playerid,444.646911,508.239044,1001.419494);
  392. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  393. InfosEmp[playerid][DentroEmp] = true;
  394. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  395. new AtualCofre[MAX_PLAYERS],GameText[128];
  396. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  397. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  398. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  399. GameTextForPlayer(playerid,GameText,4000,1);
  400. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  401. break;
  402. }
  403. if(DOF2_GetInt(Emps,"IDInterior") == 19)
  404. {
  405. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  406. SetPlayerInterior(playerid,15);
  407. SetPlayerPos(playerid,2215.454833,-1147.475585,1025.796875);
  408. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  409. InfosEmp[playerid][DentroEmp] = true;
  410. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  411. new AtualCofre[MAX_PLAYERS],GameText[128];
  412. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  413. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  414. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  415. GameTextForPlayer(playerid,GameText,4000,1);
  416. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  417. break;
  418. }
  419. if(DOF2_GetInt(Emps,"IDInterior") == 20)
  420. {
  421. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  422. SetPlayerInterior(playerid,3);
  423. SetPlayerPos(playerid,833.269775,10.588416,1004.179687);
  424. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  425. InfosEmp[playerid][DentroEmp] = true;
  426. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  427. new AtualCofre[MAX_PLAYERS],GameText[128];
  428. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  429. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  430. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  431. GameTextForPlayer(playerid,GameText,4000,1);
  432. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  433. break;
  434. }
  435. if(DOF2_GetInt(Emps,"IDInterior") == 21)
  436. {
  437. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  438. SetPlayerInterior(playerid,3);
  439. SetPlayerPos(playerid,-103.559165,-24.225606,1000.718750);
  440. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  441. InfosEmp[playerid][DentroEmp] = true;
  442. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  443. new AtualCofre[MAX_PLAYERS],GameText[128];
  444. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  445. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  446. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  447. GameTextForPlayer(playerid,GameText,4000,1);
  448. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  449. break;
  450. }
  451. if(DOF2_GetInt(Emps,"IDInterior") == 22)
  452. {
  453. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  454. SetPlayerInterior(playerid,1);
  455. SetPlayerPos(playerid,963.418762,2108.292480,1011.030273);
  456. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  457. InfosEmp[playerid][DentroEmp] = true;
  458. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  459. new AtualCofre[MAX_PLAYERS],GameText[128];
  460. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  461. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  462. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  463. GameTextForPlayer(playerid,GameText,4000,1);
  464. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  465. break;
  466. }
  467. if(DOF2_GetInt(Emps,"IDInterior") == 23)
  468. {
  469. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  470. SetPlayerInterior(playerid,6);
  471. SetPlayerPos(playerid,-2240.468505,137.060440,1035.414062);
  472. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  473. InfosEmp[playerid][DentroEmp] = true;
  474. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  475. new AtualCofre[MAX_PLAYERS],GameText[128];
  476. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  477. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  478. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  479. GameTextForPlayer(playerid,GameText,4000,1);
  480. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  481. break;
  482. }
  483. if(DOF2_GetInt(Emps,"IDInterior") == 24)
  484. {
  485. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  486. SetPlayerInterior(playerid,0);
  487. SetPlayerPos(playerid,663.836242,-575.605407,16.343263);
  488. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  489. InfosEmp[playerid][DentroEmp] = true;
  490. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  491. new AtualCofre[MAX_PLAYERS],GameText[128];
  492. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  493. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  494. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  495. GameTextForPlayer(playerid,GameText,4000,1);
  496. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  497. break;
  498. }
  499. if(DOF2_GetInt(Emps,"IDInterior") == 25)
  500. {
  501. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  502. SetPlayerInterior(playerid,1);
  503. SetPlayerPos(playerid,2169.461181,1618.798339,999.976562);
  504. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  505. InfosEmp[playerid][DentroEmp] = true;
  506. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  507. new AtualCofre[MAX_PLAYERS],GameText[128];
  508. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  509. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  510. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  511. GameTextForPlayer(playerid,GameText,4000,1);
  512. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  513. break;
  514. }
  515. if(DOF2_GetInt(Emps,"IDInterior") == 26)
  516. {
  517. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  518. SetPlayerInterior(playerid,10);
  519. SetPlayerPos(playerid,1889.953369,1017.438293,31.882812);
  520. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  521. InfosEmp[playerid][DentroEmp] = true;
  522. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  523. new AtualCofre[MAX_PLAYERS],GameText[128];
  524. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  525. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  526. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  527. GameTextForPlayer(playerid,GameText,4000,1);
  528. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  529. break;
  530. }
  531. if(DOF2_GetInt(Emps,"IDInterior") == 27)
  532. {
  533. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  534. SetPlayerInterior(playerid,1);
  535. SetPlayerPos(playerid,-2159.122802,641.517517,1052.381713);
  536. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  537. InfosEmp[playerid][DentroEmp] = true;
  538. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  539. new AtualCofre[MAX_PLAYERS],GameText[128];
  540. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  541. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  542. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  543. GameTextForPlayer(playerid,GameText,4000,1);
  544. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  545. break;
  546. }
  547. if(DOF2_GetInt(Emps,"IDInterior") == 28)
  548. {
  549. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  550. SetPlayerInterior(playerid,15);
  551. SetPlayerPos(playerid,207.737991,-109.019996,1005.132812);
  552. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  553. InfosEmp[playerid][DentroEmp] = true;
  554. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  555. new AtualCofre[MAX_PLAYERS],GameText[128];
  556. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  557. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  558. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  559. GameTextForPlayer(playerid,GameText,4000,1);
  560. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  561. break;
  562. }
  563. if(DOF2_GetInt(Emps,"IDInterior") == 29)
  564. {
  565. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  566. SetPlayerInterior(playerid,14);
  567. SetPlayerPos(playerid,204.332992,-166.694992,1000.523437);
  568. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  569. InfosEmp[playerid][DentroEmp] = true;
  570. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  571. new AtualCofre[MAX_PLAYERS],GameText[128];
  572. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  573. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  574. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  575. GameTextForPlayer(playerid,GameText,4000,1);
  576. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  577. break;
  578. }
  579. if(DOF2_GetInt(Emps,"IDInterior") == 30)
  580. {
  581. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  582. SetPlayerInterior(playerid,3);
  583. SetPlayerPos(playerid,207.054992,-138.804992,1003.507812);
  584. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  585. InfosEmp[playerid][DentroEmp] = true;
  586. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  587. new AtualCofre[MAX_PLAYERS],GameText[128];
  588. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  589. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  590. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  591. GameTextForPlayer(playerid,GameText,4000,1);
  592. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  593. break;
  594. }
  595. if(DOF2_GetInt(Emps,"IDInterior") == 31)
  596. {
  597. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  598. SetPlayerInterior(playerid,1);
  599. SetPlayerPos(playerid,203.777999,-48.492397,1001.804687);
  600. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  601. InfosEmp[playerid][DentroEmp] = true;
  602. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  603. new AtualCofre[MAX_PLAYERS],GameText[128];
  604. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  605. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  606. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  607. GameTextForPlayer(playerid,GameText,4000,1);
  608. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  609. break;
  610. }
  611. if(DOF2_GetInt(Emps,"IDInterior") == 32)
  612. {
  613. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  614. SetPlayerInterior(playerid,5);
  615. SetPlayerPos(playerid,226.293991,-7.431529,1002.210937);
  616. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  617. InfosEmp[playerid][DentroEmp] = true;
  618. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  619. new AtualCofre[MAX_PLAYERS],GameText[128];
  620. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  621. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  622. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  623. GameTextForPlayer(playerid,GameText,4000,1);
  624. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  625. break;
  626. }
  627. if(DOF2_GetInt(Emps,"IDInterior") == 33)
  628. {
  629. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  630. SetPlayerInterior(playerid,18);
  631. SetPlayerPos(playerid,161.391006,-93.159156,1001.804687);
  632. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  633. InfosEmp[playerid][DentroEmp] = true;
  634. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  635. new AtualCofre[MAX_PLAYERS],GameText[128];
  636. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  637. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  638. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  639. GameTextForPlayer(playerid,GameText,4000,1);
  640. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  641. break;
  642. }
  643. if(DOF2_GetInt(Emps,"IDInterior") == 34)
  644. {
  645. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  646. SetPlayerInterior(playerid,17);
  647. SetPlayerPos(playerid,493.390991,-22.722799,1000.679687);
  648. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  649. InfosEmp[playerid][DentroEmp] = true;
  650. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  651. new AtualCofre[MAX_PLAYERS],GameText[128];
  652. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  653. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  654. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  655. GameTextForPlayer(playerid,GameText,4000,1);
  656. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  657. break;
  658. }
  659. if(DOF2_GetInt(Emps,"IDInterior") == 35)
  660. {
  661. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  662. SetPlayerInterior(playerid,11);
  663. SetPlayerPos(playerid,501.980987,-69.150199,998.757812);
  664. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  665. InfosEmp[playerid][DentroEmp] = true;
  666. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  667. new AtualCofre[MAX_PLAYERS],GameText[128];
  668. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  669. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  670. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  671. GameTextForPlayer(playerid,GameText,4000,1);
  672. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  673. break;
  674. }
  675. if(DOF2_GetInt(Emps,"IDInterior") == 36)
  676. {
  677. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  678. SetPlayerInterior(playerid,18);
  679. SetPlayerPos(playerid,-227.027999,1401.229980,27.765625);
  680. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  681. InfosEmp[playerid][DentroEmp] = true;
  682. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  683. new AtualCofre[MAX_PLAYERS],GameText[128];
  684. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  685. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  686. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  687. GameTextForPlayer(playerid,GameText,4000,1);
  688. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  689. break;
  690. }
  691. if(DOF2_GetInt(Emps,"IDInterior") == 37)
  692. {
  693. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  694. SetPlayerInterior(playerid,4);
  695. SetPlayerPos(playerid,457.304748,-88.428497,999.554687);
  696. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  697. InfosEmp[playerid][DentroEmp] = true;
  698. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  699. new AtualCofre[MAX_PLAYERS],GameText[128];
  700. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  701. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  702. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  703. GameTextForPlayer(playerid,GameText,4000,1);
  704. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  705. break;
  706. }
  707. if(DOF2_GetInt(Emps,"IDInterior") == 38)
  708. {
  709. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  710. SetPlayerInterior(playerid,5);
  711. SetPlayerPos(playerid,454.973937,-110.104995,1000.077209);
  712. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  713. InfosEmp[playerid][DentroEmp] = true;
  714. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  715. new AtualCofre[MAX_PLAYERS],GameText[128];
  716. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  717. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  718. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  719. GameTextForPlayer(playerid,GameText,4000,1);
  720. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  721. break;
  722. }
  723. if(DOF2_GetInt(Emps,"IDInterior") == 39)
  724. {
  725. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  726. SetPlayerInterior(playerid,6);
  727. SetPlayerPos(playerid,435.271331,-80.958938,999.554687);
  728. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  729. InfosEmp[playerid][DentroEmp] = true;
  730. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  731. new AtualCofre[MAX_PLAYERS],GameText[128];
  732. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  733. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  734. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  735. GameTextForPlayer(playerid,GameText,4000,1);
  736. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  737. break;
  738. }
  739. if(DOF2_GetInt(Emps,"IDInterior") == 40)
  740. {
  741. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  742. SetPlayerInterior(playerid,1);
  743. SetPlayerPos(playerid,452.489990,-18.179698,1001.132812);
  744. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  745. InfosEmp[playerid][DentroEmp] = true;
  746. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  747. new AtualCofre[MAX_PLAYERS],GameText[128];
  748. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  749. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  750. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  751. GameTextForPlayer(playerid,GameText,4000,1);
  752. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  753. break;
  754. }
  755. if(DOF2_GetInt(Emps,"IDInterior") == 41)
  756. {
  757. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  758. SetPlayerInterior(playerid,1);
  759. SetPlayerPos(playerid,681.557861,-455.680053,-25.609874);
  760. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  761. InfosEmp[playerid][DentroEmp] = true;
  762. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  763. new AtualCofre[MAX_PLAYERS],GameText[128];
  764. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  765. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  766. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  767. GameTextForPlayer(playerid,GameText,4000,1);
  768. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  769. break;
  770. }
  771. if(DOF2_GetInt(Emps,"IDInterior") == 42)
  772. {
  773. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  774. SetPlayerInterior(playerid,10);
  775. SetPlayerPos(playerid,375.962463,-65.816848,1001.507812);
  776. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  777. InfosEmp[playerid][DentroEmp] = true;
  778. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  779. new AtualCofre[MAX_PLAYERS],GameText[128];
  780. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  781. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  782. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  783. GameTextForPlayer(playerid,GameText,4000,1);
  784. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  785. break;
  786. }
  787. if(DOF2_GetInt(Emps,"IDInterior") == 43)
  788. {
  789. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  790. SetPlayerInterior(playerid,9);
  791. SetPlayerPos(playerid,369.579528,-4.487294,1001.858886);
  792. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  793. InfosEmp[playerid][DentroEmp] = true;
  794. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  795. new AtualCofre[MAX_PLAYERS],GameText[128];
  796. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  797. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  798. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  799. GameTextForPlayer(playerid,GameText,4000,1);
  800. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  801. break;
  802. }
  803. if(DOF2_GetInt(Emps,"IDInterior") == 44)
  804. {
  805. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  806. SetPlayerInterior(playerid,5);
  807. SetPlayerPos(playerid,373.825653,-117.270904,1001.499511);
  808. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  809. InfosEmp[playerid][DentroEmp] = true;
  810. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  811. new AtualCofre[MAX_PLAYERS],GameText[128];
  812. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  813. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  814. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  815. GameTextForPlayer(playerid,GameText,4000,1);
  816. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  817. break;
  818. }
  819. if(DOF2_GetInt(Emps,"IDInterior") == 45)
  820. {
  821. GetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  822. SetPlayerInterior(playerid,17);
  823. SetPlayerPos(playerid,381.169189,-188.803024,1000.632812);
  824. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Digite {FFFFFF}/sairemp {FADD00}para sair desta empresa{FFFFFF}.");
  825. InfosEmp[playerid][DentroEmp] = true;
  826. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Extorcao"));
  827. new AtualCofre[MAX_PLAYERS],GameText[128];
  828. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  829. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]+DOF2_GetInt(Emps,"Extorcao"));
  830. format(GameText,sizeof(GameText),"Entrada: -R$%d",DOF2_GetInt(Emps,"Extorcao"));
  831. GameTextForPlayer(playerid,GameText,4000,1);
  832. InfosEmp[playerid][IDEmpPresente] = DOF2_GetInt(Emps,"ID");
  833. break;
  834. }
  835. }
  836. }
  837. }
  838. }
  839. return 1;
  840. }
  841.  
  842. CMD:ajudaemp(playerid)
  843. {
  844. if(IsPlayerAdmin(playerid))
  845. {
  846. new str[500];
  847. strcat(str,"{FFFFFF}COMANDOS RCON:\n \n{00ED04}/criaremp {FFFFFF}- Criar empresa\n{00ED04}/deletaremp {FFFFFF}- Deletar empresa\n{00ED04}/editaremp {FFFFFF}- Editar empresa\n{00ED04}/infosemp {FFFFFF}- Verificar informações de empresa\n \n{FFFFFF}COMANDOS JOGADORES\n \n{00ED04}/compraremp {FFFFFF}- Comprar empresa\n{00ED04}/venderemp {FFFFFF}- Vender empresa\n");
  848. strcat(str,"{00ED04}/sairemp {FFFFFF}- Sair da empresa\n{00ED04}/cofreemp {FFFFFFF}- Cofre da empresa\n{00ED04}/sacaremp {FFFFFF}- Sacar lucros da empresa\n \n {FADD00}h{1F00CF}Emp{FFFFFF} {00ED04}- Por: {FFFFFF}HeyHoLetsGo");
  849. ShowPlayerDialog(playerid,DIALOG_AJUDA_EMP,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - AJUDA",str,"FECHAR","");
  850. }
  851. else
  852. {
  853. new str[600];
  854. strcat(str,"{FFFFFF}COMANDOS\n \n{00ED04}/compraremp {FFFFFF}- Comprar empresa\n{00ED04}/venderemp {FFFFFF}- Vender empresa\n");
  855. strcat(str,"{00ED04}/sairemp {FFFFFF}- Sair da empresa\n{00ED04}/cofreemp {FFFFFFF}- Cofre da empresa\n{00ED04}/sacaremp {FFFFFF}- Sacar lucros da empresa\n \n {FADD00}h{1F00CF}Emp{FFFFFF} {00ED04}- Por: {FFFFFF}HeyHoLetsGo");
  856. ShowPlayerDialog(playerid,DIALOG_AJUDA_EMP,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - AJUDA",str,"FECHAR","");
  857. }
  858. return 1;
  859. }
  860.  
  861. CMD:editaremp(playerid)
  862. {
  863. if(IsPlayerAdmin(playerid))
  864. {
  865. ShowPlayerDialog(playerid,DIALOG_EDITAR_EMP,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA","{00ED04}Digite o {FFFFFF}ID {00ED04}da empresa que deseja editar{FFFFFF}:","PRÓXIMO","Cancelar");
  866. }
  867. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não é um Administrador logado na RCON então não pode realizar este comando{FFFFFF}.");
  868. return 1;
  869. }
  870.  
  871. CMD:creditoshemp(playerid)
  872. {
  873. ShowPlayerDialog(playerid,DIALOG_CREDITOS,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRÉDITOS","{00ED04}Criado e desenvido por: {FFFFFF}HeyHoLetsGo\n{00ED04}Créditos também a {FFFFFF}Tonisantolia - {00ED04}BETA Tester.\n \n{00ED04}Tenha um {FFFFFF}Bom Jogo{00ED04}!","FECHAR","");
  874. return 1;
  875. }
  876.  
  877. CMD:infosemp(playerid)
  878. {
  879. if(IsPlayerAdmin(playerid))
  880. {
  881. ShowPlayerDialog(playerid,DIALOG_INFOS_EMP,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - INFORMAÇÕES","{00ED04}Digite o {FFFFFF}ID {00ED04}da empresa que deseja vizualizar as informações{FFFFFF}:","VER","Cancelar");
  882. }
  883. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não é um Administrador logado na RCON então não pode realizar este comando{FFFFFF}.");
  884. return 1;
  885. }
  886.  
  887. CMD:deletaremp(playerid)
  888. {
  889. if(IsPlayerAdmin(playerid))
  890. {
  891. ShowPlayerDialog(playerid,DIALOG_DELETAR_EMP,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - DELETAR EMPRESA","{00ED04}Digite o {FFFFFF}ID {00ED04}da empresa que deseja deletar{FFFFFF}:","PRÓXIMO","Cancelar");
  892. }
  893. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não é um Administrador logado na RCON{FFFFFF}.");
  894. return 1;
  895. }
  896.  
  897. CMD:venderemp(playerid)
  898. {
  899. new Emps[64];
  900. for(new e = 0; e <= 999; ++e)
  901. {
  902. format(Emps,sizeof(Emps),"Empresas/%d.ini",InfosEmp[playerid][IDEmpPresente]);
  903. {
  904. new Nome[MAX_PLAYER_NAME],str[600],str2[600];
  905. GetPlayerName(playerid,Nome,MAX_PLAYER_NAME);
  906. if(InfosEmp[playerid][DentroEmp] == true)
  907. {
  908. if(!strcmp(DOF2_GetString(Emps,"DONO"),Nome,false))
  909. {
  910. format(str,sizeof(str),"{00ED04}Você está prestes a vender sua {FFFFFF}empresa:\n \n{00ED04}Empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d \n{00ED04}Com o interior conforme o ID: {FFFFFF}%d",DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior")); strcat(str2,str);
  911. format(str,sizeof(str),"\n{00ED04}Com valor inicial de extorção por entrada de: R${FFFFFF}%d\n{00ED04}Com modelo de pickup conforme ID: {FFFFFF}%d\n{00ED04}Com o nome da empresa: {FFFFFF}%s\n \n{00ED04}Você tem certeza de que quer vender sua empresa?\nOBS: {FFFFFF}Você não poderá desfazer isto depois.",DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetString(Emps,"Nome")); strcat(str2,str);
  912. ShowPlayerDialog(playerid,DIALOG_VENDER_EMP,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - VENDER EMPRESA",str2,"VENDER","Cancelar");
  913. RetirarEmps();
  914. CarregarEmps();
  915. break;
  916. }
  917. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Esta empresa não pertence a você{FFFFFF}!");
  918. break;
  919. }
  920. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não está em sua empresa{FFFFFF}.");
  921. break;
  922. }
  923. }
  924. return 1;
  925. }
  926.  
  927. CMD:compraremp(playerid)
  928. {
  929. for(new e = 0; e <= 999; ++e)
  930. {
  931. new Emps[128];
  932. format(Emps,sizeof(Emps),"Empresas/%d.ini",e);
  933. {
  934. if(IsPlayerInRangeOfPoint(playerid,2.0,DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z")))
  935. {
  936. if(!strcmp(DOF2_GetString(Emps,"DONO"),"Nenhum",false))
  937. {
  938. if(GetPlayerMoney(playerid) >= DOF2_GetInt(Emps,"Valor"))
  939. {
  940. IDEmp[playerid] = e;
  941. new str[600],str2[800];
  942. format(str,sizeof(str),"{00ED04}Você está prestes a comprar esta {FFFFFF}empresa:\n \n{00ED04}Empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d \n{00ED04}Com o interior conforme o ID: {FFFFFF}%d",DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior")); strcat(str2,str);
  943. format(str,sizeof(str),"\n{00ED04}Com valor inicial de extorção por entrada de: R${FFFFFF}%d\n{00ED04}Com modelo de pickup conforme ID: {FFFFFF}%d\n{00ED04}Com o nome da empresa: {FFFFFF}%s\n \n{00ED04}Você tem certeza de que quer comprar esta {FFFFFF}empresa{00ED04}?\n \nOBS: {FFFFFF}Você poderá vendê-la a qualquer momento\nusando o comando {00ED04}/venderemp{FFFFFF}.",DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetString(Emps,"Nome")); strcat(str2,str);
  944. ShowPlayerDialog(playerid,DIALOG_COMPRAR_EMP,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - COMPRAR EMPRESA",str2,"COMPRAR","Cancelar");
  945. break;
  946. }
  947. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ]{FF0000}Você não possúi dinheiro suficiente para comprar esta empresa{FFFFFF}.");
  948. break;
  949. }
  950. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Esta empresa não está à venda{FFFFFF}!");
  951. break;
  952. }
  953. }
  954. }
  955. return 1;
  956. }
  957.  
  958. CMD:cofreemp(playerid)
  959. {
  960. for(new e = 0; e <= 999; ++e)
  961. {
  962. new Emps[64],TxtSaldoCofre[256];
  963. format(Emps,sizeof(Emps),"Empresas/%d.ini",InfosEmp[playerid][IDEmpPresente]);
  964. if(DOF2_FileExists(Emps))
  965. {
  966. if(InfosEmp[playerid][DentroEmp] == true)
  967. {
  968. format(TxtSaldoCofre,sizeof(TxtSaldoCofre),"{00ED04}Saldo do Cofre: R${FFFFFF}%d,00\n \n{00ED04}Use: {FFFFFF}/sacaremp {00ED04}para sacar o dinheiro\n({FFFFFF}COMANDO APENAS DISPONÍVEL PARA O DONO{00ED04})\n \n{00ED04}Tenha um bom jogo!",DOF2_GetInt(Emps,"Cofre"));
  969. ShowPlayerDialog(playerid,DIALOG_SALDO_EMP,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - COFRE DA EMPRESA",TxtSaldoCofre,"FECHAR","");
  970. break;
  971. }
  972. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não está dentro de uma empresa{FFFFFF}!");
  973. break;
  974. }
  975. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Esta empresa falíu{FFFFFF}! {FF0000}(Acaba de ser deletada por um Admin)");
  976. break;
  977. }
  978. return 1;
  979. }
  980.  
  981. CMD:sacaremp(playerid)
  982. {
  983. for(new e = 0; e <= 999; ++e)
  984. {
  985. new Emps[128],TxtSaldoCofre[256];
  986. format(Emps,sizeof(Emps),"Empresas/%d.ini",InfosEmp[playerid][IDEmpPresente]);
  987. if(DOF2_FileExists(Emps))
  988. {
  989. new Nome[MAX_PLAYER_NAME];
  990. GetPlayerName(playerid,Nome,sizeof(Nome));
  991. if(!strcmp(DOF2_GetString(Emps,"DONO"),Nome,false))
  992. {
  993. format(TxtSaldoCofre,sizeof(TxtSaldoCofre),"{00ED04}Saldo do Cofre: R${FFFFFF}%d,00\n \n{00ED04}Digite a quantia em dinheiro que deseja sacar:\nOBS: {FFFFFF}Sem {00ED04}R$ {FFFFFF}ou {00ED04}vírgula{FFFFFF}, apenas o número inteiro{00ED04}.",DOF2_GetInt(Emps,"Cofre"));
  994. ShowPlayerDialog(playerid,DIALOG_SALDO_EMP,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - COFRE DA EMPRESA - SACAR",TxtSaldoCofre,"SACAR","Fechar");
  995. InfosEmp[playerid][IDEmpPresente] = e;
  996. break;
  997. }
  998. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não é o dono desta empresa e não tem permissão de sacar os lucros{FFFFFF}.");
  999. break;
  1000. }
  1001. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Esta empresa falíu{FFFFFF}! {FF0000}(Acaba de ser deletada por um Admin)");
  1002. break;
  1003. }
  1004. return 1;
  1005. }
  1006.  
  1007. CMD:sairemp(playerid)
  1008. {
  1009. if(InfosEmp[playerid][DentroEmp] == false)
  1010. {
  1011. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não está dentro de uma empresa{FFFFFF}!");
  1012. }
  1013. else
  1014. {
  1015. SetPlayerInterior(playerid,0);
  1016. SetPlayerPos(playerid,InfosEmp[playerid][UltimaPosX],InfosEmp[playerid][UltimaPosY],InfosEmp[playerid][UltimaPosZ]);
  1017. InfosEmp[playerid][DentroEmp] = false;
  1018. }
  1019. return 1;
  1020. }
  1021.  
  1022. CMD:criaremp(playerid)
  1023. {
  1024. if(IsPlayerAdmin(playerid))
  1025. {
  1026. new str[256];
  1027. GetPlayerPos(playerid,InfosEmp[playerid][X],InfosEmp[playerid][Y],InfosEmp[playerid][Z]);
  1028. format(str,sizeof(str),"{00ED04}Você deseja criar uma empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n \n{00ED04}Digite o {FFFFFF}VALOR {00ED04}da nova empresa{FFFFFF}:",InfosEmp[playerid][X],InfosEmp[playerid][Y],InfosEmp[playerid][Z]);
  1029. ShowPlayerDialog(playerid,DIALOG_VALOR_EMP,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRIAR EMPRESA",str,"Próximo","Cancelar");
  1030. }
  1031. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Você não é um Administrador logado na RCON então não pode realizar este comando{FFFFFF}.");
  1032. }
  1033.  
  1034. public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
  1035. {
  1036. if(dialogid == DIALOG_VALOR_EMP)
  1037. {
  1038. if(response)
  1039. {
  1040. new str[300];
  1041. InfosEmp[playerid][ValorEmp] = strval(inputtext);
  1042. format(str,sizeof(str),"{00ED04}Você deseja criar uma empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d\n \n{00ED04}Escolha o {FFFFFF}INTERIOR {00ED04}da nova empresa na lista a seguir{FFFFFF}:",InfosEmp[playerid][X],InfosEmp[playerid][Y],InfosEmp[playerid][Z],InfosEmp[playerid][ValorEmp]);
  1043. ShowPlayerDialog(playerid,DIALOG_INT_CHOOSE1,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRIAR EMPRESA",str,"Próximo","Cancelar");
  1044. }
  1045. }
  1046. if(dialogid == DIALOG_INT_CHOOSE1)
  1047. {
  1048. if(response)
  1049. {
  1050. new list[1500];
  1051. strcat(list,"SELECIONE UM INTERIOR (Mais opções na próxima versão)\n");
  1052. strcat(list,"{00ED04}24/7 - {FFFFFF}1\n{00ED04}24/7 - {FFFFFF}2\n{00ED04}24/7 - {FFFFFF}3\n{00ED04}24/7 - {FFFFFF}4\n{00ED04}24/7 - {FFFFFF}5\n{00ED04}24/7 - {FFFFFF}6\n{00ED04}Balcao do Aeroporto\n{00ED04}Sala de bagagens do Aeroporto\n{00ED04}Shamal - {FFFFFF}Nave\n{00ED04}Andromada - {FFFFFF}Avião\n{00ED04}Loja de armas - {FFFFFF}1\n{00ED04}Loja de armas - {FFFFFF}2\n{00ED04}Loja de armas - {FFFFFF}3\n{00ED04}Loja de armas - {FFFFFF}4\n{00ED04}Loja de armas - {FFFFFF}5\n{00ED04}");
  1053. strcat(list,"Loja de armas - {FFFFFF}Cabines\n{00ED04}Loja de armas - {FFFFFF}Pista\n{00ED04}Corredor dos tolos - {FFFFFF}Blastin\n{00ED04}Sala de orçamento do Motel\n{00ED04}Motel Jefferson\n{00ED04}Loja de apostas - {FFFFFF}Loteria\n{00ED04}Sex Shop\n{00ED04}Fábrica de carne\n{00ED04}Loja do Zero\n{00ED04}Posto de Dillimore\n{00ED04}Porão de Caligula\n{00ED04}Sala de Zeladores FDC\n{00ED04}Escritório do Woozie\n{00ED04}Binco - {FFFFFF}Loja de roupas\n{00ED04}Didier sachs - {FFFFFF}");
  1054. strcat(list,"Loja de roupas\n{00ED04}Prolaps - {FFFFFF}Loja de roupas\n{00ED04}Suburban - {FFFFFF}Loja de roupas\n{00ED04}Victim - {FFFFFF}Loja de roupas\n{00ED04}Zip - {FFFFFF}Loja de roupas\n{00ED04}Alhambra\n{00ED04}Bar\n{00ED04}Bar Lil' probe\n{00ED04}Lanchonete do Jay\n{00ED04}Lanchonete do Gant\n{00ED04}Lanchonete secreta do vale\n{00ED04}Mundo de Coq\n{00ED04}Bar dos bombas\n{00ED04}Burger shot\n{00ED04}Cluckin' bell\n{00ED04}Well stacked pizza\n{00ED04}Rusty Browns rosquinhas");
  1055. ShowPlayerDialog(playerid,DIALOG_INT_CHOOSE2,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRIAR EMPRESA:",list,"Próximo","Cancelar");
  1056. }
  1057. }
  1058. if(dialogid == DIALOG_INT_CHOOSE2)
  1059. {
  1060. if(response)
  1061. {
  1062. for(new i = 0; i <= 46; ++i)
  1063. {
  1064. if(listitem == i)
  1065. {
  1066. InfosEmp[playerid][IntID] = i-1;
  1067. break;
  1068. }
  1069. new str[300];
  1070. format(str,sizeof(str),"{00ED04}Você deseja criar uma empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d\n{00ED04}Com o interior número: {FFFFFF}%d\n \n{00ED04}Digite o valor inicial de {FFFFFF}EXTORÇÃO {00ED04}por entrada{FFFFFF}:",InfosEmp[playerid][X],InfosEmp[playerid][Y],InfosEmp[playerid][Z],InfosEmp[playerid][ValorEmp],i);
  1071. ShowPlayerDialog(playerid,DIALOG_EXTORCAO,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRIAR EMPRESA",str,"Próximo","Cancelar");
  1072. }
  1073. }
  1074. }
  1075. if(dialogid == DIALOG_EXTORCAO)
  1076. {
  1077. if(response)
  1078. {
  1079. new str[300],str2[500];
  1080. InfosEmp[playerid][Extorcao] = strval(inputtext);
  1081. format(str,sizeof(str),"{00ED04}Você deseja criar uma empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d\n{00ED04}Com o interior número: {FFFFFF}%d\n",InfosEmp[playerid][X],InfosEmp[playerid][Y],InfosEmp[playerid][Z],InfosEmp[playerid][ValorEmp],InfosEmp[playerid][IntID]); strcat(str2,str);
  1082. format(str,sizeof(str),"{00ED04}Com valor inicial de extorção por entrada de: R${FFFFFF}%d\n \n{00ED04}Digite o {FFFFFF}ID DA PICKUP {00ED04}da nova empresa{FFFFFF}:",InfosEmp[playerid][Extorcao]); strcat(str2,str);
  1083. ShowPlayerDialog(playerid,DIALOG_PICKUP,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRIAR EMPRESA",str2,"Próximo","Cancelar");
  1084. }
  1085. }
  1086. if(dialogid == DIALOG_PICKUP)
  1087. {
  1088. if(response)
  1089. {
  1090. new str[300],str2[600];
  1091. InfosEmp[playerid][Pickup] = strval(inputtext);
  1092. format(str,sizeof(str),"{00ED04}Você deseja criar uma empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d\n",InfosEmp[playerid][X],InfosEmp[playerid][Y],InfosEmp[playerid][Z],InfosEmp[playerid][ValorEmp]); strcat(str2,str);
  1093. format(str,sizeof(str),"{00ED04}Com o interior conforme o ID: {FFFFFF}%d\n{00ED04}Com valor inicial de extorção por entrada de: R${FFFFFF}%d\n{00ED04}Com modelo de pickup conforme ID: {FFFFFF}%d\n \n{00ED04}Finalizando, digite o {FFFFFF}NOME {00ED04}da nova empresa{FFFFFF}:",InfosEmp[playerid][IntID],InfosEmp[playerid][Extorcao],InfosEmp[playerid][Pickup]); strcat(str2,str);
  1094. ShowPlayerDialog(playerid,DIALOG_NOME,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRIAR EMPRESA",str2,"CRIAR","Cancelar");
  1095. }
  1096. }
  1097. if(dialogid == DIALOG_NOME)
  1098. {
  1099. if(response)
  1100. {
  1101. new str[400],str2[800];
  1102. format(NomeEmp,sizeof(NomeEmp),"%s",inputtext);
  1103. format(str,sizeof(str),"{00ED04}Você deseja criar uma empresa nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d\n{00ED04}Com o interior conforme o ID: {FFFFFF}%d\n{00ED04}Com valor inicial de extorção por entrada de: R${FFFFFF}",InfosEmp[playerid][X],InfosEmp[playerid][Y],InfosEmp[playerid][Z],InfosEmp[playerid][ValorEmp],InfosEmp[playerid][IntID]); strcat(str2,str);
  1104. format(str,sizeof(str),"%d\n{00ED04}Com modelo de pickup conforme ID: {FFFFFF}%d\n{00ED04}Com o nome da empresa: {FFFFFF}%s\n \n{00ED04}Você tem certeza que deseja criar esta\nnova empresa{FFFFFF}? {00ED04}Clique em {FFFFFF}CRIAR {00ED04}para terminar{FFFFFF}.\n \n{00ED04}OBS: {FFFFFF}Você poderá destruir esta empresa\nà qualquer momento usando {00ED04}/deletaremp{FFFFFF}.",InfosEmp[playerid][Extorcao],InfosEmp[playerid][Pickup],NomeEmp); strcat(str2,str);
  1105. ShowPlayerDialog(playerid,DIALOG_CONCLUSAO,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - CRIAR EMPRESA",str2,"CRIAR","Cancelar");
  1106. }
  1107. }
  1108. if(dialogid == DIALOG_CONCLUSAO)
  1109. {
  1110. if(response)
  1111. {
  1112. for(new e = 0; e <= 999; e++)
  1113. {
  1114. new Emps[64];
  1115. format(Emps,sizeof(Emps),"Empresas/%d.ini",e);
  1116. if(!DOF2_FileExists(Emps))
  1117. {
  1118. DOF2_CreateFile(Emps);
  1119. DOF2_SetString(Emps,"Nome",NomeEmp);
  1120. DOF2_SetFloat(Emps,"X",InfosEmp[playerid][X]);
  1121. DOF2_SetFloat(Emps,"Y",InfosEmp[playerid][Y]);
  1122. DOF2_SetFloat(Emps,"Z",InfosEmp[playerid][Z]);
  1123. DOF2_SetInt(Emps,"ID",e);
  1124. DOF2_SetInt(Emps,"Valor",InfosEmp[playerid][ValorEmp]);
  1125. DOF2_SetInt(Emps,"IDInterior",InfosEmp[playerid][IntID]);
  1126. DOF2_SetInt(Emps,"Extorcao",InfosEmp[playerid][Extorcao]);
  1127. DOF2_SetInt(Emps,"Pickup",InfosEmp[playerid][Pickup]);
  1128. DOF2_SetInt(Emps,"Cofre",0);
  1129. DOF2_SetString(Emps,"DONO","Nenhum");
  1130. DOF2_SaveFile();
  1131. CarregarEmps();
  1132. break;
  1133. }
  1134. }
  1135. }
  1136. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FADD00}Criação da nova empresa cancelada{FFFFFF}.");
  1137. }
  1138. if(dialogid == DIALOG_COMPRAR_EMP)
  1139. {
  1140. if(response)
  1141. {
  1142. new Nome[MAX_PLAYER_NAME],Emps[64];
  1143. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1144. GetPlayerName(playerid,Nome,MAX_PLAYER_NAME);
  1145. DOF2_SetString(Emps,"DONO",Nome);
  1146. DOF2_SaveFile();
  1147. GivePlayerMoney(playerid,-DOF2_GetInt(Emps,"Valor"));
  1148. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}Você comprou esta empresa! Use: {FFFFFF}/ajudaemp {00ED04}para mais informações{FFFFFF}.");
  1149. RetirarEmps();
  1150. CarregarEmps();
  1151. }
  1152. }
  1153. if(dialogid == DIALOG_VENDER_EMP)
  1154. {
  1155. if(response)
  1156. {
  1157. new Emps[64];
  1158. format(Emps,sizeof(Emps),"Empresas/%d.ini",InfosEmp[playerid][IDEmpPresente]);
  1159. DOF2_SetString(Emps,"DONO","Nenhum");
  1160. GivePlayerMoney(playerid,DOF2_GetInt(Emps,"Valor"));
  1161. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}Empresa vendida com sucesso{FFFFFF}!");
  1162. RetirarEmps();
  1163. CarregarEmps();
  1164. }
  1165. }
  1166. if(dialogid == DIALOG_SALDO_EMP)
  1167. {
  1168. new Emps[64];
  1169. format(Emps,sizeof(Emps),"Empresas/%d.ini",InfosEmp[playerid][IDEmpPresente]);
  1170. {
  1171. if(strval(inputtext) <= DOF2_GetInt(Emps,"Cofre"))
  1172. {
  1173. new AtualCofre[MAX_PLAYERS];
  1174. GivePlayerMoney(playerid,strval(inputtext));
  1175. AtualCofre[playerid] = DOF2_GetInt(Emps,"Cofre");
  1176. DOF2_SetInt(Emps,"Cofre",AtualCofre[playerid]-strval(inputtext));
  1177. }
  1178. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Sua empresa não possúi esta quantidade de lucros{FFFFFF}.");
  1179. }
  1180. }
  1181. if(dialogid == DIALOG_DELETAR_EMP)
  1182. {
  1183. if(response)
  1184. {
  1185. new Emps[64];
  1186. format(Emps,sizeof(Emps),"Empresas/%d.ini",strval(inputtext));
  1187. if(DOF2_FileExists(Emps))
  1188. {
  1189. DOF2_RemoveFile(Emps);
  1190. RetirarEmps();
  1191. CarregarEmps();
  1192. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}A empresa foi removida com sucesso{FFFFFF}.");
  1193. }
  1194. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Esta empresa não existe{FFFFFF}!");
  1195. }
  1196. }
  1197. if(dialogid == DIALOG_INFOS_EMP)
  1198. {
  1199. if(response)
  1200. {
  1201. new Emps[64];
  1202. format(Emps,sizeof(Emps),"Empresas/%d.ini",strval(inputtext));
  1203. {
  1204. if(DOF2_FileExists(Emps))
  1205. {
  1206. new str[400],str2[600];
  1207. format(str,sizeof(str),"{00ED04}Esta empresa está localizada nas coordenadas:\nX: {FFFFFF}%f {00ED04}Y: {FFFFFF}%f {00ED04}Z: {FFFFFF}%f\n{00ED04}No valor de: R${FFFFFF}%d\n{00ED04}Com o interior conforme o ID: {FFFFFF}%d\n{00ED04}Com valor de extorção por entrada de: R${FFFFFF}",DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior")); strcat(str2,str);
  1208. format(str,sizeof(str),"%d\n{00ED04}Com modelo de pickup conforme ID: {FFFFFF}%d\n{00ED04}Com o nome da empresa: {FFFFFF}%s\n{00ED04}DONO da empresa: {FFFFFF}%s",DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetString(Emps,"Nome"),DOF2_GetString(Emps,"DONO")); strcat(str2,str);
  1209. ShowPlayerDialog(playerid,DIALOG_INFOS_EMP_SHOW,DIALOG_STYLE_MSGBOX,"{FADD00}h{1F00CF}Emp{FFFFFF} - INFORMAÇÕES",str2,"FECHAR","");
  1210. }
  1211. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Esta empresa não existe{FFFFFF}!");
  1212. }
  1213. }
  1214. }
  1215. if(dialogid == DIALOG_EDITAR_EMP)
  1216. {
  1217. new str[256],Emps[64];
  1218. format(Emps,sizeof(Emps),"Empresas/%d.ini",strval(inputtext));
  1219. if(DOF2_FileExists(Emps))
  1220. {
  1221. IDEmp[playerid] = strval(inputtext);
  1222. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1223. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1224. }
  1225. else SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {FF0000}Esta empresa não existe{FFFFFF}!");
  1226. }
  1227. if(dialogid == DIALOG_EDIT_LIST)
  1228. {
  1229. if(response)
  1230. {
  1231. if(listitem == 0)
  1232. {
  1233. ShowPlayerDialog(playerid,DIALOG_EDIT_DONO,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR DONO","{00ED04}Digite o nome do novo {FFFFFF}DONO {00ED04}desta empresa{FFFFFF}:\n{00ED04}Para retirar o dono, digite: {FFFFFF}Nenhum","CONFIRMA","Voltar");
  1234. }
  1235. if(listitem == 1)
  1236. {
  1237. ShowPlayerDialog(playerid,DIALOG_EDIT_NOME,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR NOME","{00ED04}Digite o novo {FFFFFF}NOME {00ED04}da empresa{FFFFFF}:","CONFIRMA","Voltar");
  1238. }
  1239. if(listitem == 2)
  1240. {
  1241. ShowPlayerDialog(playerid,DIALOG_EDIT_VALOR,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR VALOR","{00ED04}Digite o novo {FFFFFF}VALOR {00ED04}da empresa{FFFFFF}:","CONFIRMA","Voltar");
  1242. }
  1243. if(listitem == 3)
  1244. {
  1245. new list[1500];
  1246. strcat(list,"{FFFFFF}SELECIONE UM NOVO {00ED04}INTERIOR\n");
  1247. strcat(list,"{00ED04}24/7 - {FFFFFF}1\n{00ED04}24/7 - {FFFFFF}2\n{00ED04}24/7 - {FFFFFF}3\n{00ED04}24/7 - {FFFFFF}4\n{00ED04}24/7 - {FFFFFF}5\n{00ED04}24/7 - {FFFFFF}6\n{00ED04}Balcao do Aeroporto\n{00ED04}Sala de bagagens do Aeroporto\n{00ED04}Shamal - {FFFFFF}Nave\n{00ED04}Andromada - {FFFFFF}Avião\n{00ED04}Loja de armas - {FFFFFF}1\n{00ED04}Loja de armas - {FFFFFF}2\n{00ED04}Loja de armas - {FFFFFF}3\n{00ED04}Loja de armas - {FFFFFF}4\n{00ED04}Loja de armas - {FFFFFF}5\n{00ED04}");
  1248. strcat(list,"Loja de armas - {FFFFFF}Cabines\n{00ED04}Loja de armas - {FFFFFF}Pista\n{00ED04}Corredor dos tolos - {FFFFFF}Blastin\n{00ED04}Sala de orçamento do Motel\n{00ED04}Motel Jefferson\n{00ED04}Loja de apostas - {FFFFFF}Loteria\n{00ED04}Sex Shop\n{00ED04}Fábrica de carne\n{00ED04}Loja do Zero\n{00ED04}Posto de Dillimore\n{00ED04}Porão de Caligula\n{00ED04}Sala de Zeladores FDC\n{00ED04}Escritório do Woozie\n{00ED04}Binco - {FFFFFF}Loja de roupas\n{00ED04}Didier sachs - {FFFFFF}");
  1249. strcat(list,"Loja de roupas\n{00ED04}Prolaps - {FFFFFF}Loja de roupas\n{00ED04}Suburban - {FFFFFF}Loja de roupas\n{00ED04}Victim - {FFFFFF}Loja de roupas\n{00ED04}Zip - {FFFFFF}Loja de roupas\n{00ED04}Alhambra\n{00ED04}Bar\n{00ED04}Bar Lil' probe\n{00ED04}Lanchonete do Jay\n{00ED04}Lanchonete do Gant\n{00ED04}Lanchonete secreta do vale\n{00ED04}Mundo de Coq\n{00ED04}Bar dos bombas\n{00ED04}Burger shot\n{00ED04}Cluckin' bell\n{00ED04}Well stacked pizza\n{00ED04}Rusty Browns rosquinhas");
  1250. ShowPlayerDialog(playerid,DIALOG_EDIT_INTERIOR,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR INTERIOR",list,"CONFIRMA","Voltar");
  1251. }
  1252. if(listitem == 4)
  1253. {
  1254. ShowPlayerDialog(playerid,DIALOG_EDIT_EXTORCAO,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EXTORÇÃO","{00ED04}Digite o novo valor da {FFFFFF}EXTORÇÃO {00ED04}por entrada{FFFFFF}:","CONFIRMA","Voltar");
  1255. }
  1256. if(listitem == 5)
  1257. {
  1258. ShowPlayerDialog(playerid,DIALOG_EDIT_PICKUP,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR PICKUP","{00ED04}Digite o {FFFFFF}ID {00ED04}do novo {FFFFFF}PICKUP{00ED04}:","CONFIRMA","Voltar");
  1259. }
  1260. if(listitem == 6)
  1261. {
  1262. ShowPlayerDialog(playerid,DIALOG_EDIT_COFRE,DIALOG_STYLE_INPUT,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR COFRE","{00ED04}Digite o novo valor do {FFFFFF}COFRE{00ED04}:","CONFIRMA","Voltar");
  1263. }
  1264. }
  1265. }
  1266. if(dialogid == DIALOG_EDIT_DONO)
  1267. {
  1268. new Emps[64];
  1269. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1270. if(response)
  1271. {
  1272. DOF2_SetString(Emps,"DONO",inputtext);
  1273. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}O novo dono foi definido com sucesso{FFFFFF}!");
  1274. RetirarEmps();
  1275. CarregarEmps();
  1276. new str[256];
  1277. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1278. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1279. }
  1280. else
  1281. {
  1282. new str[256];
  1283. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1284. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1285. }
  1286. }
  1287. if(dialogid == DIALOG_EDIT_NOME)
  1288. {
  1289. new Emps[64];
  1290. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1291. if(response)
  1292. {
  1293. DOF2_SetString(Emps,"Nome",inputtext);
  1294. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}O novo nome foi definido com sucesso{FFFFFF}!");
  1295. RetirarEmps();
  1296. CarregarEmps();
  1297. new str[256];
  1298. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1299. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1300. }
  1301. else
  1302. {
  1303. new str[256];
  1304. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1305. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1306. }
  1307. }
  1308. if(dialogid == DIALOG_EDIT_VALOR)
  1309. {
  1310. new Emps[64];
  1311. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1312. if(response)
  1313. {
  1314. DOF2_SetInt(Emps,"Valor",strval(inputtext));
  1315. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}O novo valor foi definido com sucesso{FFFFFF}!");
  1316. RetirarEmps();
  1317. CarregarEmps();
  1318. new str[256];
  1319. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1320. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1321. }
  1322. else
  1323. {
  1324. new str[256];
  1325. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1326. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1327. }
  1328. }
  1329. if(dialogid == DIALOG_EDIT_INTERIOR)
  1330. {
  1331. new Emps[64];
  1332. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1333. if(response)
  1334. {
  1335. for(new i = 0; i <= 46; ++i)
  1336. {
  1337. if(listitem == i)
  1338. {
  1339. DOF2_SetInt(Emps,"IDInterior",i-1);
  1340. RetirarEmps();
  1341. CarregarEmps();
  1342. break;
  1343. }
  1344. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}O novo interior foi definido com sucesso{FFFFFF}!");
  1345. new str[256];
  1346. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1347. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1348. }
  1349. }
  1350. else
  1351. {
  1352. new str[256];
  1353. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1354. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1355. }
  1356. }
  1357. if(dialogid == DIALOG_EDIT_EXTORCAO)
  1358. {
  1359. new Emps[64];
  1360. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1361. if(response)
  1362. {
  1363. DOF2_SetInt(Emps,"Extorcao",strval(inputtext));
  1364. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}O novo valor de extorção foi definido com sucesso{FFFFFF}!");
  1365. RetirarEmps();
  1366. CarregarEmps();
  1367. new str[256];
  1368. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1369. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1370. }
  1371. else
  1372. {
  1373. new str[256];
  1374. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1375. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1376. }
  1377. }
  1378. if(dialogid == DIALOG_EDIT_PICKUP)
  1379. {
  1380. new Emps[64];
  1381. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1382. if(response)
  1383. {
  1384. DOF2_SetInt(Emps,"Pickup",strval(inputtext));
  1385. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}A nova pickup foi definida com sucesso{FFFFFF}!");
  1386. RetirarEmps();
  1387. CarregarEmps();
  1388. new str[256];
  1389. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1390. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1391. }
  1392. else
  1393. {
  1394. new str[256];
  1395. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1396. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1397. }
  1398. }
  1399. if(dialogid == DIALOG_EDIT_COFRE)
  1400. {
  1401. new Emps[64];
  1402. format(Emps,sizeof(Emps),"Empresas/%d.ini",IDEmp[playerid]);
  1403. if(response)
  1404. {
  1405. DOF2_SetInt(Emps,"Cofre",strval(inputtext));
  1406. SendClientMessage(playerid,-1,"{FFFFFF}[ ! ] {00ED04}O novo valor do cofre foi definido com sucesso{FFFFFF}!");
  1407. RetirarEmps();
  1408. CarregarEmps();
  1409. new str[256];
  1410. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1411. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1412. }
  1413. else
  1414. {
  1415. new str[256];
  1416. format(str,sizeof(str),"{00ED04}DONO: {FFFFFF}%s\n{00ED04}NOME: {FFFFFF}%s\n{00ED04}VALOR: R${FFFFFF}%d,00\n{00ED04}INTERIOR: {FFFFFF}%d\n{00ED04}EXTORÇÃO: R${FFFFFF}%d,00\n{00ED04}PICKUP: {FFFFFF}%d\n{00ED04}COFRE: R${FFFFFF}%d",DOF2_GetString(Emps,"DONO"),DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"Valor"),DOF2_GetInt(Emps,"IDInterior"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Pickup"),DOF2_GetInt(Emps,"Cofre"));
  1417. ShowPlayerDialog(playerid,DIALOG_EDIT_LIST,DIALOG_STYLE_LIST,"{FADD00}h{1F00CF}Emp{FFFFFF} - EDITAR EMPRESA",str,"EDITAR","Cancelar");
  1418. }
  1419. }
  1420. return 1;
  1421. }
  1422.  
  1423. stock CarregarEmps()
  1424. {
  1425. new Emps[128],TxtEmp[256];
  1426. for(new e = 0; e <= 999; ++e)
  1427. {
  1428. format(Emps,sizeof(Emps),"Empresas/%d.ini",e);
  1429. if(DOF2_FileExists(Emps))
  1430. {
  1431. if(!strcmp(DOF2_GetString(Emps,"DONO"),"Nenhum",false))
  1432. {
  1433. format(TxtEmp,sizeof(TxtEmp),"{26C2FF}EMPRESA\n{FADD00}Nome: {FFFFFF}%s\n{FADD00}ID: {FFFFFF}%d\n{FADD00}DONO: {FFFFFF}%s\n{FADD00}Extorção: {00ED04}R${FFFFFF}%d,00\n{00ED04}À VENDA! Use: {FFFFFF}/compraremp\n{FADD00}VALOR: R${FFFFFF}%d\n{26C2FF}F para entrar.",DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"ID"),DOF2_GetString(Emps,"DONO"),DOF2_GetInt(Emps,"Extorcao"),DOF2_GetInt(Emps,"Valor"));
  1434. IDTextEmp[e] = Create3DTextLabel(TxtEmp,-1,DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z"),30.0,0);
  1435. EmpPickup[e] = CreatePickup(DOF2_GetInt(Emps,"Pickup"),23,DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z"),0);
  1436. }
  1437. else
  1438. {
  1439. format(TxtEmp,sizeof(TxtEmp),"{26C2FF}EMPRESA\n{FADD00}Nome: {FFFFFF}%s\n{FADD00}ID: {FFFFFF}%d\n{FADD00}DONO: {FFFFFF}%s\n{FADD00}Extorção: {00ED04}R${FFFFFF}%d,00\n \n{26C2FF}F para entrar.",DOF2_GetString(Emps,"Nome"),DOF2_GetInt(Emps,"ID"),DOF2_GetString(Emps,"DONO"),DOF2_GetInt(Emps,"Extorcao"));
  1440. IDTextEmp[e] = Create3DTextLabel(TxtEmp,-1,DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z"),30.0,0);
  1441. EmpPickup[e] = CreatePickup(DOF2_GetInt(Emps,"Pickup"),23,DOF2_GetFloat(Emps,"X"),DOF2_GetFloat(Emps,"Y"),DOF2_GetFloat(Emps,"Z"),0);
  1442. }
  1443. }
  1444. }
  1445. return 1;
  1446. }
  1447.  
  1448. stock RetirarEmps()
  1449. {
  1450. for(new e = 0; e <= 999; ++e)
  1451. {
  1452. DestroyPickup(EmpPickup[e]);
  1453. Delete3DTextLabel(IDTextEmp[e]);
  1454. if(e == 998)
  1455. {
  1456. break;
  1457. }
  1458. }
  1459. return 1;
  1460. }
  1461.  
  1462. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1463. //=-=-=-=-=-=-=-=-=-=-=-=-=-=[hEmp System - Criado e Desenvolvido por: HeyHoLetsGo]=-=-=-=-=-=-=-=-=-=-=-=-=
  1464. //=-=-=-=-=-=-=-=-=-=-=-=-=-=[Créditos ao Tonisaltolia por BETA Tester + Ajuda ]=-=-=-=-=-=-=-=-=-=-=-=-=
  1465. //=-=-=-=-=-=-=-=-=-=-=-=-=-=[Visite: forum.sa-mp.com | NÃO RETIRE OS CRÉDITOS! ]=-=-=-=-=-=-=-=-=-=-=-=-=
  1466. //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement