Timer Transfer Variable Within Function

So I figured out my problem from earlier but I added a timer in and I came to another problem… How do I make it so that EntityAttacker and VehicleEntity work in the timer because at the moment the timer is not working…

[lua]function CarDamage( VehicleEntity, EntityWeapon, EntityAttacker, EntityDamage )
if ( VehicleEntity:IsVehicle() ) then
vehicle_number = VehicleEntity:EntIndex()
if (cars[vehicle_number].damage != nil) then
print( cars[vehicle_number].damage )
if ((cars[vehicle_number].damage - EntityDamage) < .0001) then
VehicleEntity:Ignite(10, 20)
timer.Create( “explodecar”, 6, 1, function()
local explode = ents.Create( “env_explosion” )
explode:SetPos( VehicleEntity:GetPos() )
explode:SetOwner( EntityAttacker )
explode:Spawn()
explode:SetKeyValue( “iMagnitude”, “120” )
explode:Fire( “Explode”, 0, 0 )
explode:EmitSound( “weapon_AWP.Single”, 400, 400 )
VehicleEntity:Remove()
end, VehicleEntity, EntityAttacker)
elseif( (cars[vehicle_number].damage - EntityDamage) > 0 ) then
print( cars[vehicle_number].damage )
cars[vehicle_number].damage = (cars[vehicle_number].damage - EntityDamage)
end
end
end
end[/lua]

[lua]function CarDamage( VehicleEntity, EntityWeapon, EntityAttacker, EntityDamage )
if ( VehicleEntity:IsVehicle() ) then
vehicle_number = VehicleEntity:EntIndex()
if (cars[vehicle_number].damage != nil) then
print( cars[vehicle_number].damage )
if ((cars[vehicle_number].damage - EntityDamage) < .0001) then
VehicleEntity:Ignite(10, 20)
timer.Create( “explodecar”, 6, 1, function()
local explode = ents.Create( “env_explosion” )
explode:SetPos( VehicleEntity:GetPos() )
explode:SetOwner( EntityAttacker )
explode:Spawn()
explode:SetKeyValue( “iMagnitude”, “120” )
explode:Fire( “Explode”, 0, 0 )
explode:EmitSound( “weapon_AWP.Single”, 400, 400 )
VehicleEntity:Remove()
end, VehicleEntity, EntityAttacker)
elseif( (cars[vehicle_number].damage - EntityDamage) > 0 ) then
print( cars[vehicle_number].damage )
cars[vehicle_number].damage = (cars[vehicle_number].damage - EntityDamage)
end
end
end
end[/lua]

Try that, otherwise I’m clueless.