I'm a beginner lua developer, but I have a background in javascript.
I want when the player types health his health becomes 100% and he gets 150 taken freom his money, else if he don't have 150 his health doesn't become 100% but an outputChatBox gets printed.
this is what I ended up to
local money = getPlayerMoney(thePlayer)
if (money > 150) then
takePlayerMoney ( thePlayer, tonumber(150) )
setElementHealth ( thePlayer, getElementHealth(thePlayer) + 100 )
else
outputChatBox("You need 150coins.", thePlayer)
end
Question
A3kri
Hello ..
I'm a beginner lua developer, but I have a background in javascript.
I want when the player types health his health becomes 100% and he gets 150 taken freom his money, else if he don't have 150 his health doesn't become 100% but an outputChatBox gets printed.
this is what I ended up to
sorry for my noobishness x.x
Link to comment
1 answer to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now