iPrestege Posted April 12, 2013 Posted April 12, 2013 (edited) Hello Guys, What's the problem with this function "setElementHealth" the problem is if i have 10 health and i do this : CountSlap = 0 addCommandHandler("slap", function ( plr ) if CountSlap then setElementHealth ( plr, getElementHealth(plr) - 90 ); CountSlap = CountSlap -90 outputChatBox("True") else outputChatBox("False") end end ) i get +90 bug or? what's the fuck ? Edited April 12, 2013 by Guest
PaiN^ Posted April 12, 2013 Posted April 12, 2013 Not sure : CountSlap = 0 addCommandHandler("slap", function ( plr ) if CountSlap == 0 then setElementHealth ( plr, getElementHealth(plr) - 90 ); CountSlap = CountSlap - 90 outputChatBox("True"); else outputChatBox("False"); end end )
iPrestege Posted April 12, 2013 Author Posted April 12, 2013 The Same Problem i have 70 health i get full health !!
iPrestege Posted April 12, 2013 Author Posted April 12, 2013 What am trying to do? You dont know until now ? Am trying to take health form my self if i have 50 and i take 90 then kill me
TheIceman1 Posted April 12, 2013 Posted April 12, 2013 This? addCommandHandler("slap", function ( plr ) if getElementHealth(plr) =< 50 then setElementHealth ( plr, getElementHealth(plr) - 90 ); outputChatBox("True") else outputChatBox("False") end end )
iPrestege Posted April 12, 2013 Author Posted April 12, 2013 No Am Making A Panel With 10 Buttons Ok? And if i click that button let's say -50 health and i have 30 health ok? when i press the button i get full health
TheIceman1 Posted April 12, 2013 Posted April 12, 2013 No Am Making A Panel With 10 Buttons Ok? And if i click that button let's say -50 health and i have 30 health ok?when i press the button i get full health I dont understand what you want
iPrestege Posted April 12, 2013 Author Posted April 12, 2013 I Want same "lil_Today" Amdin panel "slap" part .
iPrestege Posted April 12, 2013 Author Posted April 12, 2013 Ah i know what's the problem now! the player health is 200 not 100 !! "Fixed By MySelf"
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