Advertisement
Guest User

Sistema de classes

a guest
Nov 26th, 2022
1,223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 23.51 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4. #include <zcmd>
  5. #include <sscanf2>
  6. #include <a_zones>
  7. //----==== variaveis ----====//
  8. new Text3D:Policial[MAX_PLAYERS];
  9. new Text3D:Civil[MAX_PLAYERS];
  10. new Text3D:Ladrao[MAX_PLAYERS];
  11.  
  12. new PickupLadrao;
  13. new PickupPm;
  14.  
  15.  
  16. new Profissao[MAX_PLAYERS];
  17.  
  18.  
  19. enum PlayerInfo
  20. {
  21.     AssaltouaCaixa
  22. }
  23. enum psInfo
  24. {
  25.     dinamite
  26. }
  27. new PlayersInfo[MAX_PLAYERS][psInfo];
  28. new pInfo[MAX_PLAYERS][PlayerInfo];
  29. new Float:AssaltoX[MAX_PLAYERS];
  30. new Float:AssaltoY[MAX_PLAYERS];
  31. new Float:AssaltoZ[MAX_PLAYERS];
  32.  
  33.  
  34. new String[128];
  35. new caixa;
  36. new caixa2;
  37. new caixa3;
  38. new caixa4;
  39. new caixa5;
  40. new caixa6;
  41. new caixa7;
  42. new caixa8;
  43. new caixa9;
  44. new caixa10;
  45. //----==== definições ----====//
  46. #define CIVIL 0
  47. #define POLICIAL 1
  48. #define LADRAO 2
  49. #define tempoparaexplodir                                                       10000
  50. #define tempoparaumnovocaixa                                                    60000
  51. #define estrelas                                                                2
  52. #define dinhero                                                                 1000
  53. //----==== color ----====//
  54. #define CORCIVILTAG     0xfcf172
  55. #define CORPOLICIALTAG      0x72e5fc
  56. #define CORLADRAOTAG        0xff6970
  57.  
  58.  
  59.  
  60. #if defined FILTERSCRIPT
  61.  
  62. public OnFilterScriptInit()
  63. {
  64.     PickupPm = CreatePickup(1242, 0, 254.4980,76.5144,1003.6406, -1);
  65.     Create3DTextLabel("Digite\n/equipm", -1 , 254.4980,76.5144,1003.6406, 10.0, 0, 0);
  66.     PickupLadrao = CreatePickup(1654, 0, 1209.1448,-1999.3517,81.3859, -1);
  67.     Create3DTextLabel("Digite\n/equiladrao", -1 , 1209.1448,-1999.3517,81.3859, 10.0, 0, 0);
  68.     //==========================================================================================
  69.         //Coloque em                 X,             Y,       Z
  70.     caixa = CreateObject(2942,  1142.03601, -1762.05994, 13.23080,   0.00000, 0.00000, 174.66000);
  71.     caixa2 = CreateObject(2942, 1367.46753, -1283.17358, 13.16540,   0.00000, 0.00000, -90.42000);
  72.     caixa3 = CreateObject(2942, 1148.57678, -1772.64233, 16.20010,   0.00000, 0.00000, -176.34000);
  73.     caixa4 = CreateObject(2942, 1070.86182, -1866.00525, 13.14770,   0.00000, 0.00000, -89.58000);
  74.     caixa5 = CreateObject(2942, 1493.56433, -1022.13391, 23.39950,   0.00000, 0.00000, 0.00000);
  75.     caixa6 = CreateObject(2942, 1336.97156, -1751.75830, 13.12390,   0.00000, 0.00000, 91.86000);
  76.     caixa7 = CreateObject(2942, 1828.19751, -1405.80310, 13.02530,   0.00000, 0.00000, -180.24001);
  77.     caixa8 = CreateObject(2942, 2235.82324, -1150.29150, 25.48200,   0.00000, 0.00000, -181.25999);
  78.     caixa9 = CreateObject(2942, 1186.23511, -1377.27698, 13.18340,   0.00000, 0.00000, 88.92000);
  79.     caixa10 = CreateObject(2942,429.11661,  -1445.17566,  30.29910,   0.00000, 0.00000, -53.34000);
  80.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1142.03601, -1762.05994, 13.23080, 5, 0);
  81.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1367.46753, -1283.17358, 13.16540, 5, 0);
  82.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1148.57678, -1772.64233, 16.20010, 5, 0);
  83.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1070.86182, -1866.00525, 13.14770, 5, 0);
  84.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1493.56433, -1022.13391, 23.39950, 5, 0);
  85.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1336.97156, -1751.75830, 13.12390, 5, 0);
  86.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1828.19751, -1405.80310, 13.02530, 5, 0);
  87.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 2235.82324, -1150.29150, 25.48200, 5, 0);
  88.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 1186.23511, -1377.27698, 13.18340, 5, 0);
  89.     Create3DTextLabel("{008B00}Caixa Eletronico\n{FFFFFF}/roubarcaixa{FFFFFF}' para utilizar", -1, 429.11661, -1445.17566, 30.29910, 5, 0);
  90.  
  91.     return 1;
  92. }
  93.  
  94. public OnFilterScriptExit()
  95. {
  96.     return 1;
  97. }
  98.  
  99. #else
  100.  
  101. main()
  102. {
  103.     print("\n----------------------------------");
  104.     print(" Blank Gamemode by your name here");
  105.     print("----------------------------------\n");
  106. }
  107.  
  108. #endif
  109.  
  110. public OnGameModeInit()
  111. {
  112.     // Don't use these lines if it's a filterscript
  113.     SetGameModeText("Blank Script");
  114.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  115.     return 1;
  116. }
  117.  
  118. public OnGameModeExit()
  119. {
  120.     return 1;
  121. }
  122.  
  123. public OnPlayerRequestClass(playerid, classid)
  124. {
  125.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  126.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  127.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  128.     return 1;
  129. }
  130.  
  131. public OnPlayerConnect(playerid)
  132. {
  133.     return 1;
  134. }
  135.  
  136. public OnPlayerDisconnect(playerid, reason)
  137. {
  138.     return 1;
  139. }
  140.  
  141. public OnPlayerSpawn(playerid)
  142. {
  143.     return 1;
  144. }
  145.  
  146. public OnPlayerDeath(playerid, killerid, reason)
  147. {
  148.     return 1;
  149. }
  150.  
  151. public OnVehicleSpawn(vehicleid)
  152. {
  153.     return 1;
  154. }
  155.  
  156. public OnVehicleDeath(vehicleid, killerid)
  157. {
  158.     return 1;
  159. }
  160.  
  161. public OnPlayerText(playerid, text[])
  162. {
  163.     return 1;
  164. }
  165.  
  166. public OnPlayerCommandText(playerid, cmdtext[])
  167. {
  168.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  169.     {
  170.         // Do something here
  171.         return 1;
  172.     }
  173.     return 0;
  174. }
  175.  
  176. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  177. {
  178.     return 1;
  179. }
  180.  
  181. public OnPlayerExitVehicle(playerid, vehicleid)
  182. {
  183.     return 1;
  184. }
  185.  
  186. public OnPlayerStateChange(playerid, newstate, oldstate)
  187. {
  188.     return 1;
  189. }
  190.  
  191. public OnPlayerEnterCheckpoint(playerid)
  192. {
  193.     return 1;
  194. }
  195.  
  196. public OnPlayerLeaveCheckpoint(playerid)
  197. {
  198.     return 1;
  199. }
  200.  
  201. public OnPlayerEnterRaceCheckpoint(playerid)
  202. {
  203.     return 1;
  204. }
  205.  
  206. public OnPlayerLeaveRaceCheckpoint(playerid)
  207. {
  208.     return 1;
  209. }
  210.  
  211. public OnRconCommand(cmd[])
  212. {
  213.     return 1;
  214. }
  215.  
  216. public OnPlayerRequestSpawn(playerid)
  217. {
  218.     return 1;
  219. }
  220.  
  221. public OnObjectMoved(objectid)
  222. {
  223.     return 1;
  224. }
  225.  
  226. public OnPlayerObjectMoved(playerid, objectid)
  227. {
  228.     return 1;
  229. }
  230.  
  231. public OnPlayerPickUpPickup(playerid, pickupid)
  232. {
  233.     return 1;
  234. }
  235.  
  236. public OnVehicleMod(playerid, vehicleid, componentid)
  237. {
  238.     return 1;
  239. }
  240.  
  241. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  242. {
  243.     return 1;
  244. }
  245.  
  246. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  247. {
  248.     return 1;
  249. }
  250.  
  251. public OnPlayerSelectedMenuRow(playerid, row)
  252. {
  253.     return 1;
  254. }
  255.  
  256. public OnPlayerExitedMenu(playerid)
  257. {
  258.     return 1;
  259. }
  260.  
  261. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  262. {
  263.     return 1;
  264. }
  265.  
  266. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  267. {
  268.     return 1;
  269. }
  270.  
  271. public OnRconLoginAttempt(ip[], password[], success)
  272. {
  273.     return 1;
  274. }
  275.  
  276. public OnPlayerUpdate(playerid)
  277. {
  278.     return 1;
  279. }
  280.  
  281. public OnPlayerStreamIn(playerid, forplayerid)
  282. {
  283.     return 1;
  284. }
  285.  
  286. public OnPlayerStreamOut(playerid, forplayerid)
  287. {
  288.     return 1;
  289. }
  290.  
  291. public OnVehicleStreamIn(vehicleid, forplayerid)
  292. {
  293.     return 1;
  294. }
  295.  
  296. public OnVehicleStreamOut(vehicleid, forplayerid)
  297. {
  298.     return 1;
  299. }
  300.  
  301. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  302. {
  303.     return 1;
  304. }
  305.  
  306. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  307. {
  308.     return 1;
  309. }
  310. //============================/virarpm /virarladrao /deixarorg==========================================
  311. CMD:virarpm(playerid, params[])
  312. {
  313.     if(Profissao[playerid] == LADRAO) return SendClientMessage(playerid,-1,"[ {302c2c}<{ffffff}!{302c2c}>{ffffff} ]: Voce ja e de org!");
  314.     SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Parabens, voce virou Policial");
  315.     SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Para sair de sua profissao use /deixarorg");
  316.     SetPlayerPos(playerid,1579.7618,-1634.1735,13.5624);
  317.     Profissao[playerid] = POLICIAL; SetPlayerSkin(playerid, 280); Policial[playerid] = Create3DTextLabel("[POLICIAL]", CORPOLICIALTAG, 30.0, 40.0, 50.0, 40.0, -1); Attach3DTextLabelToPlayer(Ladrao[playerid], playerid, 0.0, 0.0, 0.4); Attach3DTextLabelToPlayer(Civil[playerid], playerid, 0.0, 0.0, 0.4);
  318.     return 1;
  319. }
  320. CMD:virarladrao(playerid, params[])
  321. {
  322.     if(Profissao[playerid] == POLICIAL) return SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Voce ja e de org!");
  323.     SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Parabens, voce virou Ladrao");
  324.     SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Para sair de sua profissao use /deixarorg");
  325.     SetPlayerPos(playerid,1209.1448,-1999.3517,81.3859);
  326.     Profissao[playerid] = LADRAO; SetPlayerSkin(playerid, 271); Ladrao[playerid] = Create3DTextLabel("[LADRAO]", CORLADRAOTAG, 30.0, 40.0, 50.0, 40.0, -1); Attach3DTextLabelToPlayer(Policial[playerid], playerid, 0.0, 0.0, 0.4); Attach3DTextLabelToPlayer(Civil[playerid], playerid, 0.0, 0.0, 0.4);
  327.     return 1;
  328. }
  329.  
  330. CMD:deixarorg(playerid, params[])
  331. {
  332.     if(Profissao[playerid] == 0) return SendClientMessage(playerid,-1,"");
  333.     SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Voce saiu de sua org!");
  334.     SetPlayerPos(playerid,1479.2386,-1698.7811,14.0469);
  335.     ResetPlayerWeapons(playerid);
  336.     Profissao[playerid] = CIVIL; Profissao[playerid] = 0; SetPlayerSkin(playerid, 0); DisablePlayerCheckpoint(playerid); Civil[playerid] = Create3DTextLabel("[CIVIL]", CORCIVILTAG, 30.0, 40.0, 50.0, 40.0, -1); Attach3DTextLabelToPlayer(Ladrao[playerid], playerid, 0.0, 0.0, 0.4); Attach3DTextLabelToPlayer(Policial[playerid], playerid, 0.0, 0.0, 0.4);
  337.     return 1;
  338. }
  339.  
  340. CMD:equipm(playerid, params[])
  341. {
  342.     if (Profissao[playerid] != POLICIAL) {
  343.     return SendClientMessage(playerid, -1, "Não é um policial.");
  344.     }
  345.     if(!IsPlayerInRangeOfPoint(playerid, 2.0, 254.4980,76.5144,1003.6406)) return SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Voce nao esta no local correto!");
  346.     GivePlayerWeapon(playerid, 31, 1000);
  347.     GivePlayerWeapon(playerid, 0, 1);
  348.     GivePlayerWeapon(playerid, 24, 1000);
  349.     GivePlayerWeapon(playerid, 3, 1);
  350.     return 1;
  351. }
  352. CMD:equiladrao(playerid, params[])
  353. {
  354.     if (Profissao[playerid] != LADRAO) {
  355.     return SendClientMessage(playerid, -1, "Não é um ladrao.");
  356.     }
  357.     if(!IsPlayerInRangeOfPoint(playerid, 2.0, 1209.1448,-1999.3517,81.3859)) return SendClientMessage(playerid,-1,"{302c2c}<{ffffff}!{302c2c}>{ffffff}: Voce nao esta no local correto!");
  358.     GivePlayerWeapon(playerid, 30, 1000);
  359.     GivePlayerWeapon(playerid, 24, 1000);
  360.     return 1;
  361. }
  362. //=============================================================================//
  363. CMD:algemar(playerid, params[])
  364. {
  365. new ID, Motivo;
  366. new Float:x, Float:y, Float:z;
  367. GetPlayerPos(ID, x,y,z);
  368. if(IsPlayerInRangeOfPoint(playerid, 2.0, x,y,z))
  369. {
  370. if(Profissao[playerid] == POLICIAL)
  371. {
  372. if(sscanf(params,"ds", ID, Motivo)) return SendClientMessage(playerid, 0xFF0000AA, "Modo de Uso: /algemar [ID] [Motivo]");
  373. SetPlayerAttachedObject(ID, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
  374. SetPlayerSpecialAction(ID, 24);
  375. TogglePlayerControllable(ID, 0);
  376. }
  377. }
  378. GameTextForPlayer(ID, "~r~ ALGEMADO!", 5000, 5);
  379. return 1;
  380. }
  381.  
  382.  
  383. CMD:desalgemar(playerid, params[])
  384. {
  385. if(Profissao[playerid] == POLICIAL)
  386. {
  387. new Float:x, Float:y, Float:z;
  388. new id;
  389. GetPlayerPos(id, x,y,z);
  390. if(IsPlayerInRangeOfPoint(playerid, 2.0, x,y,z))
  391. {
  392. new ID, Motivo[23];
  393. if(sscanf(params,"ds", ID, Motivo)) return SendClientMessage(playerid, 0xFF0000AA, "Modo de Uso: /desalgemar [ID] [Motivo]");
  394. ClearAnimations(ID);
  395. RemovePlayerAttachedObject(ID,4);
  396. SetPlayerSpecialAction(ID, SPECIAL_ACTION_NONE);
  397. TogglePlayerControllable(ID, 1);
  398. GameTextForPlayer(ID, "~g~ DESALGEMADO!", 5000, 5);
  399. }
  400. }
  401. return 1;
  402. }
  403.  
  404. CMD:prender(playerid, params[])
  405. {
  406. new ID, Motivo[23];
  407. new Float:x, Float:y, Float:z;
  408. GetPlayerPos(ID, x,y,z);
  409. if(IsPlayerInRangeOfPoint(playerid, 2.0, x,y,z))
  410. {
  411. new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
  412. GetPlayerName(playerid, pname, sizeof(pname));
  413. format(string, sizeof(string), "O Policial %s Fez Uma Prisão.", pname);
  414. SendClientMessageToAll(CORPOLICIALTAG, string);
  415.  
  416.  
  417. if(Profissao[playerid] == POLICIAL)
  418. {
  419.  
  420. SetPlayerInterior(ID, 6);
  421. SetPlayerPos(ID, 265.0008,77.6659,1001.0391);
  422. GameTextForPlayer(ID, "~g~ PRESO!", 5000, 5);
  423. TogglePlayerControllable(ID, 1);
  424. SetPlayerHealth(ID, 54546546556484);
  425. }
  426. }
  427.  
  428. {
  429. if(sscanf(params,"ds", ID, Motivo)) return SendClientMessage(playerid, 0xFF0000AA, "Modo de Uso: /prender [ID] [Motivo]");
  430. }
  431. return 1;
  432. }
  433. //==============================================================================
  434. CMD:roubarcaixa(playerid)
  435. {
  436.     {
  437.         {
  438.             if (Profissao[playerid] != LADRAO) {
  439.             return SendClientMessage(playerid, -1, "Não é um ladrão.");
  440.             }
  441.             if(PlayersInfo[playerid][dinamite] != 1) return SendClientMessage(playerid, -1, "[ERRO]voce nao tem dinamite!");
  442.             if(pInfo[playerid][AssaltouaCaixa] == 0)
  443.             {
  444.                 if(IsPlayerInRangeOfPoint(playerid, 1.5,  1142.03601, -1762.05994, 13.23080) || IsPlayerInRangeOfPoint(playerid, 1.5, 1367.46753, -1283.17358, 13.16540) || IsPlayerInRangeOfPoint(playerid, 1.5, 1148.57678, -1772.64233, 16.20010) || IsPlayerInRangeOfPoint(playerid, 1.5, 1070.86182, -1866.00525, 13.14770) || IsPlayerInRangeOfPoint(playerid, 1.5, 1493.56433, -1022.13391, 23.39950) || IsPlayerInRangeOfPoint(playerid, 1.5, 1336.97156, -1751.75830, 13.12390)
  445.                 || IsPlayerInRangeOfPoint(playerid, 1.5, 1828.19751, -1405.80310, 13.02530) || IsPlayerInRangeOfPoint(playerid, 1.5, 2235.82324, -1150.29150, 25.48200)  || IsPlayerInRangeOfPoint(playerid, 1.5, 1186.23511, -1377.27698, 13.18340) || IsPlayerInRangeOfPoint(playerid, 1.5, 429.11661, -1445.17566, 30.29910))
  446.                 {
  447.                     pInfo[playerid][AssaltouaCaixa] = 1;
  448.                     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | O Caixa eletronico ira explodir, afaste-se!");
  449.                     ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0);
  450.                     SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + estrelas);
  451.                     SetTimerEx("ExplodirCaixa", tempoparaexplodir, false, "i", playerid);
  452.                     GetPlayerPos(playerid, AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid]);
  453.                     new zone[MAX_ZONE_NAME];
  454.                     GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
  455.                     for(new i; i < MAX_PLAYERS; i++)
  456.                     {
  457.                     }
  458.                 }
  459.             }
  460.             else
  461.             {
  462.                 return SendClientMessage(playerid, 0xFF4500FF, "| ERRO | Voce ja assaltou um caixa eletronico recentemente");
  463.             }
  464.         }
  465.         return 1;
  466.     }
  467. }
  468. //FIM DA GM
  469. forward ExplodirCaixa(playerid);
  470. public ExplodirCaixa(playerid)
  471. {
  472.     if(IsPlayerInRangeOfPoint(playerid, 50.5,  1142.03601, -1762.05994, 13.23080))
  473.     {
  474.     GivePlayerMoney(playerid, dinhero);
  475.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  476.     GameTextForPlayer(playerid, String, 9000, 5);
  477.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  478.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  479.     PlayersInfo[playerid][dinamite] = 0;
  480.     DestroyObject(caixa);
  481.     caixa = CreateObject(2943,1142.03601, -1762.05994, 13.23080,   0.00000, 0.00000, 174.66000);
  482.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  483.     }
  484.     if(IsPlayerInRangeOfPoint(playerid, 50.5, 1367.46753, -1283.17358, 13.16540))
  485.     {
  486.     GivePlayerMoney(playerid, dinhero);
  487.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  488.     GameTextForPlayer(playerid, String, 9000, 5);
  489.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  490.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  491.     PlayersInfo[playerid][dinamite] = 0;
  492.     DestroyObject(caixa2);
  493.     caixa2 = CreateObject(2943,1367.46753, -1283.17358, 13.16540,   0.00000, 0.00000, -90.42000);
  494.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  495.     }
  496.     if(IsPlayerInRangeOfPoint(playerid, 50.5,  1148.57678, -1772.64233, 16.20010))
  497.     {
  498.     GivePlayerMoney(playerid, dinhero);
  499.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  500.     GameTextForPlayer(playerid, String, 9000, 5);
  501.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  502.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  503.     PlayersInfo[playerid][dinamite] = 0;
  504.     DestroyObject(caixa3);
  505.     caixa3 = CreateObject(2943,1148.57678, -1772.64233, 16.20010,   0.00000, 0.00000, -176.34000);
  506.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  507.     }
  508.     if(IsPlayerInRangeOfPoint(playerid, 50.5, 1070.86182, -1866.00525, 13.14770))
  509.     {
  510.     GivePlayerMoney(playerid, dinhero);
  511.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  512.     GameTextForPlayer(playerid, String, 9000, 5);
  513.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  514.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  515.     PlayersInfo[playerid][dinamite] = 0;
  516.     DestroyObject(caixa4);
  517.     caixa4 = CreateObject(2943, 1070.86182, -1866.00525, 13.14770,   0.00000, 0.00000, -89.58000);
  518.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  519.     }
  520.     if(IsPlayerInRangeOfPoint(playerid, 50.5,  1493.56433, -1022.13391, 23.39950))
  521.     {
  522.     GivePlayerMoney(playerid, dinhero);
  523.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  524.     GameTextForPlayer(playerid, String, 9000, 5);
  525.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  526.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  527.     PlayersInfo[playerid][dinamite] = 0;
  528.     DestroyObject(caixa5);
  529.     caixa5 = CreateObject(2943,1493.56433, -1022.13391, 23.39950,   0.00000, 0.00000, 0.00000);
  530.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  531.     }
  532.     if(IsPlayerInRangeOfPoint(playerid, 50.5,  1336.97156, -1751.75830, 13.12390))
  533.     {
  534.     GivePlayerMoney(playerid, dinhero);
  535.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  536.     GameTextForPlayer(playerid, String, 9000, 5);
  537.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  538.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  539.     PlayersInfo[playerid][dinamite] = 0;
  540.     DestroyObject(caixa6);
  541.     caixa6 = CreateObject(2943,1336.97156, -1751.75830, 13.12390,   0.00000, 0.00000, 91.86000);
  542.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  543.     }
  544.     if(IsPlayerInRangeOfPoint(playerid, 50.5,  1828.19751, -1405.80310, 13.02530))
  545.     {
  546.     GivePlayerMoney(playerid, dinhero);
  547.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  548.     GameTextForPlayer(playerid, String, 9000, 5);
  549.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  550.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  551.     PlayersInfo[playerid][dinamite] = 0;
  552.     DestroyObject(caixa7);
  553.     caixa7 = CreateObject(2943,1828.19751, -1405.80310, 13.02530,   0.00000, 0.00000, -180.24001);
  554.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  555.     }
  556.     if(IsPlayerInRangeOfPoint(playerid, 50.5,  2235.82324, -1150.29150, 25.48200))
  557.     {
  558.     GivePlayerMoney(playerid, dinhero);
  559.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  560.     GameTextForPlayer(playerid, String, 9000, 5);
  561.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  562.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  563.     PlayersInfo[playerid][dinamite] = 0;
  564.     DestroyObject(caixa8);
  565.     caixa8 = CreateObject(2943,2235.82324, -1150.29150, 25.48200,   0.00000, 0.00000, -181.25999);
  566.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  567.     }
  568.     if(IsPlayerInRangeOfPoint(playerid, 50.5,   1186.23511, -1377.27698, 13.18340))
  569.     {
  570.     GivePlayerMoney(playerid, dinhero);
  571.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  572.     GameTextForPlayer(playerid, String, 9000, 5);
  573.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  574.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  575.     PlayersInfo[playerid][dinamite] = 0;
  576.     DestroyObject(caixa9);
  577.     caixa9 = CreateObject(2943,1186.23511, -1377.27698, 13.18340,   0.00000, 0.00000, 88.92000);
  578.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  579.     }
  580.     if(IsPlayerInRangeOfPoint(playerid, 50.5,  429.11661, -1445.17566, 30.29910))
  581.     {
  582.     GivePlayerMoney(playerid, dinhero);
  583.     format(String, sizeof(String), "~r~ASSALTO EFETUADO~n~~g~$%d", dinhero);
  584.     GameTextForPlayer(playerid, String, 9000, 5);
  585.     CreateExplosion(AssaltoX[playerid], AssaltoY[playerid], AssaltoZ[playerid], 2, 10.0);
  586.     SendClientMessage(playerid, 0xFF4040AA, "| ASSALTO | Voce explodiu o caixa eletronico e levou todo o dinheiro");
  587.     PlayersInfo[playerid][dinamite] = 0;
  588.     DestroyObject(caixa10);
  589.     caixa10 = CreateObject(2943,429.11661, -1445.17566, 30.29910,   0.00000, 0.00000, -53.34000);
  590.     SetTimerEx("novocaixa", tempoparaumnovocaixa, false, "i", playerid);
  591.     }
  592.     return 1;
  593. }
  594. forward novocaixa(playerid);
  595. public novocaixa(playerid)
  596. {
  597.     DestroyObject(caixa);
  598.     DestroyObject(caixa2);
  599.     DestroyObject(caixa3);
  600.     DestroyObject(caixa4);
  601.     DestroyObject(caixa5);
  602.     DestroyObject(caixa6);
  603.     DestroyObject(caixa7);
  604.     DestroyObject(caixa8);
  605.     DestroyObject(caixa9);
  606.     DestroyObject(caixa10);
  607.     caixa = CreateObject(2942,1142.03601, -1762.05994, 13.23080,   0.00000, 0.00000, 174.66000);
  608.     caixa2 = CreateObject(2942, 1367.46753, -1283.17358, 13.16540,   0.00000, 0.00000, -90.42000);
  609.     caixa3 = CreateObject(2942, 1148.57678, -1772.64233, 16.20010,   0.00000, 0.00000, -176.34000);
  610.     caixa4 = CreateObject(2942, 1070.86182, -1866.00525, 13.14770,   0.00000, 0.00000, -89.58000);
  611.     caixa5 = CreateObject(2942, 1493.56433, -1022.13391, 23.39950,   0.00000, 0.00000, 0.00000);
  612.     caixa6 = CreateObject(2942, 1336.97156, -1751.75830, 13.12390,   0.00000, 0.00000, 91.86000);
  613.     caixa7 = CreateObject(2942, 1828.19751, -1405.80310, 13.02530,   0.00000, 0.00000, -180.24001);
  614.     caixa8 = CreateObject(2942, 2235.82324, -1150.29150, 25.48200,   0.00000, 0.00000, -181.25999);
  615.     caixa9 = CreateObject(2942, 1186.23511, -1377.27698, 13.18340,   0.00000, 0.00000, 88.92000);
  616.     caixa10 = CreateObject(2942, 429.11661, -1445.17566, 30.29910,   0.00000, 0.00000, -53.34000);
  617.     SendClientMessageToAll(-1, "Os Caixa De Los Santos Pode Ser Assataldo De Novo");
  618.     for(new i = 0; i < MAX_PLAYERS; i++)
  619.     {
  620.     if(IsPlayerConnected(i))
  621.     {
  622.         pInfo[i][AssaltouaCaixa] = 0;
  623.     }
  624.     }
  625.     return 1;
  626. }
  627. stock PlayerName(playerid)
  628. {
  629.     new
  630.     gName[MAX_PLAYER_NAME + 1];
  631.     GetPlayerName(playerid, gName, sizeof(gName));
  632.     return gName;
  633. }
  634. CMD:dinamites(playerid)
  635. {
  636.     if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1 , "[ERRO]: Você não Tem Dinheiro Suficiente!");
  637.     if (Profissao[playerid] != LADRAO) {
  638.     return SendClientMessage(playerid, -1, "Não é um ladrão.");
  639.     }
  640.     GivePlayerMoney(playerid, -700);
  641.     PlayersInfo[playerid][dinamite] = 1;
  642.     SendClientMessage(playerid, -1, "voce comprou uma dinamite por $1000 Dolares");
  643.     return 1;
  644. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement