chavdave Posted July 10, 2013 Posted July 10, 2013 Free to Use File inclucdes ddrewards.php dailypoints.php starter.php and install.txt Enjoyhttps://www.dropbox.com/s/kp4jyabfmckwxhl/gprgmods.zip Quote
MNG Posted July 10, 2013 Posted July 10, 2013 Nice, I will put this on my site you saved me some time. Quote
MNG Posted July 10, 2013 Posted July 10, 2013 <?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. Quote
KyleMassacre Posted July 10, 2013 Posted July 10, 2013 how about possibly adding all those queries into 1? Quote
MNG Posted July 10, 2013 Posted July 10, 2013 <?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>"; Quote
jcvenom Posted July 11, 2013 Posted July 11, 2013 <?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 Quote
NationGamer Posted July 14, 2013 Posted July 14, 2013 (edited) 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 July 14, 2013 by NationGamer Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.