Jump to content

setVehicleDamageProof lagg?


DakiLLa

Recommended Posts

hi. i have made a parking script, but there is one problem with setVehicleDamageProof function:

when player who was set damage proof state to "true" has quit the server, damage proof state automatically set to "false", so, everyone can blow up vehicle..

Well, as i think, this is function lag, and it's impossible to fix this..may be there are alternative ways to solve this problem, but i dont know, what to do...

Can anybody help ?

Link to comment
hi. i have made a parking script, but there is one problem with setVehicleDamageProof function:

when player who was set damage proof state to "true" has quit the server, damage proof state automatically set to "false", so, everyone can blow up vehicle..

Well, as i think, this is function lag, and it's impossible to fix this..may be there are alternative ways to solve this problem, but i dont know, what to do...

Can anybody help ?

Have you set the vehicleDamageProof in a client or server script, if client then it'll obviously unset when the client leaves the server

Link to comment
addEvent ( "setPasswordForLock", true, "passLockValue" ) 
addEventHandler ( "setPasswordForLock", g_root, 
    function ( passLockValue ) 
        local vehicle = getPlayerOccupiedVehicle ( source ) 
        setElementData ( vehicle, "password", passLockValue ) 
        setVehicleFrozen ( vehicle, true ) 
        setVehicleDamageProof ( vehicle, true ) 
        outputChatBox ( "Password "..passLockValue.." was set successfully!", source, 0, 255, 0 ) 
    end 
) 

This function triggers from client side with gui, i dont think that gui is important here...

Link to comment
addEvent ( "setPasswordForLock", true, "passLockValue" ) 
addEventHandler ( "setPasswordForLock", g_root, 
    function ( passLockValue ) 
        local vehicle = getPlayerOccupiedVehicle ( source ) 
        setElementData ( vehicle, "password", passLockValue ) 
        setVehicleFrozen ( vehicle, true ) 
        setVehicleDamageProof ( vehicle, true ) 
        outputChatBox ( "Password "..passLockValue.." was set successfully!", source, 0, 255, 0 ) 
    end 
) 

This function triggers from client side with gui, i dont think that gui is important here...

Maybe have a map file that saves the cars as objects so they are damage proof, it'll take a lot more coding though...

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