Wojak Posted September 29, 2009 Share Posted September 29, 2009 I have wrote this client side script: local ncPla = getLocalPlayer ( ) function dela() setTimer ( nocol, 5000, 1 ) outputConsole("1") end function nocol() local vehcol = getPedOccupiedVehicle ( ncPla ) outputConsole("2") setElementCollisionsEnabled(vehcol, false) setElementAlpha(vehcol, 125) outputConsole("3") setTimer ( colon, 30000, 1 ) outputConsole("4") end function colon() local vehcol = getPedOccupiedVehicle ( ncPla ) outputConsole("5") setElementCollisionsEnabled(vehcol, true) setElementAlpha(vehcol, 255) outputConsole("6") end addEventHandler ( "onClientPlayerSpawn", getRootElement(), dela ) The problem is: when the collision is turned off, the gravity is set to 0 (the vehicle is flying). How to fix this bug? When the collision and alpha are back to normal, the gravity is set to normal ass well… And the other thing: I want this script to be executed after the race countdown displays GO. Is there a way to do that without editing race resource? Link to comment
DakiLLa Posted September 29, 2009 Share Posted September 29, 2009 ehm..you could just do /ghostmode and it will be turned off / on, or set collisions enabling/disabling in map settings. Link to comment
Wojak Posted September 29, 2009 Author Share Posted September 29, 2009 I want to disable collision only for first 30 seconds, after the map starts, the races with no collisions are boring, but the start in the race mode is a killer… edit: Ok. problems solved. DaK gave me an idea how to bypass the first problem Thanks DaK as for the second problem, I’ve add a triggerclientevent line to the race resource. Now everything works like I want to, but I’ll be 100% sure after the public test… Link to comment
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