You could use a timer to check continuously:
[lua]
timer.Create( "FireExtinguisher", 2, 0, function()
for k, v in pairs( players.GetAll() ) do
if v:IsOnFire() then
v:Extinguish()
end
end
end )
[/lua]
Or you could use the think hook:
[lua]
hook.Add( "Think", "FireExtinguisher", function()
for k, v in pairs( players.GetAll() ) do
if v:IsOnFire() then
v:Extinguish()
end
end
end )
[/lua]
Sorry, you need to Log In to post a reply to this thread.