Jump to content

[Help]ElementModel


BulgariaRoam

Recommended Posts

function StuntCountDownFinish()

    for i, p in ipairs(getAlivePlayersInArena(getElementID(source))) do 
    
        if getPedOccupiedVehicle(p) then
            setElementFrozen(getPedOccupiedVehicle(p), false)
            setVehicleDamageProof(getPedOccupiedVehicle(p), false)
        end

        toggleAllControls(p, true)
        bindKey(p, "enter", "down", "suicide")
        end
        if ( getElementModel (p, localVehicle) == 411 ) then
        toggleControl (p, "handbrake", false)
    end

end

i try alot of possibility but none seems to work for me.

anyone know how i can disable hanbreak if the vehicle is infernus?

Link to comment
function StuntCountDownFinish()

    for i, p in ipairs(getAlivePlayersInArena(getElementID(source))) do 
    
        if getPedOccupiedVehicle(p) then
            setElementFrozen(getPedOccupiedVehicle(p), false)
            setVehicleDamageProof(getPedOccupiedVehicle(p), false)
        end
        toggleAllControls(p, true)
        toggleControl (p, "handbreak", false )
        bindKey(p, "enter", "down", "suicide")
    end

end

if i toggle control to disable hanbreak it disable for all vehicle, if i want to disable only when vehicle infernus not working

Link to comment

clearly wont work, try this:

function StuntCountDownFinish()

    for i, p in ipairs(getAlivePlayersInArena(getElementID(source))) do 
    
        if getPedOccupiedVehicle(p) then
            setElementFrozen(getPedOccupiedVehicle(p), false)
            setVehicleDamageProof(getPedOccupiedVehicle(p), false)
        end

        toggleAllControls(p, true)
        bindKey(p, "enter", "down", "suicide")
        end
        for i, p in ipairs(getAlivePlayersInArena(getElementID(source))) do 
    
        if getPedOccupiedVehicle(p) then
        if ( getElementModel (getPedOccupiedVehicle(p), localVehicle) == 411 ) then
          toggleControl (p, "handbrake", false)
        end
        end
    end

end

 

  • Thanks 1
Link to comment

oh my god dude you are the boss!

2 minutes ago, [MTA]Weed said:

clearly wont work, try this:


function StuntCountDownFinish()

    for i, p in ipairs(getAlivePlayersInArena(getElementID(source))) do 
    
        if getPedOccupiedVehicle(p) then
            setElementFrozen(getPedOccupiedVehicle(p), false)
            setVehicleDamageProof(getPedOccupiedVehicle(p), false)
        end

        toggleAllControls(p, true)
        bindKey(p, "enter", "down", "suicide")
        end
        for i, p in ipairs(getAlivePlayersInArena(getElementID(source))) do 
    
        if getPedOccupiedVehicle(p) then
        if ( getElementModel (getPedOccupiedVehicle(p), localVehicle) == 411 ) then
          toggleControl (p, "handbrake", false)
        end
        end
    end

end

 

oh my god dude, you are a boss!

works!!!!!

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...