Jump to content

Spike Strips


BabyBear

Recommended Posts

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 by Guest
Link to comment
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) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...