Jump to content
MakeWebGames

Recommended Posts

Posted

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]";
Posted

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?

Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...