
shady9980
Members-
Posts
24 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by shady9980
-
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...
-
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
-
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
-
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
-
Re: Show images help well i explained enough i think? "inside a table in globals.php" anyways thanks for trying :P
-
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?
-
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).
-
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 :(
-
Re: Show images help if($ir['jail'] { print([url='jail.php']<img src=jail.gif width=22 height=25>[/url])} dont work either :S
-
Re: Show images help yeah wich is the code i posted :S
-
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 :)
-
Re: Icons Help gives same error..
-
Re: Icons Help gave me error.. tried in different places on the header, even behind the nick.. still error..
-
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 :)
-
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
-
Re: 859299 days, 12 hours, 58 mins So then it must be the mysql query, but ive checked globals,globalsfunc and jailuser, jail etc but can't find any in them that has anything to do with the time on jail :S *sighs*
-
Re: 859299 days, 12 hours, 58 mins Like POG1 said it could be the mysql query, or in the database for crimes.. aah, you know where i would find that query? i have checked the database and it looks fine, ive put "2" in the jail time. And earlyer when everything worked i only had to sit 2 minutes in jail after the crime failed.
-
Re: 859299 days, 12 hours, 58 mins Hello POG :) There is no error mate, i just wan't to know how to reduce the time.. and what file :S waiting 859299 days, 12 hours, 58 mins is kinda sick :S
-
Hi, I can't find the file to edit my jail time for my minor crime, back to normal (2 minutes). so now when i do the crime and fail, i get 859299 days, 12 hours, 58 mins jail time :S In my head i see this file with alot of time numbers i could change, like if i where into that file a long time ago.. might be a dream lol.. please help :) also if anyone could help me with my previous time issue i can make you free graphics, like items or something. i am not the best but its not noobish either, here are some samples. custom make by ur choice 100 pieces, in psd and png.
-
Mccodes v2 - Jail,Hospital,Courses Timer
shady9980 replied to shady9980's topic in General Discussion
Re: Mccodes v2 - Jail,Hospital,Courses Timer Yeah that is what i need, just with the time ticking down without refresh, timestamp etc.. -
Re: User Levels [v2] I put this function player_rank($tp) { if ($tp < 3) { return "#1 Absolute Newbie"; } else if ($tp < 7) { return "#2 Newbie"; } else if ($tp < 12) { return "#3 Beginner"; } else if ($tp < 18) { return "#4 Not Experienced"; } else if ($tp < 25) { return "#5 Rookie"; } else if ($tp < 50) { return "#6 Average"; } else if ($tp < 100) { return "#7 Good"; } else if ($tp < 200) { return "#8 Very Good"; } else if ($tp < 350) { return "#9 Greater Than Average"; } else if ($tp < 500) { return "#10 Experienced"; } else if ($tp < 750) { return "#11 Highly Experienced"; } else if ($tp < 1200) { return "#12 Honoured"; } else if ($tp < 1800) { return "#13 Highly Hounoured"; } else if ($tp < 2500) { return "#14 Respect King"; } else if ($tp < 5000) { return "#15 True Champion"; } } into right place in my globals_func file. But when i put the display code into my header i get an error :( Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/site/public_html/game/header.php on line 188 :S
-
Mccodes v2 - Jail,Hospital,Courses Timer
shady9980 replied to shady9980's topic in General Discussion
Re: Mccodes v2 - Jail,Hospital,Courses Timer Anyone done this before? -
Mccodes v2 - Jail,Hospital,Courses Timer
shady9980 replied to shady9980's topic in General Discussion
Re: Mccodes v2 - Jail,Hospital,Courses Timer Oh ok, like unix? Any chance i could get you into helping me with this? :) -
Hello all, I am new here when it comes to posting, but i have been lurking around earlier. I find mccodes modding very entertaining and fun, plus i learn a lot from it.. I am not that good with php and i wanted to ask you for help. What i am trying to make is a timer that counts down. Like when you are doing a crime and go to jail. Right now all it shows is the x minutes i have to wait, and it doesnt count down in seconds. Also i have to refresh the page to see when it goes down. I know there has been some posts on this forum on how to make it show as hours, minutes and seconds. But even when i code in that it wont count down of it self, i would still have to refresh the site. I would love if anyone who sees this as an easy thing to do, to help me out <3 I was planning to have a little "You are in jail for "2 hours, 32 minutes, and 21 seconds" above the mainmenu wich ticked down on its own. ofc it would only print when the user was in jail, and if in hospital it would say hospital if you understand. I am sorry for any typos and such.. Thanks in advance i will be checking around for response :-D