Advertisement
Guest User

[FS] Produção de Drogas - Flenex

a guest
Nov 30th, 2021
2,336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 20.64 KB | None | 0 0
  1. /*
  2.     ******************** [DESENVOLVIDO POR FLENEX] ********************
  3.  
  4.     * Comandos:
  5.     /Produzir - Inicia a produção de drogas
  6.     /IrProducao - Ir até a produção de drogas (RCON)
  7.  
  8.     * Funcionamento:
  9.    
  10.     Digite "/Produzir" dentro da área de produção de drogas (Marcada em vermelho no mapa - SF) para iniciar a produção.
  11.     Após seguir os checkpoints, receberá um valor aleatório determinado no código.
  12.  
  13.     Para alterar o Index dos objetos da mão, mude "INDEX_EQP_MAO" para o index desejado.
  14.  
  15.     Caso queira alterar o tempo de produção ou valor, basta alterar os números no código abaixo.
  16.  
  17.     Includes:
  18.     - a_samp
  19.     - zcmd
  20.     - streamer
  21.     - progress2
  22. */
  23.  
  24. #define FILTERSCRIPT
  25.  
  26. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  27.  
  28. #include <a_samp>
  29. #include <zcmd>
  30. #include <streamer>
  31. #include <progress2>
  32.  
  33. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  34.  
  35. #define SCM SendClientMessage
  36. #define RandomEx(%0,%1) (random(%1 - %0 + 1) + %0)
  37. #define function:%0(%1) forward %0(%1); public %0(%1)
  38.  
  39. #define INDEX_EQP_MAO   8   // Index do objeto que fica na mão durante a produção
  40.  
  41. #define Vermelho    0xff0000FF
  42. #define Verde2      0x19B519FF
  43. #define Branco      0xf0f0f0FF
  44.  
  45. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  46.  
  47. new Float:DrogaPos_Pegar[][4] = {
  48.     {-2149.6198, -229.8138, 36.5156, 359.3734},
  49.     {-2145.9108, -229.6141, 36.5156, 0.0000},
  50.     {-2142.2006, -229.6809, 36.5156, 350.5998}
  51. };
  52.  
  53. new Float:DrogaPos_Preparar[][4] = {
  54.     {-2162.2033, -263.9905, 36.5156, 174.5048},
  55.     {-2158.8444, -264.2194, 36.5156, 188.2915},
  56.     {-2155.3242, -264.1795, 36.5156, 180.1426}
  57. };
  58.  
  59. new Float:DrogaPos_Embalar[][4] = {
  60.     {-2157.2219, -249.3455, 36.5156, 359.0365},
  61.     {-2160.5842, -249.1863, 36.5156, 86.1439},
  62.     {-2164.0966, -249.0259, 36.5156, 91.1573},
  63.     {-2167.4873, -249.0945, 36.5156, 91.1573},
  64.     {-2170.9382, -249.1643, 36.5156, 91.1573},
  65.     {-2174.6591, -249.2396, 36.5156, 91.1573},
  66.     {-2174.8120, -246.9467, 36.5156, 265.6622},
  67.     {-2171.1721, -246.8367, 36.5156, 269.4223},
  68.     {-2167.9553, -246.8692, 36.5156, 269.4223},
  69.     {-2164.1152, -246.9080, 36.5156, 269.4223},
  70.     {-2160.9370, -246.9399, 36.5156, 269.4223},
  71.     {-2157.1672, -246.9780, 36.5156, 269.4223}
  72. };
  73.  
  74. new Float:DrogaPos_Guardar[][4] = {
  75.     {-2161.8002, -235.1439, 36.5156, 183.2783},
  76.     {-2159.1525, -236.9893, 36.5156, 183.2783},
  77.     {-2166.1765, -235.6374, 36.5156, 175.7582},
  78.     {-2172.8156, -235.8840, 36.5156, 168.6240},
  79.     {-2176.6621, -235.0385, 36.5219, 168.2381},
  80.     {-2179.3649, -237.3294, 36.5219, 121.2377}
  81. };
  82.  
  83. enum produzirinfos {
  84.     CpPegar,
  85.     CpPreparar,
  86.     CpEmbalar,
  87.     CpGuardar,
  88.  
  89.     Timer,
  90.     bool:Trabalhando,
  91.     AvisoTimer_2,
  92.     TimerProduzindo
  93. }
  94. new ProduzirInfo[MAX_PLAYERS][produzirinfos];
  95. new TerritorioDrogas;
  96. new GZDrogas;
  97. new PlayerText:AvisoTd2[MAX_PLAYERS];
  98. new PlayerText:ProgressoTD[MAX_PLAYERS];
  99. new PlayerBar:ProgressoBar[MAX_PLAYERS];
  100.  
  101. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  102.  
  103. public OnFilterScriptInit()
  104. {
  105.     printf("\n-------------------------------------------------------------");
  106.     printf(" [FS] Produção de Drogas por Flenex - Iniciado com sucesso");
  107.     printf("-------------------------------------------------------------\n");
  108.  
  109.     TerritorioDrogas = CreateDynamicRectangle(-2200.0, -280.5, -2098.0, -178.5, 0, 0, -1, 1);
  110.     GZDrogas = GangZoneCreate(-2200.0, -280.5, -2098.0, -178.5);
  111.  
  112.     GenFabDrogas();
  113.  
  114.     return 1;
  115. }
  116.  
  117. public OnFilterScriptExit()
  118. {
  119.     return 1;
  120. }
  121.  
  122. public OnPlayerConnect(playerid) {
  123.     AvisoTd2[playerid] = CreatePlayerTextDraw(playerid, 315.000000, 333.000000, "-");
  124.     PlayerTextDrawFont(playerid, AvisoTd2[playerid], 1);
  125.     PlayerTextDrawLetterSize(playerid, AvisoTd2[playerid], 0.275000, 1.149999);
  126.     PlayerTextDrawTextSize(playerid, AvisoTd2[playerid], 800.000000, 400.000000);
  127.     PlayerTextDrawSetOutline(playerid, AvisoTd2[playerid], 1);
  128.     PlayerTextDrawSetShadow(playerid, AvisoTd2[playerid], 0);
  129.     PlayerTextDrawAlignment(playerid, AvisoTd2[playerid], 2);
  130.     PlayerTextDrawColor(playerid, AvisoTd2[playerid], -1);
  131.     PlayerTextDrawBackgroundColor(playerid, AvisoTd2[playerid], 255);
  132.     PlayerTextDrawBoxColor(playerid, AvisoTd2[playerid], 50);
  133.     PlayerTextDrawUseBox(playerid, AvisoTd2[playerid], 0);
  134.     PlayerTextDrawSetProportional(playerid, AvisoTd2[playerid], 1);
  135.     PlayerTextDrawSetSelectable(playerid, AvisoTd2[playerid], 0);
  136.  
  137.     ProgressoTD[playerid] = CreatePlayerTextDraw(playerid, 320.000000, 393.000000, "-");
  138.     PlayerTextDrawFont(playerid, ProgressoTD[playerid], 1);
  139.     PlayerTextDrawLetterSize(playerid, ProgressoTD[playerid], 0.200000, 1.000000);
  140.     PlayerTextDrawTextSize(playerid, ProgressoTD[playerid], 895.000000, 317.000000);
  141.     PlayerTextDrawSetOutline(playerid, ProgressoTD[playerid], 1);
  142.     PlayerTextDrawSetShadow(playerid, ProgressoTD[playerid], 0);
  143.     PlayerTextDrawAlignment(playerid, ProgressoTD[playerid], 2);
  144.     PlayerTextDrawColor(playerid, ProgressoTD[playerid], -1);
  145.     PlayerTextDrawBackgroundColor(playerid, ProgressoTD[playerid], 255);
  146.     PlayerTextDrawBoxColor(playerid, ProgressoTD[playerid], 50);
  147.     PlayerTextDrawUseBox(playerid, ProgressoTD[playerid], 0);
  148.     PlayerTextDrawSetProportional(playerid, ProgressoTD[playerid], 1);
  149.     PlayerTextDrawSetSelectable(playerid, ProgressoTD[playerid], 0);
  150.  
  151.     ProgressoBar[playerid] = CreatePlayerProgressBar(playerid, 256.000000, 406.000000, 131.500000, 9.500000, -764862721, 100.000000, 0);
  152.  
  153.     GenFabDrogas_Remove(playerid);
  154.  
  155.     GangZoneShowForPlayer(playerid, GZDrogas, 0xff0000CC);
  156.  
  157.     return 1;
  158. }
  159.  
  160. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  161.  
  162. CMD:produzir(playerid) {
  163.     if(ProduzirInfo[playerid][Trabalhando]) return SCM(playerid, Vermelho, "Você ja está trabalhando!");
  164.     if(!IsPlayerInDynamicArea(playerid, TerritorioDrogas, 1)) return SCM(playerid, Vermelho, "Você não está na fábrica de drogas!");
  165.     new pos = random(sizeof(DrogaPos_Pegar));
  166.  
  167.     ProduzirInfo[playerid][CpPegar] = CreateDynamicRaceCP(2, DrogaPos_Pegar[pos][0], DrogaPos_Pegar[pos][1], DrogaPos_Pegar[pos][2], 0, 0, 0, 1, 0, 0, playerid, 9000, -1, 1);
  168.     ProduzirInfo[playerid][Trabalhando] = true;
  169.  
  170.     SetAviso2(playerid, 6, "Va ate o deposito pegar a ~r~~h~materia-prima~w~!");
  171.     ProduzirInfo[playerid][TimerProduzindo] = SetTimerEx("ProduzindoTimer", 1000, true, "i", playerid);
  172.  
  173.     return 1;
  174. }
  175.  
  176. public OnPlayerEnterDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP:checkpointid) {
  177.     if(checkpointid == ProduzirInfo[playerid][CpPegar] && IsPlayerInDynamicRaceCP(playerid, ProduzirInfo[playerid][CpPegar])) {
  178.         DestroyDynamicRaceCP(ProduzirInfo[playerid][CpPegar]);
  179.         ProduzirInfo[playerid][CpPegar] = 0;
  180.  
  181.         ShowProgressoBar(playerid, "Pegando materia-prima", 0xc93e3eFF);
  182.         ProduzirInfo[playerid][Timer] = SetTimerEx("PegarMateriaPrima", 1000, true, "i", playerid);
  183.         TogglePlayerControllable(playerid, false);
  184.     }
  185.  
  186.     if(checkpointid == ProduzirInfo[playerid][CpPreparar] && IsPlayerInDynamicRaceCP(playerid, ProduzirInfo[playerid][CpPreparar])) {
  187.         DestroyDynamicRaceCP(ProduzirInfo[playerid][CpPreparar]);
  188.         ProduzirInfo[playerid][CpPreparar] = 0;
  189.  
  190.         RemovePlayerAttachedObject(playerid, INDEX_EQP_MAO);
  191.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  192.         ShowProgressoBar(playerid, "Preparando drogas", 0xc93e3eFF);
  193.         ProduzirInfo[playerid][Timer] = SetTimerEx("PrepararDrogas", 1000, true, "i", playerid);
  194.         TogglePlayerControllable(playerid, false);
  195.     }
  196.  
  197.     if(checkpointid == ProduzirInfo[playerid][CpEmbalar] && IsPlayerInDynamicRaceCP(playerid, ProduzirInfo[playerid][CpEmbalar])) {
  198.         DestroyDynamicRaceCP(ProduzirInfo[playerid][CpEmbalar]);
  199.         ProduzirInfo[playerid][CpEmbalar] = 0;
  200.  
  201.         RemovePlayerAttachedObject(playerid, INDEX_EQP_MAO);
  202.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  203.         ShowProgressoBar(playerid, "Embalando drogas", 0xc93e3eFF);
  204.         ProduzirInfo[playerid][Timer] = SetTimerEx("EmbalarDrogas", 1000, true, "i", playerid);
  205.         TogglePlayerControllable(playerid, false);
  206.     }
  207.  
  208.     if(checkpointid == ProduzirInfo[playerid][CpGuardar] && IsPlayerInDynamicRaceCP(playerid, ProduzirInfo[playerid][CpGuardar])) {
  209.         DestroyDynamicRaceCP(ProduzirInfo[playerid][CpGuardar]);
  210.         ProduzirInfo[playerid][CpGuardar] = 0;
  211.  
  212.         ShowProgressoBar(playerid, "Guardando drogas", 0xc93e3eFF);
  213.         ProduzirInfo[playerid][Timer] = SetTimerEx("GuardarDrogas", 1000, true, "i", playerid);
  214.         TogglePlayerControllable(playerid, false);
  215.     }
  216.  
  217.     return 1;
  218. }
  219.  
  220. function:PegarMateriaPrima(playerid) {
  221.     new Float:valor = GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) + 25;
  222.     UpdateProgressoBar(playerid, "Pegando materia-prima", valor);
  223.     if(GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) >= GetPlayerProgressBarMaxValue(playerid, ProgressoBar[playerid])) {
  224.         KillTimer(ProduzirInfo[playerid][Timer]);
  225.         HideProgressoBar(playerid);
  226.         TogglePlayerControllable(playerid, true);
  227.  
  228.         SetAviso2(playerid, 6, "~r~~h~Materia-prima ~w~pega!~n~Va ate o fogao preparar as drogas!");
  229.         SetPlayerAttachedObject(playerid, INDEX_EQP_MAO, 1220, 6,  0.043999, 0.172000, -0.240000,  71.000007, -170.599960, -11.000050,  0.632999, 0.604000, 0.745000);
  230.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  231.  
  232.         new pos = random(sizeof(DrogaPos_Preparar));
  233.         ProduzirInfo[playerid][CpPreparar] = CreateDynamicRaceCP(2, DrogaPos_Preparar[pos][0], DrogaPos_Preparar[pos][1], DrogaPos_Preparar[pos][2], 0, 0, 0, 1, 0, 0, playerid, 9000, -1, 1);
  234.     }  
  235.     return 1;
  236. }
  237.  
  238. function:PrepararDrogas(playerid) {
  239.     new Float:valor = GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) + 5;
  240.     UpdateProgressoBar(playerid, "Preparando drogas", valor);
  241.     if(GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) >= GetPlayerProgressBarMaxValue(playerid, ProgressoBar[playerid])) {
  242.         KillTimer(ProduzirInfo[playerid][Timer]);
  243.         HideProgressoBar(playerid);
  244.         TogglePlayerControllable(playerid, true);
  245.  
  246.         SetAviso2(playerid, 6, "~r~~h~Drogas preparadas~w~!~n~Va ate uma mesa para embala-las para venda!");
  247.         SetPlayerAttachedObject(playerid, INDEX_EQP_MAO, 1575, 6,  0.085999, -0.072999, -0.145999,  -109.699989, -2.099999, -91.800010,  1.000000, 1.000000, 1.000000);
  248.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  249.  
  250.         new pos = random(sizeof(DrogaPos_Embalar));
  251.         ProduzirInfo[playerid][CpEmbalar] = CreateDynamicRaceCP(2, DrogaPos_Embalar[pos][0], DrogaPos_Embalar[pos][1], DrogaPos_Embalar[pos][2], 0, 0, 0, 1, 0, 0, playerid, 9000, -1, 1);
  252.     }
  253.     return 1;
  254. }
  255.  
  256. function:EmbalarDrogas(playerid) {
  257.     new Float:valor = GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) + 20;
  258.     UpdateProgressoBar(playerid, "Embalando drogas", valor);
  259.     if(GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) >= GetPlayerProgressBarMaxValue(playerid, ProgressoBar[playerid])) {
  260.         KillTimer(ProduzirInfo[playerid][Timer]);
  261.         HideProgressoBar(playerid);
  262.         TogglePlayerControllable(playerid, true);
  263.  
  264.         SetAviso2(playerid, 6, "~r~~h~Drogas embaladas~w~!~n~Va ate o deposito para guarda-las!");
  265.         SetPlayerAttachedObject(playerid, INDEX_EQP_MAO, 1575, 6,  0.085999, -0.072999, -0.145999,  -109.699989, -2.099999, -91.800010,  1.000000, 1.000000, 1.000000);
  266.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  267.  
  268.         new pos = random(sizeof(DrogaPos_Guardar));
  269.         ProduzirInfo[playerid][CpGuardar] = CreateDynamicRaceCP(2, DrogaPos_Guardar[pos][0], DrogaPos_Guardar[pos][1], DrogaPos_Guardar[pos][2], 0, 0, 0, 1, 0, 0, playerid, 9000, -1, 1);
  270.     }
  271.     return 1;
  272. }
  273.  
  274. function:GuardarDrogas(playerid) {
  275.     new Float:valor = GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) + 15;
  276.     UpdateProgressoBar(playerid, "Guardando drogas", valor);
  277.     if(GetPlayerProgressBarValue(playerid, ProgressoBar[playerid]) >= GetPlayerProgressBarMaxValue(playerid, ProgressoBar[playerid])) {
  278.         KillTimer(ProduzirInfo[playerid][Timer]);
  279.         HideProgressoBar(playerid);
  280.         TogglePlayerControllable(playerid, true);
  281.         RemovePlayerAttachedObject(playerid, INDEX_EQP_MAO);
  282.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  283.         SetAviso2(playerid, 4, "Drogas ~r~guardadas!");
  284.  
  285.         ProduzirInfo[playerid][Trabalhando] = false;
  286.  
  287.         new msg[128],
  288.             cocaina = RandomEx(200, 400),
  289.             crack = RandomEx(250, 400),
  290.             pagamento = (cocaina+crack)*2;
  291.  
  292.         GivePlayerMoney(playerid, pagamento);
  293.         SCM(playerid, Verde2, "=============== [Drogas Produzidas] ===============");
  294.         format(msg, sizeof(msg), "» Cocaina: {c93e3e}%dg", cocaina);
  295.         SCM(playerid, Branco, msg);
  296.         format(msg, sizeof(msg), "» Crack: {c93e3e}%dg", crack);
  297.         SCM(playerid, Branco, msg);
  298.         format(msg, sizeof(msg), "» Valor recebido: {19B519}$%s", Convert(pagamento));
  299.         SCM(playerid, Branco, msg);
  300.         SCM(playerid, Verde2, "=============== [Drogas Produzidas] ===============");
  301.     }
  302.     return 1;
  303. }
  304.  
  305. public OnPlayerDisconnect(playerid, reason) {
  306.     if(ProduzirInfo[playerid][Trabalhando]) CancelarProducao(playerid);
  307.  
  308.     return 1;
  309. }
  310.  
  311. public OnPlayerDeath(playerid, killerid, reason) {
  312.     if(ProduzirInfo[playerid][Trabalhando]) {
  313.         CancelarProducao(playerid);
  314.         HideProgressoBar(playerid);
  315.         SCM(playerid, Vermelho, "Você morreu e a produção foi cancelada!");
  316.     }
  317.  
  318.     return 1;
  319. }
  320.  
  321. CMD:irproducao(playerid) {
  322.     if(!IsPlayerAdmin(playerid)) return SCM(playerid, Vermelho, "Você precisa estar logado no RCON para se teleportar.");
  323.     SetPlayerPos(playerid, -2157.1086, -242.0748, 36.5156);
  324.     SetPlayerFacingAngle(playerid, 270.0958);
  325.     SetPlayerInterior(playerid, 0);
  326.     SetPlayerVirtualWorld(playerid, 0);
  327.  
  328.     return 1;
  329. }
  330.  
  331. function:ProduzindoTimer(playerid) {
  332.     if(!IsPlayerConnected(playerid)) KillTimer(ProduzirInfo[playerid][TimerProduzindo]);
  333.     if(!IsPlayerInDynamicArea(playerid, TerritorioDrogas)) {
  334.         SCM(playerid, Vermelho, "Você saiu da produção de drogas e seu trabalho foi cancelado.");
  335.         CancelarProducao(playerid);
  336.         KillTimer(ProduzirInfo[playerid][TimerProduzindo]);
  337.  
  338.         return 1;
  339.     }
  340.  
  341.     return 1;
  342. }
  343.  
  344. stock CancelarProducao(playerid) {
  345.     KillTimer(ProduzirInfo[playerid][Timer]);
  346.  
  347.     DestroyDynamicRaceCP(ProduzirInfo[playerid][CpPegar]);
  348.     DestroyDynamicRaceCP(ProduzirInfo[playerid][CpEmbalar]);
  349.     DestroyDynamicRaceCP(ProduzirInfo[playerid][CpGuardar]);
  350.     DestroyDynamicRaceCP(ProduzirInfo[playerid][CpPreparar]);
  351.     ProduzirInfo[playerid][CpPegar] = 0;
  352.     ProduzirInfo[playerid][CpEmbalar] = 0;
  353.     ProduzirInfo[playerid][CpGuardar] = 0;
  354.     ProduzirInfo[playerid][CpPreparar] = 0;
  355.     ProduzirInfo[playerid][Trabalhando] = false;
  356.  
  357.     RemovePlayerAttachedObject(playerid, INDEX_EQP_MAO);
  358.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  359. }
  360.  
  361. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  362.  
  363. stock SetAviso2(playerid, tempo, txt[]) {
  364.     tempo = tempo*1000;
  365.     KillTimer(ProduzirInfo[playerid][AvisoTimer_2]);
  366.     PlayerTextDrawSetString(playerid, AvisoTd2[playerid], txt);
  367.     PlayerTextDrawShow(playerid, AvisoTd2[playerid]);
  368.     ProduzirInfo[playerid][AvisoTimer_2] = SetTimerEx("Aviso2TimerPublic", tempo, false, "i", playerid);
  369. }
  370.  
  371. function:Aviso2TimerPublic(playerid) {
  372.     PlayerTextDrawHide(playerid, AvisoTd2[playerid]);
  373. }
  374.  
  375. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  376.  
  377. stock ShowProgressoBar(playerid, const str[], color = 0xffa500FF, Float:maxvalue = 100.0) {
  378.     PlayerTextDrawSetString(playerid, ProgressoTD[playerid], str);
  379.     SetPlayerProgressBarColour(playerid, ProgressoBar[playerid], color);
  380.     SetPlayerProgressBarValue(playerid, ProgressoBar[playerid], 0);
  381.     SetPlayerProgressBarMaxValue(playerid, ProgressoBar[playerid], maxvalue);
  382.  
  383.     PlayerTextDrawShow(playerid, ProgressoTD[playerid]);
  384.     ShowPlayerProgressBar(playerid, ProgressoBar[playerid]);
  385. }
  386.  
  387. stock HideProgressoBar(playerid) {
  388.     PlayerTextDrawHide(playerid, ProgressoTD[playerid]);
  389.     HidePlayerProgressBar(playerid, ProgressoBar[playerid]);
  390. }
  391.  
  392. function:UpdateProgressoBar(playerid, const str[], Float:value) {
  393.     PlayerTextDrawSetString(playerid, ProgressoTD[playerid], str);
  394.     SetPlayerProgressBarValue(playerid, ProgressoBar[playerid], value);
  395.  
  396.     return 1;
  397. }
  398.  
  399. stock Convert(value, const text[] = ".")
  400. {
  401.     new Var[20];
  402.     format(Var, sizeof(Var), "%d", value);
  403.  
  404.     for(new X = strlen(Var) - 3; X > 0; X -= 3) {
  405.         if(value < 0 && strcmp(Var[X], "-", false) != 0) strins(Var, text, X);
  406.         else strins(Var, text, X);
  407.     }
  408.     return Var;
  409. }
  410.  
  411.  
  412.  
  413. stock GenFabDrogas_Remove(playerid) {
  414.     RemoveBuildingForPlayer(playerid, 1449, -2160.6406, -226.3516, 36.0234, 0.25);
  415.     RemoveBuildingForPlayer(playerid, 943, -2156.0703, -227.7500, 36.2813, 0.25);
  416.     RemoveBuildingForPlayer(playerid, 944, -2153.7969, -229.0391, 36.3984, 0.25);
  417.     RemoveBuildingForPlayer(playerid, 944, -2146.2656, -238.4063, 36.3984, 0.25);
  418.     RemoveBuildingForPlayer(playerid, 942, -2140.3359, -229.1484, 37.9609, 0.25);
  419.     RemoveBuildingForPlayer(playerid, 939, -2140.2266, -237.5078, 37.9609, 0.25);
  420.     RemoveBuildingForPlayer(playerid, 944, -2171.1016, -235.7031, 36.3984, 0.25);
  421.     RemoveBuildingForPlayer(playerid, 944, -2145.1641, -234.1719, 36.3984, 0.25);
  422.     RemoveBuildingForPlayer(playerid, 944, -2146.0234, -228.5000, 36.3984, 0.25);
  423.     RemoveBuildingForPlayer(playerid, 944, -2149.8750, -229.7188, 36.3984, 0.25);
  424.     RemoveBuildingForPlayer(playerid, 918, -2153.0859, -256.2734, 35.8750, 0.25);
  425.     RemoveBuildingForPlayer(playerid, 1438, -2164.2188, -231.1563, 35.5078, 0.25);
  426.     RemoveBuildingForPlayer(playerid, 944, -2180.3906, -247.4609, 36.3984, 0.25);
  427.     RemoveBuildingForPlayer(playerid, 918, -2148.4922, -230.8047, 35.8750, 0.25);
  428.     RemoveBuildingForPlayer(playerid, 918, -2143.4688, -230.3438, 35.8750, 0.25);
  429.     RemoveBuildingForPlayer(playerid, 918, -2167.8281, -246.0859, 35.8750, 0.25);
  430. }
  431.  
  432. stock GenFabDrogas() {
  433.     CreateDynamicObject(931, -2142.141601, -228.089233, 36.595623, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  434.     CreateDynamicObject(931, -2145.913085, -228.089233, 36.595623, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  435.     CreateDynamicObject(931, -2149.625244, -228.089233, 36.595623, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  436.     CreateDynamicObject(1220, -2149.602050, -228.217544, 37.045604, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  437.     CreateDynamicObject(1220, -2142.137207, -228.217544, 37.045604, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  438.     CreateDynamicObject(1220, -2145.879882, -228.217544, 37.045604, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  439.     CreateDynamicObject(3287, -2144.345703, -238.477294, 40.175670, 0.000000, 0.000000, 90.000000, 0, 0, -1, 300.00, 300.00);
  440.     CreateDynamicObject(19903, -2139.476806, -236.044708, 35.495616, 0.000000, 0.000000, 143.900009, 0, 0, -1, 300.00, 300.00);
  441.     CreateDynamicObject(1575, -2142.731201, -227.930679, 35.625629, 0.000000, 0.000000, 65.699996, 0, 0, -1, 300.00, 300.00);
  442.     CreateDynamicObject(1575, -2141.737304, -228.379196, 35.625629, 0.000000, 0.000000, 83.900001, 0, 0, -1, 300.00, 300.00);
  443.     CreateDynamicObject(1576, -2146.370605, -228.013580, 35.665622, 0.000000, 0.000000, -35.800003, 0, 0, -1, 300.00, 300.00);
  444.     CreateDynamicObject(1576, -2145.334228, -228.313095, 35.665622, 0.000000, 0.000000, -106.100013, 0, 0, -1, 300.00, 300.00);
  445.     CreateDynamicObject(1578, -2150.370361, -228.294021, 35.665615, 0.000000, 0.000000, -74.900001, 0, 0, -1, 300.00, 300.00);
  446.     CreateDynamicObject(1578, -2149.648193, -228.000152, 35.665615, 0.000000, 0.000000, -103.400001, 0, 0, -1, 300.00, 300.00);
  447.     CreateDynamicObject(1578, -2149.105957, -228.365432, 35.665615, 0.000000, 0.000000, -125.199981, 0, 0, -1, 300.00, 300.00);
  448.     CreateDynamicObject(1575, -2157.838134, -248.070098, 36.425613, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  449.     CreateDynamicObject(1575, -2168.443359, -248.070098, 36.425613, 0.000000, 0.000000, 40.200000, 0, 0, -1, 300.00, 300.00);
  450.     CreateDynamicObject(1576, -2164.735107, -248.272338, 36.425613, 0.000000, 0.000000, 11.700001, 0, 0, -1, 300.00, 300.00);
  451.     CreateDynamicObject(1578, -2160.558837, -248.070098, 36.425613, 0.000000, 0.000000, 20.799999, 0, 0, -1, 300.00, 300.00);
  452.     CreateDynamicObject(1579, -2170.858642, -247.988281, 36.425613, 0.000000, 0.000000, 62.500000, 0, 0, -1, 300.00, 300.00);
  453.     CreateDynamicObject(1580, -2175.204101, -247.990951, 36.425613, 0.000000, 0.000000, 109.499977, 0, 0, -1, 300.00, 300.00);
  454.     CreateDynamicObject(18716, -2162.432861, -266.438903, 36.255603, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  455.     CreateDynamicObject(18716, -2158.922119, -266.438903, 36.255603, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  456.     CreateDynamicObject(18716, -2155.369873, -266.438903, 36.255603, 0.000000, 0.000000, 0.000000, 0, 0, -1, 300.00, 300.00);
  457. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement