Jump to content
MakeWebGames

small question? not sure if posible?


Nicholas

Recommended Posts

hi does anyone know how to make it so you cant play the game until you voted.

for example, you cant get on index, inventory, explore, jail, hospital, nothing... but voting page until you have voted for all voting sites?

just wondering if you was possible since ive had quite few players just register play for like 5 minutes max and just go and never come back...

reason why im asking is so, when new players come to the game and go i dont like this game after searching the game little bit, they have still voted and boosted my ranking up on the voting site board, if u know what i mean lol.

hopefully someone can help me out :)

Link to comment
Share on other sites

This is for the header.

Change the 5 to how ever many sites you have.

$block = $db->query(sprintf("SELECT `userid` FROM `votes` WHERE `userid` = %u",abs(@intval($ir['userid']))));
if($db->num_rows($block) < 5)
{
header('Location: voting.php');
}

 

Now they are stuck on the voting page LOL.

If you want to tell them why, add this to the voting,php

 

$block = $db->query(sprintf("SELECT `userid` FROM `votes` WHERE `userid` = %u",abs(@intval($ir['userid']))));
if($db->num_rows($block) < 5)
{
echo 'You can not leave this page until you have voted on all the sites.';
}

 

And there ya go.

Link to comment
Share on other sites

This is for the header.

Change the 5 to how ever many sites you have.

 
$block = $db->query(sprintf("SELECT `userid` FROM `votes` WHERE `userid` = %u",abs(@intval($ir['userid'])))); 
if($db->num_rows($block) < 5) 
{ 
header('Location: voting.php'); 
} 

 

Now they are stuck on the voting page LOL.

If you want to tell them why, add this to the voting,php

 

 
$block = $db->query(sprintf("SELECT `userid` FROM `votes` WHERE `userid` = %u",abs(@intval($ir['userid'])))); 
if($db->num_rows($block) < 5) 
{ 
echo 'You can not leave this page until you have voted on all the sites.'; 
} 

 

And there ya go.

umm... where abouts do you add these on header and voting pages?
Link to comment
Share on other sites

in header add after

 

if(!$ir['email'])
{
global $domain;
die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID.");
}

 

in voting just add where you want it to show, like at top after global

Though i did just think about somethign, that wont work, it will send them into a endless loop lol.

so try this on header

 

$block = $db->query(sprintf("SELECT `userid` FROM `votes` WHERE `userid` = %u",abs(@intval($ir['userid'])))); 
$page = "/voting.php";
if($db->num_rows($block) < 5 && $_SERVER['SCRIPT_NAME'] != $page) 
{ 
header('Location: voting.php'); 
}

 

This is untested of course.

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