Jump to content
MakeWebGames

Recommended Posts

Posted

hey, anyone knows a way to stop users from attacking targets 10 levels lower AND higher than them ? found on the forums only a solution that stopped lower levels not higher.

ty

Posted

Re: question about attack

if (abs($ir['level'] - $r['level']) > 10) { echo "no hitting users more than 10 levels apart"; die($h->endpage()); }

Something along these lines is more than enough :)

Posted

Re: question about attack

sorry but its not working, now i cant even attack players same level as me.

Here's where ive put the code, maybe im wrong:

if($odata['hp'] == 1)
{
print "This player is unconscious.

[url='index.php']> Back[/url]";
$h->endpage();
$_SESSION['attacking']=0;
$ir['attacking']=0;
$db->query("UPDATE users SET attacking=0 WHERE userid=$userid");
exit;
}
else if (abs($ir['level'] - $r['level']) > 10) { echo "no hitting users more than 10 levels apart"; die($h->endpage()); }

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