Advertisement
iSmirnoff

[Filter Script] Sistema de TunninG v1.0 #STRCMP

Mar 17th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 13.75 KB | None | 0 0
  1. /*
  2. a_samp = SaMP TeaM
  3. iSmir = Criador do FilterScript
  4.  
  5. Perfil Fórum SAMP: http://forum.sa-mp.com/member.php?u=183507
  6.  
  7. */
  8.  
  9. #include <a_samp>
  10.  
  11. #define         VEICULOS_TOTAL       1000 // Coloque o Tanto de Veiculo que seu Servidor tem
  12. //===== DIALOGS =======//
  13. #define iTunar 1
  14. #define iNitro 2
  15. #define iPintar 3
  16. #define iPaintJob 4
  17. #define iRodas 5
  18.  
  19. //====== VARIAVEIS ======//
  20. new iBlindagemSmirnoff[MAX_VEHICLES];
  21. new CelulasMinhaBlindagem[55];
  22. new CapuDuCarro[MAX_PLAYERS], TaAbertoo[MAX_PLAYERS];
  23.  
  24. public OnFilterScriptInit()
  25. {
  26.         print(" Sistema de TunninG                     ");
  27.         print("                   Carregando....       ");
  28.         print("  Status: ... Ligado                    ");
  29.         print("            Digite /ajudatunning        ");
  30.  
  31.         return 1;
  32. }
  33.  
  34. public OnFilterScriptExit()
  35. {
  36.         print(" Sistema de TunninG                     ");
  37.         print("                   Desligando           ");
  38.         print("  Status: ... Desligado                 ");
  39.         return 1;
  40. }
  41. public OnPlayerConnect(playerid)
  42. {
  43.         SendClientMessage (playerid, -1, "Sistema de TunninG By Smirnoff " ) ;
  44.         return 1;
  45. }
  46.  
  47. public OnPlayerDisconnect(playerid, reason)
  48. {
  49.         SendClientMessage (playerid, -1, "Sistema de TunninG By Smirnoff " ) ;
  50.         return 1;
  51. }
  52.  
  53. public OnVehicleDeath(vehicleid, killerid)
  54. {
  55.         iBlindagemSmirnoff[GetPlayerVehicleID(vehicleid)] = 0;
  56.         return 1;
  57. }
  58. public OnPlayerCommandText(playerid, cmdtext[])
  59. {
  60.         if (strcmp("/tunar", cmdtext, true, 10) == 0)
  61.         {
  62.                 ShowPlayerDialog(playerid, iTunar, DIALOG_STYLE_LIST, "iTunninG System ","Reparar Veiculo\nBlindar Veiculo\nPintar Veiculo\nColocar Nitro\nColocar Hidraulica\nTrocar Rodas\nPaintJob\nAbrir Capo\nFechar Capo\nAbir Porta Malas\nVer Blindagem","OK","Cancelar");
  63.                 PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
  64.                 return 1;
  65.         }
  66.         return 0;
  67. }
  68. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  69. {
  70.         new vehicle = GetPlayerVehicleID(playerid);
  71.         if(dialogid == iTunar)
  72.         {
  73.                 switch(listitem)
  74.                 {
  75.                         case 0:
  76.                         {
  77.                                 RepairVehicle(GetPlayerVehicleID(playerid));
  78.                                 SendClientMessage(playerid, -1,"[iTunninG System]: Você Reparou o seu Veiculo");
  79.                         }
  80.                         case 1:
  81.                         {
  82.                                 if ( IsPlayerInAnyVehicle ( playerid ) )
  83.                                 {
  84.                                         iBlindagemSmirnoff[GetPlayerVehicleID(playerid)] = 100;
  85.                                         RepairVehicle(GetPlayerVehicleID(playerid));
  86.                                         SendClientMessage(playerid, -1, "[iTunninG System]: Você colocou blindagem em seu veiculo!");
  87.                                 }
  88.                                 else
  89.                                 {
  90.                                         SendClientMessage ( playerid, -1, "ERRO: Para você comprar uma blindagem , você precisa estar em um carro." ) ;
  91.                                 }
  92.                         }
  93.                         case 2:
  94.                         {
  95.                                 ShowPlayerDialog(playerid,iPintar,DIALOG_STYLE_LIST,"Pintar Carro","Branco\nPreto\nAzul\nAzul Fraco\nVerde\nVerde Fraco\nRosa\nMarron","OK","");
  96.                         }
  97.                         case 3:
  98.                         {
  99.                                 ShowPlayerDialog(playerid,iNitro,DIALOG_STYLE_LIST,"Nitrox","Nitro 1\nNitro 2\nNitro 3","OK","");
  100.                         }
  101.                         case 4:
  102.                         {
  103.                                 AddVehicleComponent(vehicle, 1087);
  104.                                 SendClientMessage(playerid, -1,"Você Colocou Hidraulica no Seu Carro");
  105.                         }
  106.                         case 5:
  107.                         {
  108.                                 ShowPlayerDialog(playerid,iRodas,DIALOG_STYLE_LIST,"Rodas","Shadow \nMega \nRimshine \nWires \nClassic \nTwist \nCutter \nSwitch \nGrove \nDollar \nTrance \nAtomic","OK","");
  109.                         }
  110.  
  111.                         case 6:
  112.                         {
  113.                                 ShowPlayerDialog(playerid,iPaintJob,DIALOG_STYLE_LIST,"PaintJob","PaintJob 1\nPaintJob 2\nPaintJob 3","OK","");
  114.                         }
  115.  
  116.                         case 7:
  117.                         {
  118.                                 new a, b, c, d, e, f, g;
  119.                                 new Carruuh = GetPlayerVehicleID(playerid);
  120.                                 if(Carruuh != INVALID_VEHICLE_ID)
  121.                                 {
  122.                                         if(CapuDuCarro[playerid] == 0)
  123.                                         {
  124.                                                 GetVehicleParamsEx(Carruuh, a, b, c, d, e, f, g);
  125.                                                 SetVehicleParamsEx(Carruuh, a, b, c, d, VEHICLE_PARAMS_ON, e, f);
  126.                                                 CapuDuCarro[playerid] = 1;
  127.                                                 SendClientMessage(playerid, -1, "[iTunninG]: Capo aberto");
  128.                                         }
  129.                                 }
  130.                         }
  131.                         case 8:
  132.                         {
  133.                                 new a, b, c, d, e, f, g;
  134.                                 new Carruuh = GetPlayerVehicleID(playerid);
  135.                                 if(Carruuh != INVALID_VEHICLE_ID)
  136.                                 {
  137.                                         if(CapuDuCarro[playerid] == 1)
  138.                                         {
  139.                                                 GetVehicleParamsEx(Carruuh, a, b, c, d, e, f, g);
  140.                                                 SetVehicleParamsEx(Carruuh, a, b, c, d, VEHICLE_PARAMS_OFF, e, f);
  141.                                                 CapuDuCarro[playerid] = 0;
  142.                                                 SendClientMessage(playerid, -1, "[iTunninG]: Capo fechado");
  143.                                         }
  144.                                 }
  145.                         }
  146.                         case 9:
  147.                         {
  148.  
  149.                                 new a, b, c, d, e, f, g;
  150.                                 new Carruuh = GetPlayerVehicleID(playerid);
  151.                                 if(Carruuh != INVALID_VEHICLE_ID)
  152.                                 {
  153.                                         if(TaAbertoo[playerid] == 0)
  154.                                         {
  155.                                                 GetVehicleParamsEx(Carruuh, a, b, c, d, e, f, g);
  156.                                                 SetVehicleParamsEx(Carruuh, a, b, c, d, e, VEHICLE_PARAMS_ON, g);
  157.                                                 TaAbertoo[playerid] = 1;
  158.                                                 SendClientMessage(playerid, -1, "[iTunninG]: Porta malas aberto");
  159.                                         }
  160.                                 }
  161.                         }
  162.                         case 10:
  163.                         {
  164.  
  165.                                 new a, b, c, d, e, f, g;
  166.                                 new Carruuh = GetPlayerVehicleID(playerid);
  167.                                 if(Carruuh != INVALID_VEHICLE_ID)
  168.                                 {
  169.                                         if(TaAbertoo[playerid] == 1)
  170.                                         {
  171.                                                 GetVehicleParamsEx(Carruuh, a, b, c, d, e, f, g);
  172.                                                 SetVehicleParamsEx(Carruuh, a, b, c, d, e, VEHICLE_PARAMS_OFF, g);
  173.                                                 TaAbertoo[playerid] = 0;
  174.                                                 SendClientMessage(playerid, -1, "[iTunninG]: Porta malas fechado");
  175.                                         }
  176.                                 }
  177.                         }
  178.                         case 11:
  179.                         {
  180.                                 if ( IsPlayerInAnyVehicle ( playerid ) )
  181.                                 {
  182.                                         format ( CelulasMinhaBlindagem, sizeof ( CelulasMinhaBlindagem ), "Seu veiculo ainda possui [%i%] de blindagem.", iBlindagemSmirnoff [ GetPlayerVehicleID ( playerid ) ] ) ;
  183.                                         SendClientMessage ( playerid, -1, CelulasMinhaBlindagem ) ;
  184.                                 }
  185.                                 else
  186.                                 {
  187.                                         SendClientMessage ( playerid, -1, "ERRO: Você não está em nenhum Veiculo" ) ;
  188.                                 }
  189.                         }
  190.                 }
  191.                 return 1;
  192.         }
  193.         if(dialogid == iNitro)
  194.         {
  195.                 switch(listitem)
  196.                 {
  197.                         case 0:
  198.                         {
  199.                                 AddVehicleComponent(vehicle, 1009); // Nitro 1
  200.                                 SendClientMessage(playerid, -1,"Você Colocou Nitro 1");
  201.                         }
  202.                         case 1:
  203.                         {
  204.                                 AddVehicleComponent(vehicle, 1008); // Nitro 2
  205.                                 SendClientMessage(playerid, -1,"Você Colocou Nitro 2");
  206.                         }
  207.                         case 2:
  208.                         {
  209.                                 AddVehicleComponent(vehicle, 1010); // Nitro 3
  210.                                 SendClientMessage(playerid, -1,"Você Colocou Nitro 3");
  211.                         }
  212.                 }
  213.         }
  214.  
  215.         if(dialogid == iPaintJob)
  216.         {
  217.                 switch(listitem)
  218.                 {
  219.                         case 0:
  220.                         {
  221.                                 ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 0);
  222.                         }
  223.                         case 1:
  224.                         {
  225.                                 ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 1);
  226.                         }
  227.                         case 2:
  228.                         {
  229.                                 ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 2);
  230.                         }
  231.                 }
  232.                 return 1;
  233.         }
  234.  
  235.         if(dialogid == iRodas)
  236.         {
  237.                 switch(listitem)
  238.                 {
  239.                         case 0:
  240.                         {
  241.                                 AddVehicleComponent(vehicle, 1073);
  242.                                 SendClientMessage(playerid, -1,"Você Colocou Shadow ");
  243.                         }
  244.                         case 1:
  245.                         {
  246.                                 AddVehicleComponent(vehicle, 1074);
  247.                                 SendClientMessage(playerid, -1,"Você Colocou Mega ");
  248.                         }
  249.                         case 2:
  250.                         {
  251.                                 AddVehicleComponent(vehicle, 1075);
  252.                                 SendClientMessage(playerid, -1,"Você Colocou Rimshine");
  253.                         }
  254.                         case 3:
  255.                         {
  256.                                 AddVehicleComponent(vehicle, 1076);
  257.                                 SendClientMessage(playerid, -1,"Você Colocou Wires");
  258.                         }
  259.                         case 4:
  260.                         {
  261.                                 AddVehicleComponent(vehicle, 1077);
  262.                                 SendClientMessage(playerid, -1,"Você Colocou Classic");
  263.                         }
  264.                         case 5:
  265.                         {
  266.                                 AddVehicleComponent(vehicle, 1078);
  267.                                 SendClientMessage(playerid, -1,"Você Colocou  Twist");
  268.                         }
  269.                         case 6:
  270.                         {
  271.                                 AddVehicleComponent(vehicle, 1079);
  272.                                 SendClientMessage(playerid, -1,"Você Colocou  Cutter");
  273.                         }
  274.                         case 7:
  275.                         {
  276.                                 AddVehicleComponent(vehicle, 1080);
  277.                                 SendClientMessage(playerid, -1,"Você Colocou  Switch");
  278.                         }
  279.                         case 8:
  280.                     {
  281.                                 AddVehicleComponent(vehicle, 1081);
  282.                                 SendClientMessage(playerid, -1,"Você Colocou  Grove");
  283.                         }
  284.                         case 9:
  285.                         {
  286.                                 AddVehicleComponent(vehicle, 1082);
  287.                                 SendClientMessage(playerid, -1,"Você Colocou  Import");
  288.                         }
  289.                         case 10:
  290.                         {
  291.                                 AddVehicleComponent(vehicle, 1083);
  292.                                 SendClientMessage(playerid, -1,"Você Colocou  Dollar");
  293.                         }
  294.                         case 11:
  295.                         {
  296.                                 AddVehicleComponent(vehicle, 1084);
  297.                                 SendClientMessage(playerid, -1,"Você Colocou  Trance");
  298.                         }
  299.                         case 12:
  300.                         {
  301.                                 AddVehicleComponent(vehicle, 1085);
  302.                                 SendClientMessage(playerid, -1,"Você Colocou  Atomic");
  303.                         }
  304.                 }
  305.                 return 1;
  306.         }
  307.         return 1;
  308. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement