Jump to content
MakeWebGames

Recommended Posts

Posted

I have 'Streets.php' this was an upgraded mod i've had for years. One problem though, when they find something good they can just refresh the page an get it over & over again. What can i do to stop this?

I've tried

{

die ("Error, you cannot refresh or go back on the streets, please use a side link to go somewhere else.<br />

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

}

Doesn't work.. Help Please :D

Posted

This is a snippet of code I got from slotmachine.php from mccodes. You'll hve to edit it to work for you but this should help you out

$_GET['tresde']=abs((int) $_GET['tresde']);
if(($_SESSION['tresde'] == $_GET['tresde']) || $_GET['tresde']<100)
{
die ("Error, you cannot refresh or go back on the slots, please use a side link to go somewhere else.<br />
<a href='slotsmachine.php?tresde=$tresder'>> Back</a>");
}
$_SESSION['tresde']=$_GET['tresde'];
Posted

Check their number of steps before this die?

Also chicka, that would only work if you link it like this:

 

$randnum = mt_rand(1,1000); //Not sure what numbers it is
<a href='steets.php?tresde='$randnum'>Streets</a>

You would need to generate that random number first.

Posted
Check their number of steps before this die?

Also chicka, that would only work if you link it like this:

 

$randnum = mt_rand(1,1000); //Not sure what numbers it is
<a href='steets.php?tresde='$randnum'>Streets</a>

You would need to generate that random number first.

yes your right... I just took a piece of code from roulette and posted it here to give him some idea as to how to do it..

Posted

Dahm, still not working. I tried with the

 

$_GET['tresde']=abs((int) $_GET['tresde']);

if(($_SESSION['tresde'] == $_GET['tresde']) || $_GET['tresde']<20)

{

die ("Error, you cannot refresh or go back on the streets, please use a side link to go somewhere else.

<a href='streets.php?tresde=$tresder'>> Back</a>");

}

$_SESSION['tresde']=$_GET['tresde'];

Don't work. :(

Posted

I agree with SomeRandomBastard....shouldn't the outcome be based off a random variable ?...that way if a player refreshes the outcome would be random each time...

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