_Ricky_ Posted January 12, 2009 Posted January 12, 2009 i got people attacking people that has less that half health anyone know anything about that? Quote
Delete-please Posted January 13, 2009 Posted January 13, 2009 Re: attack problems People can attack people with low health unless its 1 health or below Find this line in attack.php else if ($odata['hp'] < 5) { print "You can only attack those who have health"; Replace with else if ($odata['hp'] < 50)// change this number to the health limit you want { print "You can only attack those who have health"; also find this line if($odata['hp'] == 1) { print "This player is unconscious. [url='index.php']> Back[/url]"; replace with if($odata['hp'] == health minimum here) { print "This player is unconscious. [url='index.php']> Back[/url]"; Quote
_Ricky_ Posted January 13, 2009 Author Posted January 13, 2009 Re: attack problems ok that will work for now but say when the users get up some more levels there health will be higher...any other possible way to set it at half health? Quote
Lithium Posted January 13, 2009 Posted January 13, 2009 Re: attack problems if ($odata['hp'] < $odata['maxhp']/2) { go away! we're closed or something } Quote
_Ricky_ Posted January 13, 2009 Author Posted January 13, 2009 Re: attack problems ok now my problem is...i added that in but when they attack they hit once....then it knocks them below half health and they hit again and it says cant attack because half health.... Quote
_Ricky_ Posted January 13, 2009 Author Posted January 13, 2009 Re: attack problems basicly i added this in..... else if ($odata['hp'] < $odata['maxhp']/2) { print "You can only attack those with half health. [url='index.php']Back[/url]"; $h->endpage(); exit; } but now when you click what weapon to attack with....then you hit them knock them below half health....then the half health comes up and makes you stop attacking which sends you back to main page and lose all exp Quote
_Ricky_ Posted January 13, 2009 Author Posted January 13, 2009 Re: attack problems nevermind...fixed Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.