Advertisement
FamiliaSAMP

FILTERSCRIPT SISTEMA DE EMPRESAS E ORGS [FAMILIASAMP.COM]

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