Hazard| Posted June 27, 2014 Posted June 27, 2014 I'm working on a training script, and just got fixed some issues. Now I got new ones "-.- The problem is that when you do /ll with this code below, then it sets the alpha and the collide 1 sec AFTER you wrote /ll and it never goes back to normal alpha & collide. I want it to set the collide and alpha at the time you write /ll, then after 1 sec you wrote /ll then it sets the alpha back to normal and the collide normal. function TrainingLL() if not x then outputChatBox("(/LL) No locations saved.", source) else local car = getPedOccupiedVehicle(localPlayer) if not car then return end setElementPosition(car, x, y, z) setElementVelocity(car, vX, vY, vZ) setVehicleTurnVelocity(car,0,0,0) for index,vehicle in ipairs(getElementsByType("vehicle")) do setTimer(setElementCollidableWith, 1000, 1, vehicle, car, false) setTimer ( setElementAlpha, 1000, 1, car, 150, false) setElementHealth(car, health) setElementRotation(car, rx, ry, rz) setElementModel(car, model) outputChatBox("(/LL) Location loaded.", source) end end end addCommandHandler("LL", TrainingLL) addCommandHandler("ll", TrainingLL) could you please help? thx If you want a decent paid scripter, don't contact me, I suck.
Castillo Posted June 27, 2014 Posted June 27, 2014 That's a terrible idea, you are creating as many timers as vehicles there are, that's gonna be highly inefficient. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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