Jump to content
MakeWebGames

Attacking Online?


Naffer20

Recommended Posts

Assuming your using mccodes in attack.php try

if($r['laston'] >= time()-15*60)

{

print "You cannot players that are online.<br />

<a href='index.php'>> Back</a>";

$h->endpage();

$_SESSION['attacking']=0;

$ir['attacking']=0;

$db->query("UPDATE users SET attacking=0 WHERE userid=$userid");

exit;

}

 

If you get any problems give me a shout and will see what I can do :)

Link to comment
Share on other sites

$_SESSION['attacking']=0;
$ir['attacking']=0;
$db->query("UPDATE users SET attacking=0 WHERE userid=$userid");

There's no need for this.

If he's trying to stop them from attacking at all, putting the previously given conditionals at the beginning of the file will do exactly what he wants.

The fact that it's "not working" means he obviously doesn't know where it goes.

In which case, I must ask, why is this guy working on the code at all?

Order of operations applies to more than just math.

Link to comment
Share on other sites

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