Jump to content

Why isnt it working?


Chris!i!

Recommended Posts

function checkLagger( bombIndex, duration ) 
    local bombIndex = tonumber( bombIndex ) or nil 
    local duration = tonumber( duration ) or nil 
  
    if ( bombIndex ) and ( duration ) then 
        local found = false 
  
        for index,projectile in ipairs( getElementsByType( "projectile" ) ) do 
            if ( index == bombIndex ) then 
                setProjectileCounter( projectile, duration * 50 )  
                        found = true 
                break 
  
        if ( not found ) then 
     
        outputChatBox( "Projectile with index " .. bombIndex .. " was not found.", 255, 0, 0, false ) 
end      
end 
end 
end 
end 
addEventHandler( "onClientResourceStart", getRootElement(), checkLagger ) 

function name doesnt matter.

I need this to be fixed.., whats wrong??

The grenade still bomb at the default MTA timer..

Link to comment
function checkLagger( duration ) 
for index,projectile in ipairs( getElementsByType( "projectile" ) ) do 
                setProjectileCounter( projectile, duration * 3243254 ) 
end      
end 
addEventHandler( "onClientResourceStart", getRootElement(), checkLagger )  

Tried this too, didnt work what is wrong?

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