Jump to content
MakeWebGames

Starter Pack and Daily rewards Free Mod


chavdave

Recommended Posts

<?php
if ($user_class->username){
$newsql = mysql_query("UPDATE `grpgusers` SET `claimed` = '1'  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET points=points+500  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET bank=bank+100000  WHERE `id`= '".$user_class->id."'");

echo Message("You claimed your starter pack.");
Send_Event($updates_user->id, "The owner has added $100,000 to your bank and given you 500 Points. Cheers!!!");
include 'footer.php';

die();
}

?>

 

My edit version, If a user claim the starter pack later in the game it will add to their money and points. As yours will update it to the value you setted to.

Link to comment
Share on other sites

<?php

include 'header.php';
if ($user_class->claimed > 0){

echo Message("You already claimed your reward.");

include 'footer.php';

die();

}
?>
<?php
if ($user_class->username){
$newsql = mysql_query("UPDATE `grpgusers` SET `claimed` = '1'  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET points=points+500  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET bank=bank+100000  WHERE `id`= '".$user_class->id."'");

echo Message("You claimed your starter pack.");
Send_Event($user_class->id, "The owner has added $100,000 to your bank and given you 500 Points. Cheers!!!");
include 'footer.php';

die();
}

?>

The events work on this as well, I notice Chav events didn't send an event.

Also as this in your header near the bottom

if ($user_class->claimed == 0){
		echo "<center><a href='starter.php'>You have not claimed your starter pack.</a></center>";
Link to comment
Share on other sites

<?php

include 'header.php';
if ($user_class->claimed > 0){

echo Message("You already claimed your reward.");

include 'footer.php';

die();

}
?>
<?php
if ($user_class->username){
$newsql = mysql_query("UPDATE `grpgusers` SET `claimed` = '1'  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET points=points+500  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET bank=bank+100000  WHERE `id`= '".$user_class->id."'");

echo Message("You claimed your starter pack.");
Send_Event($user_class->id, "The owner has added $100,000 to your bank and given you 500 Points. Cheers!!!");
include 'footer.php';

die();
}

?>

The events work on this as well, I notice Chav events didn't send an event.

Also as this in your header near the bottom

if ($user_class->claimed == 0){
		echo "<center><a href='starter.php'>You have not claimed your starter pack.</a></center>";
<?php
include 'header.php';
if ($user_class->claimed > 0){
echo Message("You already claimed your reward.");
include 'footer.php';
die();
}
else if ($user_class->username){
$newsql = mysql_query("UPDATE `grpgusers` SET `claimed` = '1'  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET points=points+500  WHERE `id`= '".$user_class->id."'");
$newsql = mysql_query("UPDATE `grpgusers` SET bank=bank+100000  WHERE `id`= '".$user_class->id."'");
   echo Message("You claimed your starter pack.");
Send_Event($user_class->id, "The owner has added $100,000 to your bank and given you 500 Points. Cheers!!!");
   include 'footer.php';

   die();
   }

?>

 

Also as this in your header near the bottom

if ($user_class->claimed == 0){
		echo "<center><a href='starter.php'>You have not claimed your starter pack.</a></center>";

 

edited from MNG

Link to comment
Share on other sites

replace $newsql with

 

$newsql = mysql_query("UPDATE `grpgusers` SET `claimed`='1', `points`=`points`+500, `bank`=`bank`+100000 WHERE `id='".$user_class->id."'");

 

like kyle said why would you need to put it in 3 lines just more unneeded code

Edited by NationGamer
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...