DexterBRSan

Fs Empregos

Nov 2nd, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.50 KB | None | 0 0
  1. /*
  2.  
  3. Sistema By R3dDesign
  4.  
  5.  
  6. |||||||||||||||||||||||||||||||||||||
  7. |||| Lista de Organizações ||||
  8. |||| 1 - Rocam ||||
  9. |||| 2 - Força Tática ||||
  10. |||| 3 - Policia Civil ||||
  11. |||| 4 - Policia Federal ||||
  12. |||| 5 - Groove Streeet Families ||||
  13. |||| 6 - Front Yard Ballas ||||
  14. |||| 7 - Varrio Los Aztecas ||||
  15. |||| 8 - Los Santos Vagos ||||
  16. |||| 9 - Comando Vermelho ||||
  17. |||| 10 - Hitman ||||
  18. |||| 11 - Instrutor ||||
  19. |||| 12 - Alqaeda ||||
  20. |||| 13 - Taxista ||||
  21. |||| 13 - Exercito ||||
  22. |||||||||||||||||||||||||||||||||||||
  23.  
  24. ||||||||||||||||||||||||||||||||||||||||||||||
  25. ||Lista de Cores Organizações || Cores ||
  26. ||Rocam || 0x251BE0C8 ||
  27. ||Força Tática || 0x292323C8 ||
  28. ||Policia Civil || 0x734646AA ||
  29. ||Policia Federal || 0x382A2AFF ||
  30. ||Groove Street || 0x35C930AA ||
  31. ||Ballas || 0xC930B8AA ||
  32. ||Aztecas || 0x4F30C9AA ||
  33. ||Vagos || 0xBFE30EAA ||
  34. ||Comando Vermelho || 0xFF0022AA ||
  35. ||Hitman || 0x878787AA ||
  36. ||Instrutor || 0x0033FFAA ||
  37. ||Alqaeda || 0x734545AA ||
  38. ||Taxista || 0xBEE815AA ||
  39. ||Exercito || 0x388A51AA ||
  40. ||||||||||||||||||||||||||||||||||||||||||||||
  41.  
  42. |||||||||||||||||||||||||||||||||||||
  43. |||| Lista de Empregos ||||
  44. |||| 1 - Lixeiro | Gari ||||
  45. |||| 2 - Advogado ||||
  46. |||| 3 - Motorista Busao ||||
  47. |||| 4 - Vendedor de Armas ||||
  48. |||| 5 - Vendedor de Drogas ||||
  49. |||| 6 - Prostituta ||||
  50. |||||||||||||||||||||||||||||||||||||
  51. */
  52.  
  53. // =============================================================================
  54. #include <a_samp>
  55. #include <Dini>
  56. #define Empregos 20
  57. #define CONTAS "Players/%s.ini" // Onde vai salvar tudo ;z
  58. #define CorRocam 0x251BE0C8
  59. #define CorFT 0x292323C8
  60. #define CorPC 0x734646AA
  61. #define CorPF 0x382A2AFF
  62. #define CorGroove 0x35C930AA
  63. #define CorBallas 0xC930B8AA
  64. #define CorAztecas 0x4F30C9AA
  65. #define CorVagos 0xBFE30EAA
  66. #define CorCV 0xFF0022AA
  67. #define CorHitman 0x878787AA
  68. #define CorInstrutor 0x0033FFAA
  69. #define CorAlqaeda 0x734545AA
  70. #define CorTaxista 0xBEE815AA
  71. #define CorExercito 0x388A51AA
  72. enum PInfo
  73. {
  74. pMembro,
  75. pLider,
  76. pProfissao
  77. }
  78. new LipeStrondaInfo[MAX_PLAYERS][PInfo];
  79. // =============================================================================
  80. public OnFilterScriptInit()
  81. {
  82. print("FilterScript Ligado ;D by: Lipe_Stronda");
  83. return 1;
  84. }
  85. // =============================================================================
  86. public OnFilterScriptExit()
  87. {
  88. print("FilterScript Desligado");
  89. return 1;
  90. }
  91. // =============================================================================
  92. public OnPlayerConnect(playerid)
  93. {
  94. SetarPlayer(playerid);
  95. return 1;
  96. }
  97.  
  98. public OnPlayerDisconnect(playerid, reason)
  99. {
  100. SalvarPlayer(playerid);
  101. return 1;
  102. }
  103. // =============================================================================
  104. public OnPlayerCommandText(playerid, cmdtext[])
  105. {
  106. if (strcmp("/rg", cmdtext, true, 8) == 0)
  107. {
  108. Rg(playerid);
  109. return 1;
  110. }
  111. if (strcmp("/rocam", cmdtext, true, 8) == 0)
  112. {
  113. LipeStrondaInfo[playerid][pLider] = 1;
  114. return 1;
  115. }
  116. if (strcmp("/forçatatica", cmdtext, true, 8) == 0)
  117. {
  118. LipeStrondaInfo[playerid][pLider] = 2;
  119. return 1;
  120. }
  121. if (strcmp("/policiacivil", cmdtext, true, 8) == 0)
  122. {
  123. LipeStrondaInfo[playerid][pLider] = 3;
  124. return 1;
  125. }
  126. if (strcmp("/policiafederal", cmdtext, true, 8) == 0)
  127. {
  128. LipeStrondaInfo[playerid][pLider] = 4;
  129. return 1;
  130. }
  131. if (strcmp("/groovestreet", cmdtext, true, 8) == 0)
  132. {
  133. LipeStrondaInfo[playerid][pLider] = 5;
  134. return 1;
  135. }
  136. if (strcmp("/ballas", cmdtext, true, 8) == 0)
  137. {
  138. LipeStrondaInfo[playerid][pLider] = 6;
  139. return 1;
  140. }
  141. if (strcmp("/aztecas", cmdtext, true, 8) == 0)
  142. {
  143. LipeStrondaInfo[playerid][pLider] = 7;
  144. return 1;
  145. }
  146. if (strcmp("/vagos", cmdtext, true, 8) == 0)
  147. {
  148. LipeStrondaInfo[playerid][pLider] = 8;
  149. return 1;
  150. }
  151. if (strcmp("/comandovermelho", cmdtext, true, 8) == 0)
  152. {
  153. LipeStrondaInfo[playerid][pLider] = 9;
  154. return 1;
  155. }
  156. if (strcmp("/hitman", cmdtext, true, 8) == 0)
  157. {
  158. LipeStrondaInfo[playerid][pLider] = 10;
  159. return 1;
  160. }
  161. if (strcmp("/instrutor", cmdtext, true, 8) == 0)
  162. {
  163. LipeStrondaInfo[playerid][pLider] = 11;
  164. return 1;
  165. }
  166. if (strcmp("/alqaeda", cmdtext, true, 8) == 0)
  167. {
  168. LipeStrondaInfo[playerid][pLider] = 12;
  169. return 1;
  170. }
  171. if (strcmp("/taxista", cmdtext, true, 8) == 0)
  172. {
  173. LipeStrondaInfo[playerid][pLider] = 13;
  174. return 1;
  175. }
  176. if (strcmp("/exercito", cmdtext, true, 8) == 0)
  177. {
  178. LipeStrondaInfo[playerid][pLider] = 14;
  179. return 1;
  180. }
  181. if (strcmp("/empregos", cmdtext, true, 10) == 0)
  182. {
  183. ShowPlayerDialog(playerid, 20, DIALOG_STYLE_LIST, "Escolha Um Emprego", "Lixeiro\nAdvogado\nMotorista de Onibus\nVendedor de Armas\nVendedor de Armas\nProstituta", "Selecionar", "Cancelar");
  184. return 1;
  185. }
  186. return 0;
  187. }
  188. // =============================================================================
  189. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  190. {
  191. if(dialogid == 20)
  192. {
  193. if(!response)
  194. return true;
  195. else
  196. {
  197. switch (listitem)
  198. {
  199. case 0:
  200. {
  201. if(LipeStrondaInfo[playerid][pProfissao] >= 1) return SendClientMessage(playerid, -1, "Você já tem uma profissão!!!");
  202. LipeStrondaInfo[playerid][pProfissao] = 1; // Lixeiro
  203. SendClientMessage(playerid, -1, "Parabéns Você Agora é uma pessoa trabalhadora ;D");
  204. SendClientMessage(playerid, -1, "Seu Novo Emprego: {1B70E0}Lixeiro");
  205. }
  206. case 1:
  207. {
  208. if(LipeStrondaInfo[playerid][pProfissao] >= 1) return SendClientMessage(playerid, -1, "Você já tem uma profissão!!!");
  209. LipeStrondaInfo[playerid][pProfissao] = 2; // Advogado
  210. SendClientMessage(playerid, -1, "Parabéns Você Agora é uma pessoa trabalhadora ;D");
  211. SendClientMessage(playerid, -1, "Seu Novo Emprego: {1B70E0}Advogado");
  212. }
  213. case 2:
  214. {
  215. if(LipeStrondaInfo[playerid][pProfissao] >= 1) return SendClientMessage(playerid, -1, "Você já tem uma profissão!!!");
  216. LipeStrondaInfo[playerid][pProfissao] = 3; // Motorista de Onibus
  217. SendClientMessage(playerid, -1, "Parabéns Você Agora é uma pessoa trabalhadora ;D");
  218. SendClientMessage(playerid, -1, "Seu Novo Emprego: {1B70E0}Motorista de Onibus");
  219. }
  220. case 3:
  221. {
  222. if(LipeStrondaInfo[playerid][pProfissao] >= 1) return SendClientMessage(playerid, -1, "Você já tem uma profissão!!!");
  223. LipeStrondaInfo[playerid][pProfissao] = 4; // Vendedor de Armas
  224. SendClientMessage(playerid, 0xFF0000AA, "Parabéns Você Agora é uma pessoa trabalhadora ;D");
  225. SendClientMessage(playerid, 0xFF0000AA, "Seu Novo Emprego: {1B70E0}Vendedor de Armas");
  226. }
  227. case 4:
  228. {
  229. if(LipeStrondaInfo[playerid][pProfissao] >= 1) return SendClientMessage(playerid, -1, "Você já tem uma profissão!!!");
  230. LipeStrondaInfo[playerid][pProfissao] = 5; // Vendedor de Drogas
  231. SendClientMessage(playerid, -1, "Parabéns Você Agora é uma pessoa trabalhadora ;D");
  232. SendClientMessage(playerid, -1, "Seu Novo Emprego: {1B70E0}Vendedor de Drogas");
  233. }
  234. case 5:
  235. {
  236. if(LipeStrondaInfo[playerid][pProfissao] >= 1) return SendClientMessage(playerid, -1, "Você já tem uma profissão!!!");
  237. LipeStrondaInfo[playerid][pProfissao] = 6; // Prostituta
  238. SendClientMessage(playerid, -1, "Parabéns Você Agora é uma pessoa trabalhadora ;D");
  239. SendClientMessage(playerid, -1, "Seu Novo Emprego: {1B70E0}Prostituta");
  240. }
  241. }
  242. }
  243. return 1;
  244. }
  245. return 1;
  246. }
  247.  
  248. SalvarPlayer(playerid)
  249. {
  250. new Nome[MAX_PLAYER_NAME];
  251. GetPlayerName(playerid, Nome, sizeof(Nome));
  252. new String[50];
  253. format(String, sizeof(String), CONTAS, Nome);
  254. dini_IntSet(String,"Lider", LipeStrondaInfo[playerid][pLider]);
  255. dini_IntSet(String,"Membro", LipeStrondaInfo[playerid][pMembro]);
  256. dini_IntSet(String,"Profissao", LipeStrondaInfo[playerid][pProfissao]);
  257. return 1;
  258. }
  259.  
  260. SetarPlayer(playerid)
  261. {
  262. new Nome[MAX_PLAYER_NAME];
  263. GetPlayerName(playerid, Nome, sizeof(Nome));
  264. new String[50];
  265. format(String, sizeof(String), CONTAS, Nome);
  266. LipeStrondaInfo[playerid][pLider] = dini_Int(String, "Lider");
  267. LipeStrondaInfo[playerid][pMembro] = dini_Int(String, "Membro");
  268. LipeStrondaInfo[playerid][pProfissao] = dini_Int(String, "Profissão");
  269. return 1;
  270. }
  271.  
  272. Rg(playerid)
  273. {
  274. new pNome[MAX_PLAYER_NAME];
  275. GetPlayerName(playerid, pNome, sizeof(pNome));
  276. new String[128];
  277. SendClientMessage(playerid, 0xFF0000AA, "================================================");
  278. format(String, sizeof(String),"Status De %s",pNome);
  279. SendClientMessage(playerid, 0xFFFF00AA,String);
  280. format(String, sizeof(String),"Lider: [%s] Id Organização [%d]",Org(playerid), LipeStrondaInfo[playerid][pLider]);
  281. SendClientMessage(playerid, 0x1E90FFAA,String);
  282. format(String, sizeof(String),"Membro: [%s] Id Organização: [%d]",Org(playerid), LipeStrondaInfo[playerid][pMembro]);
  283. SendClientMessage(playerid, 0x1E90FFAA,String);
  284. format(String, sizeof(String), "Profissão:[%s] Id Profissão: [%d]",Profs(playerid), LipeStrondaInfo[playerid][pProfissao]);
  285. SendClientMessage(playerid, 0x1E90FFAA,String);
  286. SendClientMessage(playerid, 0xFF0000AA, "================================================");
  287. return 1;
  288. }
  289.  
  290. stock Org(playerid)
  291. {
  292. new LipeStrondaOrgs[64];
  293. if(LipeStrondaInfo[playerid][pMembro] == 0 && LipeStrondaInfo[playerid][pLider] == 0) { LipeStrondaOrgs = "Civil"; }
  294. else if(LipeStrondaInfo[playerid][pMembro] == 1 || LipeStrondaInfo[playerid][pLider] == 1) { LipeStrondaOrgs = "Polícia Militar"; }
  295. else if(LipeStrondaInfo[playerid][pMembro] == 2 || LipeStrondaInfo[playerid][pLider] == 2) { LipeStrondaOrgs = "Bope"; }
  296. else if(LipeStrondaInfo[playerid][pMembro] == 3 || LipeStrondaInfo[playerid][pLider] == 3) { LipeStrondaOrgs = "Policia Civil"; }
  297. else if(LipeStrondaInfo[playerid][pMembro] == 4 || LipeStrondaInfo[playerid][pLider] == 4) { LipeStrondaOrgs = "Policia Federal"; }
  298. else if(LipeStrondaInfo[playerid][pMembro] == 5 || LipeStrondaInfo[playerid][pLider] == 5) { LipeStrondaOrgs = "Groove Street"; }
  299. else if(LipeStrondaInfo[playerid][pMembro] == 6 || LipeStrondaInfo[playerid][pLider] == 6) { LipeStrondaOrgs = "Ballas"; }
  300. else if(LipeStrondaInfo[playerid][pMembro] == 7 || LipeStrondaInfo[playerid][pLider] == 7) { LipeStrondaOrgs = "Aztecas"; }
  301. else if(LipeStrondaInfo[playerid][pMembro] == 8 || LipeStrondaInfo[playerid][pLider] == 8) { LipeStrondaOrgs = "Vagos"; }
  302. else if(LipeStrondaInfo[playerid][pMembro] == 9 || LipeStrondaInfo[playerid][pLider] == 9) { LipeStrondaOrgs = "Comando Vermelho"; }
  303. else if(LipeStrondaInfo[playerid][pMembro] == 10 || LipeStrondaInfo[playerid][pLider] == 10) { LipeStrondaOrgs = "Hitman"; }
  304. else if(LipeStrondaInfo[playerid][pMembro] == 11 || LipeStrondaInfo[playerid][pLider] == 11) { LipeStrondaOrgs = "Instrutor"; }
  305. else if(LipeStrondaInfo[playerid][pMembro] == 12 || LipeStrondaInfo[playerid][pLider] == 12) { LipeStrondaOrgs = "Alqaeda"; }
  306. else if(LipeStrondaInfo[playerid][pMembro] == 13 || LipeStrondaInfo[playerid][pLider] == 13) { LipeStrondaOrgs = "Taxista"; }
  307. else if(LipeStrondaInfo[playerid][pMembro] == 14 || LipeStrondaInfo[playerid][pLider] == 14) { LipeStrondaOrgs = "Exercito"; }
  308. return LipeStrondaOrgs;
  309. }
  310.  
  311. stock Profs(playerid)
  312. {
  313. new LipeStrondaProfs[64];
  314. if(LipeStrondaInfo[playerid][pMembro] == 0 && LipeStrondaInfo[playerid][pLider] == 0) { LipeStrondaProfs = "Desempregado"; }
  315. else if(LipeStrondaInfo[playerid][pProfissao] == 1 || LipeStrondaInfo[playerid][pProfissao] == 1) { LipeStrondaProfs = "Lixeiro"; }
  316. else if(LipeStrondaInfo[playerid][pProfissao] == 2 || LipeStrondaInfo[playerid][pProfissao] == 2) { LipeStrondaProfs = "Advogado"; }
  317. else if(LipeStrondaInfo[playerid][pProfissao] == 3 || LipeStrondaInfo[playerid][pProfissao] == 3) { LipeStrondaProfs = "Motorista de Onibus"; }
  318. else if(LipeStrondaInfo[playerid][pProfissao] == 4 || LipeStrondaInfo[playerid][pProfissao] == 4) { LipeStrondaProfs = "Vendedor de Armas"; }
  319. else if(LipeStrondaInfo[playerid][pProfissao] == 5 || LipeStrondaInfo[playerid][pProfissao] == 5) { LipeStrondaProfs = "Vendedor de Drogas"; }
  320. else if(LipeStrondaInfo[playerid][pProfissao] == 6 || LipeStrondaInfo[playerid][pProfissao] == 6) { LipeStrondaProfs = "Prostituta"; }
  321. return LipeStrondaProfs;
  322. }
Advertisement
Add Comment
Please, Sign In to add comment