Jump to content

I need armor regeneration when standing script, please :)


Yazir

Recommended Posts

Posted

This isn't a request forum, you must learn to make it by yourself or pay someone to do it for you.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Ill give an example:

setTimer( 
    function () 
        setElementHealth ( localPlayer, ( getElementHealth ( localPlayer ) + 0.05 ) ) 
    end,100,0) 
  

This is healthregeneration, i need armor now. Please...

Posted
Ill give an example:

This is healthregeneration, i need armor now. Please...

Just replace set/getElementHealth to set/getPedArmor.

set armor is a server side function |: .

  

Posted

Please, help me these didn't worked well:

setTimer( 
    function () 
        setPlayerArmor ( localPlayer, ( getPedArmor ( localPlayer ) + 10 ) ) 
    end,100,0) 
  

setTimer( 
    function () 
        setPedArmor ( localPlayer, ( getPedArmor ( localPlayer ) + 10 ) ) 
    end,100,0) 
  

Posted
function regenArmor() 
    for _,player in ipairs(getElementsByType("player")) do 
        local arm = getPedArmor(player); 
        if arm < 100 then 
            local nuarm = arm + 10; 
            if nuarm > 100 then nuarm = 100; end 
            setPedArmor(player,nuarm) 
        end 
    end 
end 
setTimer(regenArmor,5000,0); 

There you go, now fuck off and learn properly so you don't have to waste our time and your own time in future.

Edit: Please bare in mind that this is a server script.

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