Jump to content

[HELP] not work corect


K4stic

Recommended Posts

then one player spawn the vehicle of that id's i need restart the script all time to be work

addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do 
            local model = getElementModel ( vehicle ) 
            if ( model == 411 ) or ( model == 495 ) then 
                setVehicleDamageProof ( vehicle, true ) 
            end 
        end 
    end 
) 

Edited by Guest
Link to comment
read better!
then one player spawn the vehicle of that id's i need restart the script all time to be work

ah... i really had to learn to read.

I' dont have better idea: you can edit the script, where players can spawn vehicles, to make them with those ids damage proof.

Or use an other event, like onVehicleStartEnter, with this event it would set the vehicle damage proof when a player starts to enter it.

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