Jump to content
MakeWebGames

shady9980

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

shady9980's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Pimp Whores Script ok got it to work, but was wondering if it was possible to make it so you can only have 10 x hookers, and make it print "Sorry, its 10 hookers each player" when people try to buy...
  2. Hello, I am trying to get this pimpwhores.php to work. Originally SniKo's work.   <?php include "globals.php"; $hprice= 50; // Price of your Hoes... $cashphoe= $hprice * 100; print" <h3>Welcome Pimp</h3> [i]Sign up today and pimp some whores![/i] "; print" You Currently Have a Total Of {$ir['thoes']} Hoes. "; switch($GET['action']) { case "cjoin": cjoin(); break; case "leave": leave(); break; case "buy": buy(); break; case "buyhoes": buyhoes(); break; case "buyconfirm": buyconfirm(); break; case "joinb": joinb(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; print " [url='{$_SERVER[']Join brothel And Buy Hoes[/url] [url='{$_SERVER[']Buy Extra Hoes[/url] [url='{$_SERVER[']Leave and loose all your hoes[/url] "; } function joinb() { global $db, $ir,$c,$userid,$h; print "So, you would like to join the brothel and buy some hoes? It costs [b]FREE[/b] to sign up and \$5000 for each hoe. From each hoe you gain \$100 a day [b]How many hoes would you like to buy? You need 1 To Join![/b] <form action='{$_SERVER['PHP_SELF']}?action=cjoin' method='post'> <input type=text name=hoes> <input type=submit value=submit> </form>"; } function cjoin() { global $db, $ir,$c,$userid,$h; if($ir['money'] < '$hprice') { print "<font color=red>Error!</font> You Dont Have Enough Cash, Sorry! [url='pimpwhores.php']Return to Brothel[/url] "; } elseif($ir['money'] > '$price') print "We have now taken your cash and you have now joined"; $db->query("UPDATE users SET money = money - 5000 WHERE userid = $userid"); $db->query("UPDATE users SET brotheljoin = 1 WHERE userid=$userid"); } function buy() { global $db, $ir,$c,$userid,$h; print "You can only buy one hoe a day, So would you like to buy a hoe today? [url='{$_SERVER[']Buy your hoe ($5000)[/url] "; } function buyhoes() { global $db, $ir,$c,$userid,$h; print "Buying A Hoe "; if($ir['money'] < '2000') { print "<font color=red>Error!</font> You dont have enough for the hoe you need 2000 dollars [url='index.php']Back Home[/url] "; } if($ir['money'] > '1999') { print "<font color=green>Success!</font> You buy a hoe for 2000 Dollars"; $db->query("UPDATE users SET money = money - 2000 WHERE userid = $userid"); $db->query("UPDATE users SET hoesbuy = 1 WHERE userid = $userid"); $db->query("UPDATE `users` SET money = money + totalhoes * 100 WHERE userid = $userid"); } if($ir['hoesbuy'] == 1) { print "<font color=red>Error!</font> You have already bought a hoe today!"; } } function leave() { global $db, $ir,$c,$userid,$h; print "Leaving Brothel "; if($ir['brotheljoin'] == '0') { print "<font color=red>Error!</font> You are not joined in the brothel [url='index.php']Back Home[/url] "; } if($ir['brotheljoin'] == '1') { print "<font color=green>Success!</font> You leave the brothel and you get rid of all your hoes"; $db->query("UPDATE users SET totalhoes = 0 WHERE userid = $userid"); $db->query("UPDATE users SET brotheljoin = 0 WHERE userid = $userid"); } } $h->endpage(); ?>   I have added these SQL's :   ALTER TABLE users ADD hoesbuy INT(11) DEFAULT 0; ALTER TABLE users ADD brotheljoin INT(11) DEFAULT 0; ALTER TABLE users ADD totalhoes INT(11) DEFAULT 0;   and put this into my cron 1 hour file :   $db->query('UPDATE users SET hoesbuy = 0 WHERE hoesbuy > 0 );   Everything works fine, when i load the file it shows the links etc but when i click any of them the site just refresh and nothing happens :S Anyone know why this happens? :) i think it has with the cases to do but im not sure :S
  3. Re: [mccode v2] Upgraded Brothel Tested this, and i get the links and all but when i click them the site just refresh and nothing happens :S
  4. Re: Show images help   aah cool :D its kinda what i where looking for, thou i dont think it will work in globals.php unless i do something i dont know how to do hehe.. :) But i will def try that out in header for fun :) ty
  5. Re: Show images help well i explained enough i think? "inside a table in globals.php" anyways thanks for trying :P
  6. Re: Show images help   Nothing. Just change the code in the header. Sp1d3r www.chaosrelic.com dude, then it wont show where i want it to show, wich is near the shoutbox.. and the shoutbox is placed in globals.php. you dig?
  7. Re: Show images help aah.. so i put if ($ir['jail']) { print '[url="jail.php"][img=jail.gif][/url]'; }   in header.php and what do i put into globals.php? (where i want the image to show when in jail).
  8. Re: Show images help gives this error : Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/user/public_html/gamename/globals.php on line 97 :(
  9. Re: Show images help   if($ir['jail'] { print([url='jail.php']<img src=jail.gif width=22 height=25>[/url])}   dont work either :S
  10. Re: Show images help yeah wich is the code i posted :S
  11. hello people, I was wondering if it was possible to put in a code that does so when a player goes to jail or hospital it shows an image. here is the code wich is used now. but as you can see, it will only show "0" when out of jail and "1" when in jail. [url='jail.php']<img src=jail.gif width=22 height=25>{$ir['jail']}[/url]   the code is used inside a table i made in globals.php so i was wondering if it was possible? And if it was possible, could anyone help me? Thanks in advance guys :)
  12. Re: Icons Help   gives same error..
  13. Re: Icons Help gave me error.. tried in different places on the header, even behind the nick.. still error..
  14. Re: 859299 days, 12 hours, 58 mins Thank you both for the help! :P Even thou you just pointed me in the right direction.. this was the fix : change this code print $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '".(time() + (2 * $r[crimeJAILTIME]))."', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'");   with this code print $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'");   let me know if you need anything graphical made :)
  15. Re: 859299 days, 12 hours, 58 mins   <?php $macropage="docrime.php?c={$_GET['c']}"; include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else { $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); print $r['crimeITEXT']; $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']); $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if(rand(1, 2) == 1) { print $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '".(time() + (2 * $r[crimeJAILTIME]))."', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); } } print " [url='docrime.php?c={$_GET[']Try Again[/url] [url='criminal.php']Crimes[/url]"; } } $h->endpage(); ?>   Thats my docrime.php
×
×
  • Create New...