justgabri Posted June 15, 2019 Posted June 15, 2019 Hi, i am creating a seatbelt script, but i have a problem. I am using this to force the player stay in the vehicle when seatbelt is on, but it doesn't work. Some ideas? mp.game.controls.disableControlAction(0, 75, true);
robearded Posted June 15, 2019 Posted June 15, 2019 You need to do it inside render function, else it will disable the control action only for that specific frame https://wiki.rage.mp/index.php?title=Controls::disableControlAction
justgabri Posted June 15, 2019 Author Posted June 15, 2019 Fine, now works! But, i have another problem now. I am trying to stream sounds when the player press the key for the seatbelt. I am using this method, but it doesn't work. function playSounds(file) { Audio = new Audio(file); Audio.volume = 1; Audio.play(); } And then this to call the function: playSounds("html/sounds/buckle.ogg");
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