Mr-Scripts Posted December 18, 2012 Posted December 18, 2012 (edited) A Player has pointed out that if you are banned on my game and start again and revive that account it becomes unbanned ( credit option ) bu what can i add to my exsiting code to prevent this }} elseif($type==3){ $reviveuser = $_POST['reviveuser']; if($fetch->points < 1000){ echo " <table border=0 bordercolor=black align=center cellpadding=2 cellspacing=0><tr><td class=notice align=center><center><font color=red>You do not have enough credits to revive $reviveuser!</td></tr></table><br>"; } elseif($fetch->points >= 1000){ $query = mysql_query("SELECT * FROM users WHERE username='$reviveuser'"); $rows = mysql_num_rows($query); $userdata = mysql_fetch_object($query); if ($rows == "0"){ echo " <table border=0 bordercolor=black align=center cellpadding=2 cellspacing=0><tr><td class=notice align=center><center>The username entered to revive is invalid."; }else{ if ($userdata->status == "Alive"){ echo " <table border=0 bordercolor=black align=center cellpadding=2 cellspacing=0><tr><td class=notice align=center><center>That user is still alive!"; }else{ mysql_query("UPDATE users SET status='Alive',health='100' WHERE username='$reviveuser'"); mysql_query("UPDATE users SET points=points-1000 WHERE username='$username'"); mysql_query("INSERT INTO `spentcredits` (`id`, `username`, `product`, `cost`, `date`) VALUES ('', '$username', 'Revive - $reviveuser', '1000','$date')"); echo " <table border=0 bordercolor=black align=center cellpadding=2 cellspacing=0> <tr><td class=notice align=center><center><font color=green>You have revived $reviveuser they can now continue playing!</td> </tr> </table><br>"; }}}} Edited December 18, 2012 by Mr-Scripts Quote
Mr-Scripts Posted December 19, 2012 Author Posted December 19, 2012 can i duplicate the line and change alive to banner or can i have ALive or banned on the same line ( 11) 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.