Guest User

SistemaAFK_iPerryX

a guest
Jul 25th, 2010
867
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 12.01 KB | None | 0 0
  1. #include <a_samp>
  2. new optimusprime,invisible;
  3. new bumblebee;
  4. new jazz;
  5. new ratchet;
  6. new ironhide;
  7. public OnFilterScriptInit()
  8. {
  9.     optimusprime = AddStaticVehicle(403,-1991.01794434,241.66136169,35.87187576,270.00000000,125,125); // Linerunner
  10.     bumblebee = AddStaticVehicle(541,-1970.34582520,261.79116821,34.87187576,90.00000000,6,0); // Bullet
  11.     jazz = AddStaticVehicle(429,-1970.19519043,257.61407471,34.92187500,90.00000000,35,35); // Banshee
  12.     ratchet = AddStaticVehicle(470,-1990.14367676,251.11080933,35.28188705,270.00000000,0,0); // Patriot
  13.     ironhide = AddStaticVehicle(557,-1989.95520020,246.27757263,35.70000076,270.00000000,2,3); // Monster
  14.     LinkVehicleToInterior(optimusprime,1);
  15.     LinkVehicleToInterior(bumblebee,1);
  16.     LinkVehicleToInterior(jazz,1);
  17.     LinkVehicleToInterior(ratchet,1);
  18.     LinkVehicleToInterior(ironhide,1);
  19.     invisible = 1;
  20.     return 1;
  21. }
  22. public OnFilterScriptExit()
  23. {
  24.     DestroyVehicle(optimusprime);
  25.     DestroyVehicle(bumblebee);
  26.     DestroyVehicle(jazz);
  27.     DestroyVehicle(ratchet);
  28.     DestroyVehicle(ironhide);
  29.     return 1;
  30. }
  31. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  32. {
  33.     new Float:info[7],model;
  34.     //Optimus Prime
  35.     if (IsPlayerInVehicle(playerid,optimusprime))
  36.     {
  37.         if (newkeys & KEY_ANALOG_LEFT)
  38.         {
  39.             GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  40.             GetVehiclePos(optimusprime,info[0],info[1],info[2]);
  41.             GetVehicleZAngle(optimusprime,info[3]);
  42.             GetVehicleModel(model);
  43.             DestroyVehicle(optimusprime);
  44.             optimusprime = AddStaticVehicle(446,info[0],info[1],info[2],info[3],125,125);
  45.             PutPlayerInVehicle(playerid,optimusprime,0);
  46.             PlayerPlaySound(playerid,1133,0,0,0);
  47.             SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  48.         }
  49.         if (newkeys & KEY_ANALOG_RIGHT)
  50.         {
  51.             GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  52.             GetVehiclePos(optimusprime,info[0],info[1],info[2]);
  53.             GetVehicleZAngle(optimusprime,info[3]);
  54.             GetVehicleModel(model);
  55.             DestroyVehicle(optimusprime);
  56.             optimusprime = AddStaticVehicle(476,info[0],info[1],info[2],info[3],125,125);
  57.             PutPlayerInVehicle(playerid,optimusprime,0);
  58.             PlayerPlaySound(playerid,1133,0,0,0);
  59.             SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  60.         }
  61.         if (newkeys & KEY_ANALOG_DOWN)
  62.         {
  63.             GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  64.             GetVehiclePos(optimusprime,info[0],info[1],info[2]);
  65.             GetVehicleZAngle(optimusprime,info[3]);
  66.             GetVehicleModel(model);
  67.             DestroyVehicle(optimusprime);
  68.             optimusprime = AddStaticVehicle(403,info[0],info[1],info[2],info[3],125,125);
  69.             PutPlayerInVehicle(playerid,optimusprime,0);
  70.             PlayerPlaySound(playerid,1133,0,0,0);
  71.             SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  72.         }
  73.         if (newkeys & KEY_ANALOG_UP)
  74.         {
  75.             GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  76.             GetVehiclePos(optimusprime,info[0],info[1],info[2]);
  77.             GetVehicleZAngle(optimusprime,info[3]);
  78.             GetVehicleModel(model);
  79.             DestroyVehicle(optimusprime);
  80.             optimusprime = AddStaticVehicle(468,info[0],info[1],info[2],info[3],125,125);
  81.             PutPlayerInVehicle(playerid,optimusprime,0);
  82.             PlayerPlaySound(playerid,1133,0,0,0);
  83.             SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
  84.         }
  85.         if (newkeys & KEY_SUBMISSION)
  86.         {
  87.             if(invisible == 1)
  88.             {
  89.                 LinkVehicleToInterior(optimusprime,0);
  90.                 invisible = 0;
  91.                 return 1;
  92.             }
  93.             if(invisible == 0)
  94.             {
  95.                 LinkVehicleToInterior(optimusprime,1);
  96.                 invisible = 1;
  97.                 return 1;
  98.             }
  99.         }
  100.     }
  101.     //Bumblebee
  102.     if (IsPlayerInVehicle(playerid, bumblebee))
  103.     {
  104.         if (newkeys & KEY_ANALOG_LEFT)
  105.         {
  106.             GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  107.             GetVehiclePos(bumblebee,info[0],info[1],info[2]);
  108.             GetVehicleZAngle(bumblebee,info[3]);
  109.             GetVehicleModel(model);
  110.             DestroyVehicle(bumblebee);
  111.             bumblebee = AddStaticVehicle(493,info[0],info[1],info[2],info[3],6,0);
  112.             PutPlayerInVehicle(playerid,bumblebee,0);
  113.             PlayerPlaySound(playerid,1133,0,0,0);
  114.             SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  115.         }
  116.         if (newkeys & KEY_ANALOG_RIGHT)
  117.         {
  118.             GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  119.             GetVehiclePos(bumblebee,info[0],info[1],info[2]);
  120.             GetVehicleZAngle(bumblebee,info[3]);
  121.             GetVehicleModel(model);
  122.             DestroyVehicle(bumblebee);
  123.             bumblebee = AddStaticVehicle(476,info[0],info[1],info[2],info[3],6,0);
  124.             PutPlayerInVehicle(playerid,bumblebee,0);
  125.             PlayerPlaySound(playerid,1133,0,0,0);
  126.             SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  127.         }
  128.         if (newkeys & KEY_ANALOG_DOWN)
  129.         {
  130.             GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  131.             GetVehiclePos(bumblebee,info[0],info[1],info[2]);
  132.             GetVehicleZAngle(bumblebee,info[3]);
  133.             GetVehicleModel(model);
  134.             DestroyVehicle(bumblebee);
  135.             bumblebee = AddStaticVehicle(541,info[0],info[1],info[2],info[3],6,0);
  136.             PutPlayerInVehicle(playerid,bumblebee,0);
  137.             PlayerPlaySound(playerid,1133,0,0,0);
  138.             SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  139.         }
  140.         if (newkeys & KEY_ANALOG_UP)
  141.         {
  142.             GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  143.             GetVehiclePos(bumblebee,info[0],info[1],info[2]);
  144.             GetVehicleZAngle(bumblebee,info[3]);
  145.             GetVehicleModel(model);
  146.             DestroyVehicle(bumblebee);
  147.             bumblebee = AddStaticVehicle(522,info[0],info[1],info[2],info[3],6,0);
  148.             PutPlayerInVehicle(playerid,bumblebee,0);
  149.             PlayerPlaySound(playerid,1133,0,0,0);
  150.             SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
  151.         }
  152.         if (newkeys & KEY_SUBMISSION)
  153.         {
  154.             if(invisible == 1)
  155.             {
  156.                 LinkVehicleToInterior(bumblebee,0);
  157.                 invisible = 0;
  158.                 return 1;
  159.             }
  160.             if(invisible == 0)
  161.             {
  162.                 LinkVehicleToInterior(bumblebee,1);
  163.                 invisible = 1;
  164.                 return 1;
  165.             }
  166.         }
  167.     }
  168.     //Jazz
  169.     if (IsPlayerInVehicle(playerid,jazz))
  170.     {
  171.         if (newkeys & KEY_ANALOG_LEFT)
  172.         {
  173.             GetVehicleVelocity(jazz,info[4],info[5],info[6]);
  174.             GetVehiclePos(jazz,info[0],info[1],info[2]);
  175.             GetVehicleZAngle(jazz,info[3]);
  176.             GetVehicleModel(model);
  177.             DestroyVehicle(jazz);
  178.             jazz = AddStaticVehicle(493,info[0],info[1],info[2],info[3],35,35);
  179.             PutPlayerInVehicle(playerid,jazz,0);
  180.             PlayerPlaySound(playerid,1133,0,0,0);
  181.             SetVehicleVelocity(jazz,info[4],info[5],info[6]);
  182.         }
  183.         if (newkeys & KEY_ANALOG_RIGHT)
  184.         {
  185.             GetVehicleVelocity(jazz,info[4],info[5],info[6]);
  186.             GetVehiclePos(jazz,info[0],info[1],info[2]);
  187.             GetVehicleZAngle(jazz,info[3]);
  188.             GetVehicleModel(model);
  189.             DestroyVehicle(jazz);
  190.             jazz = AddStaticVehicle(476,info[0],info[1],info[2],info[3],35,35);
  191.             PutPlayerInVehicle(playerid,jazz,0);
  192.             PlayerPlaySound(playerid,1133,0,0,0);
  193.             SetVehicleVelocity(jazz,info[4],info[5],info[6]);
  194.         }
  195.         if (newkeys & KEY_ANALOG_DOWN)
  196.         {
  197.             GetVehicleVelocity(jazz,info[4],info[5],info[6]);
  198.             GetVehiclePos(jazz,info[0],info[1],info[2]);
  199.             GetVehicleZAngle(jazz,info[3]);
  200.             GetVehicleModel(model);
  201.             DestroyVehicle(jazz);
  202.             jazz = AddStaticVehicle(429,info[0],info[1],info[2],info[3],35,35);
  203.             PutPlayerInVehicle(playerid,jazz,0);
  204.             PlayerPlaySound(playerid,1133,0,0,0);
  205.             SetVehicleVelocity(jazz,info[4],info[5],info[6]);
  206.         }
  207.         if (newkeys & KEY_ANALOG_UP)
  208.         {
  209.             GetVehicleVelocity(jazz,info[4],info[5],info[6]);
  210.             GetVehiclePos(jazz,info[0],info[1],info[2]);
  211.             GetVehicleZAngle(jazz,info[3]);
  212.             GetVehicleModel(model);
  213.             DestroyVehicle(jazz);
  214.             jazz = AddStaticVehicle(522,info[0],info[1],info[2],info[3],35,35);
  215.             PutPlayerInVehicle(playerid,jazz,0);
  216.             PlayerPlaySound(playerid,1133,0,0,0);
  217.             SetVehicleVelocity(jazz,info[4],info[5],info[6]);
  218.         }
  219.         if (newkeys & KEY_SUBMISSION)
  220.         {
  221.             if(invisible == 1)
  222.             {
  223.                 LinkVehicleToInterior(jazz,0);
  224.                 invisible = 0;
  225.                 return 1;
  226.             }
  227.             if(invisible == 0)
  228.             {
  229.                 LinkVehicleToInterior(jazz,1);
  230.                 invisible = 1;
  231.                 return 1;
  232.             }
  233.         }
  234.     }
  235.     //Ratchet
  236.     if (IsPlayerInVehicle(playerid,ratchet))
  237.     {
  238.         if (newkeys & KEY_ANALOG_LEFT)
  239.         {
  240.             GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  241.             GetVehiclePos(ratchet,info[0],info[1],info[2]);
  242.             GetVehicleZAngle(ratchet,info[3]);
  243.             GetVehicleModel(model);
  244.             DestroyVehicle(ratchet);
  245.             ratchet = AddStaticVehicle(446,info[0],info[1],info[2],info[3],104,104);
  246.             PutPlayerInVehicle(playerid,ratchet,0);
  247.             PlayerPlaySound(playerid,1133,0,0,0);
  248.             SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  249.         }
  250.         if (newkeys & KEY_ANALOG_RIGHT)
  251.         {
  252.             GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  253.             GetVehiclePos(ratchet,info[0],info[1],info[2]);
  254.             GetVehicleZAngle(ratchet,info[3]);
  255.             GetVehicleModel(model);
  256.             DestroyVehicle(ratchet);
  257.             ratchet = AddStaticVehicle(476,info[0],info[1],info[2],info[3],104,104);
  258.             PutPlayerInVehicle(playerid,ratchet,0);
  259.             PlayerPlaySound(playerid,1133,0,0,0);
  260.             SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  261.         }
  262.         if (newkeys & KEY_ANALOG_DOWN)
  263.         {
  264.             GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  265.             GetVehiclePos(ratchet,info[0],info[1],info[2]);
  266.             GetVehicleZAngle(ratchet,info[3]);
  267.             GetVehicleModel(model);
  268.             DestroyVehicle(ratchet);
  269.             ratchet = AddStaticVehicle(470,info[0],info[1],info[2],info[3],104,104);
  270.             PutPlayerInVehicle(playerid,ratchet,0);
  271.             PlayerPlaySound(playerid,1133,0,0,0);
  272.             SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  273.         }
  274.         if (newkeys & KEY_ANALOG_UP)
  275.         {
  276.             GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  277.             GetVehiclePos(ratchet,info[0],info[1],info[2]);
  278.             GetVehicleZAngle(ratchet,info[3]);
  279.             GetVehicleModel(model);
  280.             DestroyVehicle(ratchet);
  281.             ratchet = AddStaticVehicle(468,info[0],info[1],info[2],info[3],104,104);
  282.             PutPlayerInVehicle(playerid,ratchet,0);
  283.             PlayerPlaySound(playerid,1133,0,0,0);
  284.             SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
  285.         }
  286.         if (newkeys & KEY_SUBMISSION)
  287.         {
  288.             if(invisible == 1)
  289.             {
  290.                 LinkVehicleToInterior(ratchet,0);
  291.                 invisible = 0;
  292.                 return 1;
  293.             }
  294.             if(invisible == 0)
  295.             {
  296.                 LinkVehicleToInterior(ratchet,1);
  297.                 invisible = 1;
  298.                 return 1;
  299.             }
  300.         }
  301.     }
  302.     //Ironhide
  303.     if (IsPlayerInVehicle(playerid,ironhide))
  304.     {
  305.         if (newkeys & KEY_ANALOG_LEFT)
  306.         {
  307.             GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  308.             GetVehiclePos(ironhide,info[0],info[1],info[2]);
  309.             GetVehicleZAngle(ironhide,info[3]);
  310.             GetVehicleModel(model);
  311.             DestroyVehicle(ironhide);
  312.             ironhide = AddStaticVehicle(446,info[0],info[1],info[2],info[3],2,2);
  313.             PutPlayerInVehicle(playerid,ironhide,0);
  314.             PlayerPlaySound(playerid,1133,0,0,0);
  315.             SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  316.         }
  317.         if (newkeys & KEY_ANALOG_RIGHT)
  318.         {
  319.             GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  320.             GetVehiclePos(ironhide,info[0],info[1],info[2]);
  321.             GetVehicleZAngle(ironhide,info[3]);
  322.             GetVehicleModel(model);
  323.             DestroyVehicle(ironhide);
  324.             ironhide = AddStaticVehicle(476,info[0],info[1],info[2],info[3],2,3);
  325.             PutPlayerInVehicle(playerid,ironhide,0);
  326.             PlayerPlaySound(playerid,1133,0,0,0);
  327.             SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  328.         }
  329.         if (newkeys & KEY_ANALOG_DOWN)
  330.         {
  331.             GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  332.             GetVehiclePos(ironhide,info[0],info[1],info[2]);
  333.             GetVehicleZAngle(ironhide,info[3]);
  334.             GetVehicleModel(model);
  335.             DestroyVehicle(ironhide);
  336.             ironhide = AddStaticVehicle(557,info[0],info[1],info[2],info[3],2,3);
  337.             PutPlayerInVehicle(playerid,ironhide,0);
  338.             PlayerPlaySound(playerid,1133,0,0,0);
  339.             SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  340.         }
  341.         if (newkeys & KEY_ANALOG_UP)
  342.         {
  343.             GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  344.             GetVehiclePos(ironhide,info[0],info[1],info[2]);
  345.             GetVehicleZAngle(ironhide,info[3]);
  346.             GetVehicleModel(model);
  347.             DestroyVehicle(ironhide);
  348.             ironhide = AddStaticVehicle(468,info[0],info[1],info[2],info[3],2,3);
  349.             PutPlayerInVehicle(playerid,ironhide,0);
  350.             PlayerPlaySound(playerid,1133,0,0,0);
  351.             SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
  352.         }
  353.         if (newkeys & KEY_SUBMISSION)
  354.         {
  355.             if(invisible == 1)
  356.             {
  357.                 LinkVehicleToInterior(ironhide,0);
  358.                 invisible = 0;
  359.                 return 1;
  360.             }
  361.             if(invisible == 0)
  362.             {
  363.                 LinkVehicleToInterior(ironhide,1);
  364.                 invisible = 1;
  365.                 return 1;
  366.             }
  367.         }
  368.         return 1;
  369.     }
  370.     return 0;
  371. }
Advertisement
Add Comment
Please, Sign In to add comment