Jump to content

setElementHealth and getElementHealth


Recommended Posts

Im trying to create a script that you gain + 25 health but it isnt working i got attempt to perform arithemetic on a boolean value

  
  
function health1(localPlayer) 
outputChatBox("test") -- made this to check if the function self was working and it does 
setElementHealth ( source,  getElementHealth ( source) + 25 ) 
end 
addCommandHandler("healme",health1) 
  

Link to comment

Try this please

  
function health1(localPlayer) 
outputChatBox("test") -- made this to check if the function self was working and it does 
setElementHealth ( localPlayer, getElementHealth(localPlayer) + 25 ) 
end 
addCommandHandler("healme",health1) 
  
  

Link to comment
  
  
function health1(tPlayer) 
outputChatBox("test") -- made this to check if the function self was working and it does 
setElementHealth ( tPlayer,  getElementHealth ( tPlayer) + 25 ) 
end 
addCommandHandler("healme",health1) 
  

There is no source on addCommandHandler.

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