DakiLLa Posted January 17, 2009 Posted January 17, 2009 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 ?
[DKR]silverfang Posted January 17, 2009 Posted January 17, 2009 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
[DKR]silverfang Posted January 17, 2009 Posted January 17, 2009 i have set it on server side Copy of the code so we can see where it might go wrong?
DakiLLa Posted January 18, 2009 Author Posted January 18, 2009 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...
[DKR]silverfang Posted January 18, 2009 Posted January 18, 2009 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...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now