Jump to content

Help Destroir


Recommended Posts

Posted

After creating aio player out of the car and create another is on the map has the destroir another

function VeiculoVIP() 
    if not isElementInWater(source) then 
        local x, y, z = getElementPosition (source) 
        local carro = createVehicle ( 411, x, y, z ) 
        warpPedIntoVehicle ( source, carro ) 
    end 
end 
addEvent("VeiculoVIP", true) 
addEventHandler("VeiculoVIP", root, VeiculoVIP) 

Posted

Store the vehicle elements on a table, and use the player element as index, then when he's going to spawn a vehicle, check if he has a car spawned and if so, destroy it.

Posted

Define a table:

-- Global ( outside any function )

local vehicles = { } 

-- Inside your creation function:

vehicles [ client ] = createVehicle ( arguments ) 

Then you can check if exists a vehicle with:

isElement 

Posted

not to understand still makes me script and passes

function VeiculoVIP() 
    if not isElementInWater(source) then 
        local x, y, z = getElementPosition (source) 
        local carro = createVehicle ( 411, x, y, z ) 
        warpPedIntoVehicle ( source, carro ) 
    end 
end 
addEvent("VeiculoVIP", true) 
addEventHandler("VeiculoVIP", root, VeiculoVIP) 

Posted

Well, then you better start learning, because in this section we help you with your scripting problems, we don't make things for you.

Posted

Man I swear I do not know so please put the min line to foul so it does not even know why I swear. so for destroir the car when the player out of it, or create another

unction VeiculoVIP() 
    if not isElementInWater(source) then 
        local x, y, z = getElementPosition (source) 
        local carro = createVehicle ( 411, x, y, z ) 
        warpPedIntoVehicle ( source, carro ) 
    end 
end 
addEvent("VeiculoVIP", true) 
addEventHandler("VeiculoVIP", root, VeiculoVIP) 

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