Jump to content
MakeWebGames

Daily Reward [FREE]


Kakashi

Recommended Posts

First, in phpmyadmin, add this to your database:

ALTER TABLE `grpgusers` ADD `rated` int(20) NOT NULL default '1',
And in rollover.php, scroll right down and add this to the list...
`dailyreward` = '1'
Thirdly in classes.php, add this...

 

$this->notepad = $worked['notepad'];
If you don't know where to put this, you should put this just after "$this->marijuana = $worked['marijuana'];" (without the quotes).

Then create a file named "dailyreward.php", and add this code in:

<?php

include 'header.php';

if($user_class->jail > 0){

echo Message("You can't get your daily reward if you are in jail.");

include 'footer.php';

die();

}

if($user_class->hospital > 0){

echo Message("You can't get your daily reward if you are in the hospital.");

include 'footer.php';

die();

}

if ($_GET['claim'] == "reward"){

if($user_class->dailyreward == 1) {

$newpointstwo = $user_class->dailyreward - 1;

$resulttwo = mysql_query("UPDATE `grpgusers` SET `dailyreward`='".$newpointstwo."' WHERE `id`='".$_SESSION['id']."'");

$newpoints = $user_class->points + 15;

$result = mysql_query("UPDATE `grpgusers` SET `points`='".$newpoints."' WHERE `id`='".$_SESSION['id']."'");

$newpointsthree = $user_class->money + 5000;

$resultthree = mysql_query("UPDATE `grpgusers` SET `money`='".$newpointsthree."' WHERE `id`='".$_SESSION['id']."'");

echo Message("<center>Thanks for playing today. Have 15 points and $5000 bucks!</center>");

} else {

echo Message("<center>You have already recieved your daily grease, come back tomorrow.</center>");

}

}

?>

<tr><td class="contenthead">.: Daily Reward</td></tr>

<tr><td class="contentcontent">

<center>You can have a free reward once everyday.</center>

</tr></td>

<tr><td class="contentcontent">

<table align="center">

<tr>

<td>Claim Free Reward</td>

<td> - FREE!</td>

</tr>

</table>

</tr></td>

<?php

include 'footer.php';

?>

Thanks, any feedback is appreciated.
Link to comment
Share on other sites

  • 1 month later...

Try this...

 

Create dailyreward.php

 

You're unable to view this code.

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

 

Find this in rollover.php

You're unable to view this code.

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

and add

You're unable to view this code.

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

after

You're unable to view this code.

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

Save rollover.php

 

Open up classes.php and find

You're unable to view this code.

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

and add

You're unable to view this code.

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

below it, so it should look like this

 

You're unable to view this code.

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

 

Save classes.php

 

SQL

 

[mysql]ALTER TABLE `grpgusers` ADD `dailyreward` int(5) NOT NULL default="1",[/mysql]

And add

You're unable to view this code.

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

where ever you would want the link to be...

 

  • Like 1
Link to comment
Share on other sites

About this part in dailyreward.php

 

You're unable to view this code.

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

 

I have my script to where it doesn't use

You're unable to view this code.

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

so I just coded it to make it say inside the table (Don't know if I'm making sense) so if your game uses the

You're unable to view this code.

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

part just change the first code I mentioned to this

You're unable to view this code.

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

Link to comment
Share on other sites

  • 2 years 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...