BabyBear Posted July 27, 2011 Posted July 27, 2011 Is there a way in scripting to make spike strips, for police? If anyone has made them, can you please give me a link to download. If there hasn't been any made, can someone do it? -BabyBear
Jaysds1 Posted July 27, 2011 Posted July 27, 2011 SAES made one... I don't know the spike strips id but i'll give you the script: function spike() local vehicle = getPedOccupiedVehicle(source) if (getElementType("vehicle")) then setVehicleWheelStates(vehicle,1,1,1,1) end end My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Faw[Ful] Posted July 27, 2011 Posted July 27, 2011 You have to create the object with a colshape, you can get the object position and give the same position for the colshape and the event onColshapeHit + the onClientRender, you can do this with a marker also. =Benox50= My Youtube Channel
Jaysds1 Posted July 27, 2011 Posted July 27, 2011 He should be able to figure out the rest of the script... My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Oz. Posted July 27, 2011 Posted July 27, 2011 ID 2892 'temp_stinger' is the one the police use in Single Player. Looks like there's also 1593 'plc_stinger', although temp_stinger looks better.
Jaysds1 Posted July 27, 2011 Posted July 27, 2011 (edited) ok, I'll make a full script.. here: addCommandHandler("sting", function(player) if (player) then local x, y, z = getElementPosition(player) spike = createObject(2892,x+2,y+2,z-1) local x2, y2, z2 = getElementPosition(spike) blow = createColRectangle(x2, y2, z2, 3.0,3.0) if (getElementType("vehicle")) then local pveh = getPedOccupiedVehicle(player) if (getVehicleWheelStates(pveh) == false) then setVehicleWheelStates(pveh,1,1,1,1) elseif (getVehicleWheelStates(pveh) == 1,1,1,1) then setVehicleWheelStates(pveh,2,2,2,2) end end end end) EDIT: Thanks... Edited July 27, 2011 by Guest My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Twisted Posted July 27, 2011 Posted July 27, 2011 i see an error already jaysds1 all i have to say is nice fail
Castillo Posted July 27, 2011 Posted July 27, 2011 addCommandHandler("sting", function(player) if (player) then local x, y, z = getElementPosition(player) local spike = createObject(2892,x+2,y+2,z-0.6) local x2, y2, z2 = getElementPosition(spike) local blow = createColSphere(x2, y2, z2, 3) addEventHandler("onColShapeHit",blow,function (player) if player and getElementType(player) == "player" then if isPedInVehicle(player) then local pveh = getPedOccupiedVehicle(player) setVehicleWheelStates(pveh,1,1,1,1) end end end) end end) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Jaysds1 Posted July 27, 2011 Posted July 27, 2011 Thanks for editing it for me... i really don't know what I'm doing rite now... My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now