Guest User

[ajuda]level procurado

a guest
May 18th, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.47 KB | None | 0 0
  1. //Includes
  2. #include <a_samp>
  3. #include <c_vehicleinfo>
  4. #include <a_players>
  5. #include <a_vehicles>
  6. #include <dini>
  7. #include <cpstream>
  8. //#include <utils>
  9. //#include <nnfanticheater>
  10. #include <streamer>
  11. #include <foreach>
  12. #include <antibot>
  13.  
  14.  
  15.  
  16. //// Tudo relacionado a wanted level
  17.  
  18. if(dini_Int(file, "Procurado") == 1){
  19. Procurados[playerid]= 1;
  20. }
  21. if(dini_Int(file, "levelprocurado") == 1){
  22. Procurados[playerid]= 1;
  23. }
  24.  
  25.  
  26. ///
  27. /// Tudo que esta relacionado ao Wanted no gm
  28.  
  29. if(strcmp(cmdtext, "/limparficha", true) == 0) {
  30. new pname[MAX_PLAYER_NAME];
  31. GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  32. new check;
  33. check = CPS_GetPlayerCheckpoint(playerid);
  34. if(check == checkdpdentro){
  35. if(GetPlayerGrana(playerid) > 2499){
  36. GivePlayerGrana(playerid,-2500);
  37. dini_IntSet(filene(pname),"Procurado",0);
  38. SetPlayerWantedLevel(playerid, 0);
  39. Procurados[playerid] = 0;
  40. levelprocurado[playerid] = 0;
  41. PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  42. SendClientMessage(playerid, COLOR_WHITE,"| INFO | Você limpou sua ficha e foi retirado da lista de procurados.");
  43. } else {
  44. SendClientMessage(playerid, Vermelho,"| ERRO | Você não tem dinheiro suficiente.");
  45. }
  46. } else {
  47. SendClientMessage(playerid, Vermelho,"| ERRO | Você não está na DP.");
  48. }
  49. return 1;
  50. }
  51.  
  52.  
  53. if(strcmp(cmdtext, "/fianca", true) == 0) {
  54. new aname[MAX_PLAYER_NAME];
  55. GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  56. format(file, sizeof(file), PASTA_CONTAS, aname);
  57. new grana;
  58. grana = dini_Int(file, "SaldoBancario");
  59. if(dini_Int(file, "Preso") == 1){
  60. if(grana > 10000){
  61. if(Preso[playerid]>= 2){
  62. SetPlayerWantedLevel(playerid, 0);
  63. Procurados[playerid] = 0;
  64. levelprocurado[playerid] = 0;
  65. dini_IntSet(file2, "Procurado", 0);
  66. dini_IntSet(file, "Preso",0);
  67. dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")-Fianca);
  68. preso[playerid] = 0;
  69. Preso[playerid] = 0;
  70. algemado[playerid] = 0;
  71. SetPlayerPos(playerid, 268.394561,77.728500,1001.039062);
  72. SetPlayerInterior(playerid, 6);
  73. SetPlayerHealth(playerid,100);
  74. SendClientMessage(playerid, Verde,"(CADEIA) Você pagou a fiança e foi liberado!");
  75. SetPlayerWantedLevel(playerid, 0);
  76. } else {
  77. SendClientMessage(playerid, Vermelho,"(ERRO) Aguarde 2 minutos para procurar ajuda.");
  78. }
  79. } else {
  80. SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem dinheiro suficiente em sua conta bancaria R$: 10000");
  81. }
  82. } else {
  83. SendClientMessage(playerid, Vermelho,"(ERRO) Você não está preso para pagar fiança.");
  84. }
  85. return 1;
  86. }
  87.  
  88.  
  89.  
  90. if(strcmp(cmd, "/assaltar", true) == 0) {
  91. if(dini_Int(file,"rouboubanco") == 1) return SendClientMessage(playerid, Vermelho, "(ERRO) Você assaltou o banco recentemente!");
  92. new aname[MAX_PLAYER_NAME];
  93. GetPlayerName(playerid, aname, sizeof(aname));
  94. format(file, sizeof(file), PASTA_CONTAS, aname);
  95. new checknome;
  96. checknome = CPS_GetPlayerCheckpoint(playerid);
  97. if(checknome == caixaeletronico1 || checknome == caixaeletronico2 || checknome == caixaeletronico3 || checknome == caixaeletronico4 || checknome == caixaeletronico5 || checknome == caixaeletronico6 || checknome == caixaeletronico7){
  98. if(dini_Int(file,"rouboubanco") == 0){
  99. if(dini_Int(file, "Profissao") == Assaltante || dini_Int(file, "aAdmin") == 1 || IsPlayerAdmin(playerid)){
  100. format(string, sizeof(string), "(BANCO) %s assaltou um banco e está na lista de procurados!",aname);
  101. SendClientMessageToAll(msgdm, string);
  102. new bancoa,Float:x,Float:y,Float:z;
  103. GetPlayerPos(playerid,x,y,z);
  104. bancoa = CreateObject(1829,x,y,z-0,0,0,0);
  105. SetTimerEx("DestruirObjeto",200000,false,"d",bancoa);
  106. dini_IntSet(file, "Procurado", 1);
  107. dini_IntSet(file, "rouboubanco", 1);
  108. Procurados[playerid]= 1;
  109. levelprocurado[playerid]= 6;
  110. SetPlayerWantedLevel(playerid, 6);
  111. GivePlayerGrana(playerid,1100);
  112. } else {
  113. SendClientMessage(playerid, Vermelho,"(ERRO) Você não é um assaltante!");
  114. }
  115. } else {
  116. SendClientMessage(playerid, Vermelho,"(ERRO) Você não esta em um Banco!");
  117. }
  118. }
  119. return 1;
  120. }
  121.  
  122.  
  123.  
  124. SendClientMessage(playerid, Vermelho, " /vozdeprisao [id]");
  125. return 1;
  126. }
  127. plid = strval(tmp);
  128. if(plid == playerid){
  129. SendClientMessage(playerid, Vermelho, "| ERRO | Você não pode usar este comando em você mesmo.");
  130. return 1 ;
  131. }
  132. if(!IsPlayerConnected(plid)){
  133. SendClientMessage(playerid, Vermelho, "| ERRO | Jogador não conectado.");
  134. return 1;
  135. } else {
  136. if(GetDistanceBetweenPlayers(plid,playerid) < 10){
  137. new result[100];
  138. format(string, sizeof(string), "| INFO | Você foi colocado na viatura por %s !",aname, result);//ai essa pohan ta certa
  139. SendClientMessage(plid, 0x8C8CFFAA, string);
  140. levelprocurado[playerid]= 6;
  141. SetPlayerWantedLevel(playerid, 6);
  142. TogglePlayerControllable(plid, 0);
  143. RemovePlayerAttachedObject(plid, 4);
  144. preso[plid] = 1;
  145. SendClientMessage(playerid, 0x8C8CFFAA, "| INFO | Colocado na viatura, va ate a garagem da DP e prenda!");//perae vamo pesquisar
  146. new pname[MAX_PLAYER_NAME];
  147. GetPlayerName(plid,pname,MAX_PLAYER_NAME);
  148. format(string, sizeof(string),"[Corregedoria]O Policial %s(ID: %d) Deu voz de Prisão a %s(ID: %d)", aname,playerid,pname,plid,tmp);
  149. Comandosp(Roxo,string,1);//go la ver agora
  150. new VehicleID;
  151. VehicleID = GetPlayerVehicleID(playerid);
  152. PutPlayerInVehicle(plid,VehicleID,2);
  153. return 1;
  154. } else {
  155. if(algemado[plid] == 0 || GetPlayerSpecialAction(plid) != SPECIAL_ACTION_HANDSUP){
  156. SendClientMessage(playerid, COLOR_RED,"O player não está algemado ou rendido!");
  157. return 1;
  158. }
  159. SendClientMessage(playerid,Vermelho," Chegue mais perto !");
  160. return 1;
  161. }
  162. }
  163. } else {
  164. SendClientMessage(playerid,Vermelho,"| ERRO | Você não está em uma Viatura da Policia!");
  165. return 1;
  166. }
  167. } else {
  168. SendClientMessage(playerid,Vermelho,"(ERRO) Você não é um policial!");
  169. return 1;
  170. }
  171. }
  172.  
  173.  
  174. if(strcmp(cmd, "/soltar", true) == 0) {
  175. new aname[MAX_PLAYER_NAME];
  176. GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  177. format(file, sizeof(file), PASTA_CONTAS, aname);
  178. if(dini_Int(file, "aAdmin") == 1 || dini_Int(file, "Profissao") == Advogado || IsPlayerAdmin(playerid) || pAdmin[playerid] == 5 || IsPlayerAdmin(playerid)){
  179. new tmp[256];
  180. new plid;
  181. tmp = strtok(cmdtext, idx);
  182. if(!strlen(tmp)){
  183. SendClientMessage(playerid, Vermelho, "/soltar [id]");
  184. return 1;
  185. }
  186. plid = strval(tmp);
  187. if(!IsPlayerConnected(plid)){
  188. SendClientMessage(playerid, Vermelho, "(ERRO) Jogador não conectado.");
  189. return 1;
  190. } else {
  191. new pname[MAX_PLAYER_NAME];
  192. GetPlayerName(plid, pname, MAX_PLAYER_NAME);
  193. format(file2, sizeof(file2), PASTA_CONTAS, pname);
  194. format(string, sizeof(string), "(INFO) Você foi solto por '%s'.", aname);
  195. SendClientMessage(plid, Aviso, string);
  196. dini_IntSet(file2, "Preso", 0);
  197. preso[plid] = 0;
  198. SetPlayerHealth(plid,100);
  199. Preso[plid] = 0;
  200. algemado[plid] = 0;
  201. SetPlayerPos(plid, 268.394561,77.728500,1001.039062);
  202. SetPlayerInterior(plid, 6);
  203. SetPlayerWantedLevel(plid, 0);
  204. SendClientMessage(playerid, 0x8C8CFFAA, "(INFO) Solto com sucesso.");
  205. soltou[playerid] = 1;
  206. return 1;
  207. }
  208. } else {
  209. SendClientMessage(playerid,Vermelho,"(ERRO) Você não é um Advogado");
  210. return 1;
  211. }
  212. }
  213.  
  214.  
  215. if(strcmp(cmd,"/procurar", true) == 0) {
  216. if(dini_Int(file, "Profissao") == Policia_Militar || dini_Int(file, "Profissao") == Policia_Civil || dini_Int(file, "Profissao") == Policia_Federal || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == PC || pAdmin[playerid] >= 3){
  217. new tmp[256];
  218. new msg[256];
  219. tmp = strtok(cmdtext, idx);
  220. new plid;
  221. plid = strval(tmp);
  222. if(!strlen(tmp))
  223. {
  224. SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id] [motivo]");
  225. return 1;
  226. }
  227. msg = strrest(cmdtext, idx);
  228. if(!strlen(msg)){
  229. SendClientMessage(playerid, COLOR_GREEN,"| ERRO | Use /procurar [id] [motivo]");
  230. return 1;
  231. }
  232. if(IsPlayerConnected(plid))
  233. {
  234. new str[128];
  235. new giveplayer[MAX_PLAYER_NAME];
  236. new sendername[MAX_PLAYER_NAME];
  237. //new result[100];
  238. GetPlayerName(playerid, sendername, sizeof(sendername));
  239. GetPlayerName(plid, giveplayer, sizeof(giveplayer));
  240. format(str, sizeof(str), "| INFO | Você foi colocado na lista de procurados pelo Policial %s (Motivo: %s)", sendername, msg);
  241. SendClientMessage(plid, 0xFFD39BAA, str);
  242. format(str, sizeof(str), "| INFO | Você colocou o jogador %s na lista de procurados!", giveplayer);
  243. SendClientMessage(playerid, 0xFFD39BAA, str);
  244. SetPlayerWantedLevel(plid, GetPlayerWantedLevel(plid)+1);
  245. if(GetPlayerWantedLevel(plid) > 6)
  246. SetPlayerWantedLevel(plid, 6);
  247. Procurados[plid]= 1;
  248. levelprocurado[plid]= 1;
  249. new pname[MAX_PLAYER_NAME];
  250. new aname[MAX_PLAYER_NAME];
  251. GetPlayerName(plid,pname,MAX_PLAYER_NAME);
  252. format(string, sizeof(string),"[Corregedoria]O Policial %s(ID: %d) Colocou %s(ID: %d) [Motivo: %s]", aname,playerid,pname,plid,msg);
  253. Comandosp(Roxo,string,1);
  254. return 1;
  255. }
  256. else
  257. {
  258. SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador não conectado ou esse e seu id");
  259. return 1;
  260. }
  261. }
  262. }
  263.  
  264. if(strcmp(cmd, "/desprocurar", true) == 0){
  265. new aname[MAX_PLAYER_NAME];
  266. new plid;
  267. GetPlayerName(plid,aname,MAX_PLAYER_NAME);
  268. if(dini_Int(filene(aname),"Corregedor") >= 1 || pAdmin[playerid] == 5 || IsPlayerAdmin(playerid)){
  269. new tmp[256];
  270. GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  271. tmp = strtok(cmdtext, idx);
  272. plid = strval(tmp);
  273. if(!strlen(tmp))
  274. {
  275. SendClientMessage(playerid, 0xFFD39BAA, "Use: /desprocurar [id]");
  276. return 1;
  277. }
  278. if(IsPlayerConnected(plid))
  279. {
  280. new str[128];
  281. new giveplayer[MAX_PLAYER_NAME];
  282. new sendername[MAX_PLAYER_NAME];
  283. GetPlayerName(playerid, sendername, sizeof(sendername));
  284. GetPlayerName(plid, giveplayer, sizeof(giveplayer));
  285. format(str, sizeof(str), "(INFO) Você foi retirado da lista de procurados pelo jogador %s", sendername);
  286. SendClientMessage(plid, 0xFFD39BAA, str);
  287. format(str, sizeof(str), "(INFO) Você retirou o jogador %s da lista de procurados!", giveplayer);
  288. SendClientMessage(playerid, 0xFFD39BAA, str);
  289. dini_IntSet(file, "Procurado", 0);
  290. SetPlayerWantedLevel(plid, 0);
  291. Procurados[plid]= 0;
  292. new pname[MAX_PLAYER_NAME];
  293. GetPlayerName(plid,pname,MAX_PLAYER_NAME);
  294. format(string, sizeof(string),"[Corregedoria]O Policial %s(ID: %d) desprocurou %s(ID: %d)", aname,playerid,pname,plid);
  295. Comandosp(Roxo,string,1);
  296. return 1;
  297. }
  298. else
  299. {
  300. SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador não conectado");
  301. return 1;
  302. }
  303. }
  304. }
  305.  
  306. if(strcmp(cmd, "/algemar", true) == 0) {
  307. new aname[MAX_PLAYER_NAME];
  308. GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  309. format(file, sizeof(file), PASTA_CONTAS, aname);
  310. if(dini_Int(file, "Profissao") == Policia_Militar || dini_Int(file, "Profissao") == Policia_Civil || dini_Int(file, "Profissao") == Policia_Federal || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "aAdmin") == 1){
  311. new tmp[256];
  312. new msg[256];
  313. new plid;
  314. tmp = strtok(cmdtext, idx);
  315. if(!strlen(tmp)){
  316. SendClientMessage(playerid, Vermelho, " /algemar [id] [motivo]");
  317. return 1;
  318. }
  319. plid = strval(tmp);
  320. if(plid == playerid){
  321. SendClientMessage(playerid, Vermelho, "(ERRO) Você não pode usar este comando em você mesmo.");
  322. return 1 ;
  323. }
  324. msg = strrest(cmdtext, idx);
  325. if(!strlen(msg)){
  326. SendClientMessage(playerid, COLOR_GREEN,"| ERRO | Use /algemar [id] [motivo]");
  327. return 1;
  328. }
  329. if(!IsPlayerConnected(plid)){
  330. SendClientMessage(playerid, Vermelho, "(ERRO) Jogador não conectado.");
  331. return 1;
  332. } else {
  333. if(GetDistanceBetweenPlayers(plid,playerid) < 10){
  334. format(string, sizeof(string),"| ALGEMADO | O Policial %s(ID: %d) te Algemou (Motivo: %s)", aname, playerid,msg);
  335. SetPlayerAttachedObject(plid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
  336. SendClientMessage(plid, 0x8C8CFFAA, string);
  337. TogglePlayerControllable(plid, 0);
  338. format(string, sizeof(string),"| ALGEMADO | Você algemou %s Motivo: %s", aname, playerid,msg);
  339. algemado[plid] = 1;
  340. algemou[playerid] = 1;
  341. levelprocurado[playerid]= 6;
  342. SetPlayerWantedLevel(playerid, 0);
  343. new pname[MAX_PLAYER_NAME];
  344. GetPlayerName(plid,pname,MAX_PLAYER_NAME);
  345. format(string, sizeof(string),"[Corregedoria]O Policial %s(ID: %d) Algemou %s(ID: %d) [Motivo: %s]", aname,playerid,pname,plid,msg);
  346. Comandosp(Roxo,string,1);
  347. return 1;
  348. } else {
  349. SendClientMessage(playerid,Vermelho," Chegue mais perto para algemar.");
  350. return 1;
  351. }
  352. }
  353. } else {
  354. SendClientMessage(playerid,Vermelho,"(ERRO) Você não é um policial!");
  355. return 1;
  356. }
  357. }
  358.  
  359.  
  360. if(strcmp(cmdtext, "/procurados", true) == 0){
  361. SendClientMessage(playerid, AdminCor,"~ > {0000CD}Brasil {1DF224}Segunda {E8E654}Vida {3225EB} Procurados {0000CD}Online {1DF224} < ~");
  362. new Jogador[24];
  363. new count = 0;
  364. new msg[120];
  365. for(new i=0; i<MAX_PLAYERS; i++){
  366. if(IsPlayerConnected(i) && Procurados[i]){
  367. GetPlayerName(i,Jogador,24);
  368. format(msg,sizeof(msg),"%d: %s : [Procurado Nivel %i]", i,Jogador,GetPlayerWantedLevel(i));
  369. SendClientMessage(playerid, 0xFFFFFFAA, msg);
  370. count++;
  371. }
  372. }
  373. if(count == 0){
  374. SendClientMessage(playerid, 0xFF0000AA, "Ninguém está procurado no momento.");
  375. }
  376. return 1;
  377. }
  378.  
  379.  
  380.  
  381. if(strcmp(cmdtext, "/presos", true) == 0){
  382. SendClientMessage(playerid,0x408080AA,"» Lista de Presos:");
  383. new Jogador[24];
  384. new count = 0;
  385. new msg[120];
  386. for(new i=0; i<MAX_PLAYERS; i++){
  387. if(IsPlayerConnected(i) && preso[i]){
  388. GetPlayerName(i,Jogador,24);
  389. format(msg,sizeof(msg),"%d: %s", i,Jogador);
  390. SendClientMessage(playerid, Branco, msg);
  391. count++;
  392. }
  393. }
  394. if(count == 0){
  395. SendClientMessage(playerid, 0xFF0000AA, "Ninguém está preso no momento.");
  396. }
  397. return 1;
  398. }
  399.  
  400.  
  401. if(dini_Int(file, "HTerrestre") == 0){
  402. if(modelo == 509 || modelo == 510 || modelo == 481){
  403. SendClientMessage(playerid, Vermelho, "{69C7FA} Você está dirigindo uma bicicleta e não precisa de habilitação.");
  404. } else {
  405. SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
  406. Procurados[playerid]= 1;
  407. levelprocurado[playerid]= 1;
  408. SendClientMessage(playerid, Vermelho, "{69C7FA}[!] Você Não tem Habilitação terrestre va ate a prefeitura e compre uma!");
  409. }
  410. }
  411. }
  412. }
  413.  
  414. if(dini_Int(file2, "DM") == 1){
  415. new string[256];
  416. format(string, sizeof(string), "{15AD70}[!] %s matou o jogador %s e está sendo procurado pela Policia!",kname, aname);
  417. SendClientMessageToAll(msgdm3, string);
  418. dini_IntSet(file2, "Procurado", 1);
  419. dini_IntSet(file2, "levelprocurado", 6);
  420. Procurados[killerid] = 1;
  421. SetPlayerWantedLevel(killerid, 6);
  422. }
  423. }
  424. return 1;
  425. }
Advertisement
Add Comment
Please, Sign In to add comment