Jump to content

Please help.


Hazard|

Recommended Posts

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

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