Jump to content
MakeWebGames

[MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight


Recommended Posts

Posted

This will stop your users from Refreshing pages or Opening new pages when they are in a fight...

add this near the bottom of your attack.php before the $h->endpage();

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

If a page is Refreshed they will be back straight into the fight with their opponent.

Posted

Re: [MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight

thanks illusions but when i added this exactly how you said to the refresh part works but i can still leave the fight by clicking on a link to a different page

Posted

Re: [MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight

Im assuming your game from the attack.php shows the header and mainmenu You can defeat this by opening globals.php change header.php to header2.php also change the file globals to globals2.php in your attack.php change include "globals.php"; to include "globals2.php"; open header.php and remove any parts that will display mainmenu or the players stats links and rename file header2.php goto viewuser.php and rename attack.php to attack2.php

Your users dont have any links to click on now.

Posted

Re: [MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight

or if u cba doing that lol add the mod that makes users lose all there exp when they walk away from a fight that should teach em lol

  • 2 weeks later...
Posted

Re: [MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight

Tried going about this adding it to events with no joy, anyone wish to put some input to help me on my way?

Posted

Re: [MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight

You should redirect (302) the user after each form post.

That way, the post does the "attack", then it redirects to the results page.

If the user refreshes, they will just refresh the results page (so they can refresh all they want)

  • 2 weeks later...
Posted

Re: [MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight

I'm sorry, but this does not work for me. The message just pops up under the rest of the attack screen. Any ideas?

  • 1 month later...

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