Jump to content

[Solved]Error in DM training/respawn script by arezu


Sora

Recommended Posts

arezu

do you mean this file ?

visibility.lua

and if you mean it then what i should do with this ?

because i changed setElementAlpha to setElementDimension and the script spawning who press space to the sea

i think because script set his Dimension to "0"

addEventHandler("onClientRender", getRootElement(), 
function() 
    local player = getElementsByType("player") 
    for i = 1, #player do 
        if(getElementData(player[i], "respawn.playing"))then 
            local alpha = 0 
            if(player[i] == getLocalPlayer())then 
                alpha = getElementData(player[i], "race.alpha") or 255 
            end 
            setElementAlpha(player[i], alpha) 
            local vehicle = getPedOccupiedVehicle(player[i]) 
            if(vehicle ~= false)then 
                setElementAlpha(vehicle, alpha) 
            end 
        end 
    end 
end) 

Link to comment
  • 3 weeks later...
arezu

do you mean this file ?

visibility.lua

and if you mean it then what i should do with this ?

because i changed setElementAlpha to setElementDimension and the script spawning who press space to the sea

i think because script set his Dimension to "0"

addEventHandler("onClientRender", getRootElement(), 
function() 
    local player = getElementsByType("player") 
    for i = 1, #player do 
        if(getElementData(player[i], "respawn.playing"))then 
            local alpha = 0 
            if(player[i] == getLocalPlayer())then 
                alpha = getElementData(player[i], "race.alpha") or 255 
            end 
            setElementAlpha(player[i], alpha) 
            local vehicle = getPedOccupiedVehicle(player[i]) 
            if(vehicle ~= false)then 
                setElementAlpha(vehicle, alpha) 
            end 
        end 
    end 
end) 

i fixeed it , thanks arezu ^^

addEventHandler("onClientRender", getRootElement(), 
function() 
    local player = getElementsByType("player") 
    for i = 1, #player do 
        if(getElementData(player[i], "respawn.playing"))then 
            local alpha = 0 
            if(player[i] == getLocalPlayer())then 
                alpha = getElementData(player[i], "race.alpha") or 255 
            end 
             setElementAlpha (player[i], alpha) 
            local vehicle = getPedOccupiedVehicle(player[i]) 
            if(vehicle ~= false)then 
                 setElementDimension(vehicle, 999) 
            end 
        end 
    end 
end) 
  
  

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