Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new optimusprime,invisible;
- new bumblebee;
- new jazz;
- new ratchet;
- new ironhide;
- public OnFilterScriptInit()
- {
- optimusprime = AddStaticVehicle(403,-1991.01794434,241.66136169,35.87187576,270.00000000,125,125); // Linerunner
- bumblebee = AddStaticVehicle(541,-1970.34582520,261.79116821,34.87187576,90.00000000,6,0); // Bullet
- jazz = AddStaticVehicle(429,-1970.19519043,257.61407471,34.92187500,90.00000000,35,35); // Banshee
- ratchet = AddStaticVehicle(470,-1990.14367676,251.11080933,35.28188705,270.00000000,0,0); // Patriot
- ironhide = AddStaticVehicle(557,-1989.95520020,246.27757263,35.70000076,270.00000000,2,3); // Monster
- LinkVehicleToInterior(optimusprime,1);
- LinkVehicleToInterior(bumblebee,1);
- LinkVehicleToInterior(jazz,1);
- LinkVehicleToInterior(ratchet,1);
- LinkVehicleToInterior(ironhide,1);
- invisible = 1;
- return 1;
- }
- public OnFilterScriptExit()
- {
- DestroyVehicle(optimusprime);
- DestroyVehicle(bumblebee);
- DestroyVehicle(jazz);
- DestroyVehicle(ratchet);
- DestroyVehicle(ironhide);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new Float:info[7],model;
- //Optimus Prime
- if (IsPlayerInVehicle(playerid,optimusprime))
- {
- if (newkeys & KEY_ANALOG_LEFT)
- {
- GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- GetVehiclePos(optimusprime,info[0],info[1],info[2]);
- GetVehicleZAngle(optimusprime,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(optimusprime);
- optimusprime = AddStaticVehicle(446,info[0],info[1],info[2],info[3],125,125);
- PutPlayerInVehicle(playerid,optimusprime,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_RIGHT)
- {
- GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- GetVehiclePos(optimusprime,info[0],info[1],info[2]);
- GetVehicleZAngle(optimusprime,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(optimusprime);
- optimusprime = AddStaticVehicle(476,info[0],info[1],info[2],info[3],125,125);
- PutPlayerInVehicle(playerid,optimusprime,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_DOWN)
- {
- GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- GetVehiclePos(optimusprime,info[0],info[1],info[2]);
- GetVehicleZAngle(optimusprime,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(optimusprime);
- optimusprime = AddStaticVehicle(403,info[0],info[1],info[2],info[3],125,125);
- PutPlayerInVehicle(playerid,optimusprime,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_UP)
- {
- GetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- GetVehiclePos(optimusprime,info[0],info[1],info[2]);
- GetVehicleZAngle(optimusprime,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(optimusprime);
- optimusprime = AddStaticVehicle(468,info[0],info[1],info[2],info[3],125,125);
- PutPlayerInVehicle(playerid,optimusprime,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(optimusprime,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_SUBMISSION)
- {
- if(invisible == 1)
- {
- LinkVehicleToInterior(optimusprime,0);
- invisible = 0;
- return 1;
- }
- if(invisible == 0)
- {
- LinkVehicleToInterior(optimusprime,1);
- invisible = 1;
- return 1;
- }
- }
- }
- //Bumblebee
- if (IsPlayerInVehicle(playerid, bumblebee))
- {
- if (newkeys & KEY_ANALOG_LEFT)
- {
- GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- GetVehiclePos(bumblebee,info[0],info[1],info[2]);
- GetVehicleZAngle(bumblebee,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(bumblebee);
- bumblebee = AddStaticVehicle(493,info[0],info[1],info[2],info[3],6,0);
- PutPlayerInVehicle(playerid,bumblebee,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_RIGHT)
- {
- GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- GetVehiclePos(bumblebee,info[0],info[1],info[2]);
- GetVehicleZAngle(bumblebee,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(bumblebee);
- bumblebee = AddStaticVehicle(476,info[0],info[1],info[2],info[3],6,0);
- PutPlayerInVehicle(playerid,bumblebee,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_DOWN)
- {
- GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- GetVehiclePos(bumblebee,info[0],info[1],info[2]);
- GetVehicleZAngle(bumblebee,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(bumblebee);
- bumblebee = AddStaticVehicle(541,info[0],info[1],info[2],info[3],6,0);
- PutPlayerInVehicle(playerid,bumblebee,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_UP)
- {
- GetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- GetVehiclePos(bumblebee,info[0],info[1],info[2]);
- GetVehicleZAngle(bumblebee,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(bumblebee);
- bumblebee = AddStaticVehicle(522,info[0],info[1],info[2],info[3],6,0);
- PutPlayerInVehicle(playerid,bumblebee,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(bumblebee,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_SUBMISSION)
- {
- if(invisible == 1)
- {
- LinkVehicleToInterior(bumblebee,0);
- invisible = 0;
- return 1;
- }
- if(invisible == 0)
- {
- LinkVehicleToInterior(bumblebee,1);
- invisible = 1;
- return 1;
- }
- }
- }
- //Jazz
- if (IsPlayerInVehicle(playerid,jazz))
- {
- if (newkeys & KEY_ANALOG_LEFT)
- {
- GetVehicleVelocity(jazz,info[4],info[5],info[6]);
- GetVehiclePos(jazz,info[0],info[1],info[2]);
- GetVehicleZAngle(jazz,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(jazz);
- jazz = AddStaticVehicle(493,info[0],info[1],info[2],info[3],35,35);
- PutPlayerInVehicle(playerid,jazz,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(jazz,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_RIGHT)
- {
- GetVehicleVelocity(jazz,info[4],info[5],info[6]);
- GetVehiclePos(jazz,info[0],info[1],info[2]);
- GetVehicleZAngle(jazz,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(jazz);
- jazz = AddStaticVehicle(476,info[0],info[1],info[2],info[3],35,35);
- PutPlayerInVehicle(playerid,jazz,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(jazz,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_DOWN)
- {
- GetVehicleVelocity(jazz,info[4],info[5],info[6]);
- GetVehiclePos(jazz,info[0],info[1],info[2]);
- GetVehicleZAngle(jazz,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(jazz);
- jazz = AddStaticVehicle(429,info[0],info[1],info[2],info[3],35,35);
- PutPlayerInVehicle(playerid,jazz,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(jazz,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_UP)
- {
- GetVehicleVelocity(jazz,info[4],info[5],info[6]);
- GetVehiclePos(jazz,info[0],info[1],info[2]);
- GetVehicleZAngle(jazz,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(jazz);
- jazz = AddStaticVehicle(522,info[0],info[1],info[2],info[3],35,35);
- PutPlayerInVehicle(playerid,jazz,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(jazz,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_SUBMISSION)
- {
- if(invisible == 1)
- {
- LinkVehicleToInterior(jazz,0);
- invisible = 0;
- return 1;
- }
- if(invisible == 0)
- {
- LinkVehicleToInterior(jazz,1);
- invisible = 1;
- return 1;
- }
- }
- }
- //Ratchet
- if (IsPlayerInVehicle(playerid,ratchet))
- {
- if (newkeys & KEY_ANALOG_LEFT)
- {
- GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- GetVehiclePos(ratchet,info[0],info[1],info[2]);
- GetVehicleZAngle(ratchet,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ratchet);
- ratchet = AddStaticVehicle(446,info[0],info[1],info[2],info[3],104,104);
- PutPlayerInVehicle(playerid,ratchet,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_RIGHT)
- {
- GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- GetVehiclePos(ratchet,info[0],info[1],info[2]);
- GetVehicleZAngle(ratchet,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ratchet);
- ratchet = AddStaticVehicle(476,info[0],info[1],info[2],info[3],104,104);
- PutPlayerInVehicle(playerid,ratchet,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_DOWN)
- {
- GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- GetVehiclePos(ratchet,info[0],info[1],info[2]);
- GetVehicleZAngle(ratchet,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ratchet);
- ratchet = AddStaticVehicle(470,info[0],info[1],info[2],info[3],104,104);
- PutPlayerInVehicle(playerid,ratchet,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_UP)
- {
- GetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- GetVehiclePos(ratchet,info[0],info[1],info[2]);
- GetVehicleZAngle(ratchet,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ratchet);
- ratchet = AddStaticVehicle(468,info[0],info[1],info[2],info[3],104,104);
- PutPlayerInVehicle(playerid,ratchet,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ratchet,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_SUBMISSION)
- {
- if(invisible == 1)
- {
- LinkVehicleToInterior(ratchet,0);
- invisible = 0;
- return 1;
- }
- if(invisible == 0)
- {
- LinkVehicleToInterior(ratchet,1);
- invisible = 1;
- return 1;
- }
- }
- }
- //Ironhide
- if (IsPlayerInVehicle(playerid,ironhide))
- {
- if (newkeys & KEY_ANALOG_LEFT)
- {
- GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- GetVehiclePos(ironhide,info[0],info[1],info[2]);
- GetVehicleZAngle(ironhide,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ironhide);
- ironhide = AddStaticVehicle(446,info[0],info[1],info[2],info[3],2,2);
- PutPlayerInVehicle(playerid,ironhide,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_RIGHT)
- {
- GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- GetVehiclePos(ironhide,info[0],info[1],info[2]);
- GetVehicleZAngle(ironhide,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ironhide);
- ironhide = AddStaticVehicle(476,info[0],info[1],info[2],info[3],2,3);
- PutPlayerInVehicle(playerid,ironhide,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_DOWN)
- {
- GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- GetVehiclePos(ironhide,info[0],info[1],info[2]);
- GetVehicleZAngle(ironhide,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ironhide);
- ironhide = AddStaticVehicle(557,info[0],info[1],info[2],info[3],2,3);
- PutPlayerInVehicle(playerid,ironhide,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_ANALOG_UP)
- {
- GetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- GetVehiclePos(ironhide,info[0],info[1],info[2]);
- GetVehicleZAngle(ironhide,info[3]);
- GetVehicleModel(model);
- DestroyVehicle(ironhide);
- ironhide = AddStaticVehicle(468,info[0],info[1],info[2],info[3],2,3);
- PutPlayerInVehicle(playerid,ironhide,0);
- PlayerPlaySound(playerid,1133,0,0,0);
- SetVehicleVelocity(ironhide,info[4],info[5],info[6]);
- }
- if (newkeys & KEY_SUBMISSION)
- {
- if(invisible == 1)
- {
- LinkVehicleToInterior(ironhide,0);
- invisible = 0;
- return 1;
- }
- if(invisible == 0)
- {
- LinkVehicleToInterior(ironhide,1);
- invisible = 1;
- return 1;
- }
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment