Jump to content
MakeWebGames

jcvenom

Members
  • Posts

    575
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by jcvenom

  1. i think its supposed to be $h->endpage(); $exit();
  2. HauntedDawg i have to say well done you have proved me wrong with all my respect sorry for acting like a dickhead :) maybe we can be friends?
  3. ctype_alnum checks if all the characters in your desired string are alphanumeric while ctype_digit() checks for numeric characters
  4. i just took a look but seriously in my case i don't need to use sprint f or ctype_digit()
  5. can you show me what is the problem guy's you need to show me your examples
  6. Try this *untested* <?php include "globals.php" $zero=0; switch ($_GET['action']) { case 'hosp': hosp(); break; default: index(); break; } function index() { echo "<a href='hospitalPayOut.php?action=hosp'><p>Get out of hospital for 10,000?</p></a>"; } function hosp() { if ($ir['hospital'] && $ir['money']== 10000) { $db->query("UPDATE `users` SET money=money - 10000, hospital=0 WHERE userid={$_SESSION['userid']}"); event_add($ir['userid'],"You paid $10,000 to get out of hospital",$c); echo "<h2>Success You have been Released From hospital</2><br /> <a href='index.php'>Back</a>"; $h->endpage(); } else if ($ir['hospital']== $zero) { die ( "You are not in hospital"); exit(); $h->endpage(); } else if ($ir['money'] > 10000) { die("You do not have enough Cash") exit(); $h->endpage(); } else { echo ""; } ?>
  7. lol thanks for pointing this out
  8. nice hydra also pm if we have anothor team project im currently working on modernearth.co.uk for a client of mine
  9. your right i could have used it
  10. is there anything wrong with using if(!$_GET['step']) but then the sprintf is not a bad idea but as venom said i don't use it really, i usually use database($db->query instead of sprintf
  11. ok i get you know but either one will work
  12. why would you use $_GET['step'] = sprintf("%s",$_GET['step']);   when if(!$_GET['step']) is basically the same
  13. i rather use if(!$_GET['step'])   than sprinf
  14. opps its mean to be ir
  15. thanks sniko i will consider the options
  16. Note you can add more steps such as donator packs etc And you can add to your donation page credits or wait till i make the creditdonation - - - Updated - - - i will make credit donation page
  17. Ok since people want more from me i have created a new mod for credits which is my biggest mod for v2 so far here it is ok add this into Mysql alter table `users` add `credits` int(11) default'0'; Create a new file called cctrade.php then add this <?php /*Made by Jcvenom Do not resell this mod Do not claim making this mod*/ /*------------includes--------------*/ include "globals.php"; /*------------includes--------------*/ echo "<center><main>Credit Exchange</main><hr width = '75%'>"; if($ir['jail'] > 1 || $ir['hospital'] > 1) { echo "Sorry this page is not viewable while in jail or hospital!<hr width='75%'/>"; exit(); } if(!$_GET['step']) { echo "<br/> Welcome to the Credit exchange, you can come here to spend your credits on special items & gains such as </br /> will boost and much more! <main>If you don't have any Credits ? <a href='donate.php' target = '_blank'> <font color=brown>Click Here</font></a> to buy Credit Card<hr width = '75%'><table width = '75%' class = 'rounded'><tr><td align = 'center'> <table width = '95%' style = 'font-weight:800;'><tr bgcolor = '#999999'> You have <b>".number_format($ir['credits'])."</b> credits.<br/><br/><hr width = '75%'>"; echo "<table width = '75%' class = 'rounded'><tr><td align = 'center'> <table width = '95%' style = 'font-weight:800;'><tr bgcolor = '#999999'> <td align = 'left'><center><font color=white>Description</td><td align = 'left'><center><font color=white>Info</td><td align = 'left'><center><font color=white>Cost</td></tr> <tr class = 'evens'> <td align = 'left'>• <i>Xanax x 10<td align = 'left'><center> [<a href='cctrade.php?step=xanax'><font color=green>Buy</font></a>]</i></a></td> <td align = 'left'>2 Credits</td> </tr> <tr class = 'evens'> <td align = 'left'>• <i>Happy Boost (+2500)<td align = 'left'><center> [<a href='cctrade.php?step=happy'><font color=green>Buy</font></a>]</i></a></td> <td align = 'left'>6 Credits</td> </tr> <tr class = 'evens'> <td align = 'left'>• <i>Energy boost (+500)<td align = 'left'><center> [<a href='cctrade.php?step=booste'><font color=green>Buy</font></a>]</i></a></td> <td align = 'left'>8 Credits</td> </tr> </table> </td></tr></table> <hr width = '75%'>><a href='explore.php'>Back</a><hr width = '75%'>"; } else { if(!in_array($_GET['step'],array('xanax', 'happy', 'booste'))) { echo "Error, Bad request. <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; exit(); } else { if($_GET['step'] == 'xanax') { if(!$_POST['step']) { echo "<form action = 'cctrade.php?step=xanax' method = 'post'> Are you sure you wish to swap <b>2</b> credits for x10 Xanax?<br/> <input type = 'submit' name = 'step' value = 'Continue'> </form> <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; } else { if($ir['credits'] < 2) { echo "Sorry, You dont have enough credits to purchase x10 Xanax. <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; exit(); } else { $db->query("UPDATE `users` SET `credits`=`credits` - '2' WHERE userid=$userid"); $db->query("INSERT INTO inventory VALUES('',ITEMID-HERE,$userid,QUANTITY)"); event_add($ir['userid'],"Success, You have be credited x10 Xanax for 2 credits",$c); echo "Success, You have be credited x10 Xanax for 2 credits. <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; exit(); } } } else if($_GET['step'] == 'booste') { if(!$_POST['step']) { echo "<form action = 'cctrade.php?step=booste' method = 'post'> Are you sure you wish to swap <b>8</b> credits for 500 energy boost?<br/> <i>Note: This is <b><u>not</u></b> an item, You will recieve a 500 energy boost for a short time.</i><br/> <input type = 'submit' name = 'step' value = 'Continue'> </form> <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; } else { if($ir['credits'] < '8') { echo "Sorry, You dont have enough credits to purchase a energy boost. <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; exit(); } else { $db->query("UPDATE `users` SET `energy`=`energy` + '500` WHERE userid=$userid"); $db->query("UPDATE `users` SET `credits`=`credits` - '8' WHERE userid=$userid"); event_add($ir['userid'],"You have be credited with 500 energy boost for 8 credits",$c); echo "Success, You have be credited with 500 energy boost for 8 credits. <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; exit(); } } } else if($_GET['step'] == 'happy') { if(!$_POST['step']) { echo "<form action = 'cctrade.php?step=happy' method = 'post'> Are you sure you wish to swap <b>6</b> credits for 2500 happiness?<br/> <i>Note: This is <b><u>not</u></b> an item, You will recieve 2500 happy for a short time.</i><br/> <input type = 'submit' name = 'step' value = 'Continue'> </form> <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; } else { if($ir['credits'] < '6') { echo "Sorry, You dont have enough credits to purchase a happy boost. <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; exit(); } else { $db->query("UPDATE `users` SET `will`=`will` + '2500' WHERE userid=$userid"); $db->query("UPDATE `users` SET `credits`=`credits` - '6' WHERE userid=$userid"); event_add($ir['userid'],"You have be credited with 2500 happy for 6 credits",$c); echo "Success, You have be credited with 2500 happy for 6 credits. <hr width = '75%'>><a href='cctrade.php'>Back</a><hr width = '75%'>"; exit(); } } } else { echo ""; exit(); } } } $h->endpage(); ?> Then add this in globals.php $cc=money_formatter($ir['credits'],''); After add this into your header or menubar(As i have my bars in my menubar) or where ever suits you <b>Credits:</b> {$ir['credits']} <b><a href='cctrade.php'/>[use]</a></b><br /> or <b>Credits:</b> ".$ir['credits']." <b><a href='cctrade.php'/>[use]</a></b><br /> And your finished very simple mod Note you can add more steps such as donator packs etc And you can add to credits to your donation page or wait till i make the creditdonation
  18. nice rockwood
  19. my friend venom done your login :)
  20. i can code i didn't try css bars ever so im pretty new to that ok guys
  21. its not o google yet
  22. may i ask what you have there i 100% wrong number one you don't know my website name and my game is not hosted on it what you don't know is what i haven't said i am currently setting my host up and when its ready thats what i'm offering read first post
  23. dude wow you learned css bars ok well i didn't ok and this is what i worked out   $energy = $pl['my_energy'] / $pl['my_maxenergy'] * 100; <div class="meter"> <span style="width: <?php echo $energy; ?>%</span> </div> im not getting abusive its kind of the other way around im trying my best and if you can't accept me on forums im out
×
×
  • Create New...