Jump to content

Destructionderby


Sex*

Recommended Posts

Im getting this errors, script is working but lagging the server:

01009519855d708.jpg

The 914 line function:

function distanceFromPlayerToCheckpoint(player, i) 
        local checkpoint = g_Checkpoints[i] 
        local x, y, z = getElementPosition(player) 
        return getDistanceBetweenPoints3D(x, y, z, unpack(checkpoint.position)) 
end 

Link to comment
function distanceFromPlayerToCheckpoint ( player, i ) 
    local checkpoint = g_Checkpoints [ i ] 
    if ( checkpoint ) then 
        local x, y, z = getElementPosition ( player ) 
        return getDistanceBetweenPoints3D ( x, y, z, unpack ( checkpoint.position ) ) 
    end 
end 

Link to comment
function distanceFromPlayerToCheckpoint ( player, i ) 
    local checkpoint = g_Checkpoints [ i ] 
    if ( checkpoint ) then 
        local x, y, z = getElementPosition ( player ) 
        return getDistanceBetweenPoints3D ( x, y, z, unpack ( checkpoint.position ) ) 
    end 
end 

Still having errors...

Link to comment
function distanceFromPlayerToCheckpoint ( player, i ) 
    local checkpoint = g_Checkpoints [ i ] 
    if ( checkpoint ~= nil ) then 
        local x, y, z = getElementPosition ( player ) 
        return getDistanceBetweenPoints3D ( x, y, z, unpack ( checkpoint.position ) ) 
    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...