Joshua Posted February 26, 2010 Share Posted February 26, 2010 Ok. Havent had to much time to test all aspects of this, but from the little testing I have done I have encountered no errors. If you find one, post it here and I'll fix it asap. Please note, this is the "base" design of this mod. There will be several larger add-ons in the future, some paid, some free. This mod is free to use, edit, add-on as you see fit, I only ask you keep the copyright on the modification itself. First I'll post the screenshots, then I'll post the code. Again, any problems, let me know asap as im the only one who made/tested it so to err is human :p SQL'S You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. CRON add-ins. Cron_minute.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. cron_day.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. drugmarket.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 26, 2010 Author Share Posted February 26, 2010 2nd bit Divided In Half due to size. druglab.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 26, 2010 Author Share Posted February 26, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Jordan Palmer Posted February 26, 2010 Share Posted February 26, 2010 Nice work Immortal. I may install on my game =) :) Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 26, 2010 Author Share Posted February 26, 2010 Tnx bud, I'll be adding an Addiction/Rehab Plug-in Later today Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 26, 2010 Author Share Posted February 26, 2010 Original script updated, the cron bit was incorrect (go figure) Quote Link to comment Share on other sites More sharing options...
danger boy Posted February 26, 2010 Share Posted February 26, 2010 Very nice mod looks good. Quote Link to comment Share on other sites More sharing options...
iSOS Posted February 26, 2010 Share Posted February 26, 2010 Good mod, well done. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted February 26, 2010 Share Posted February 26, 2010 It's a little small... Quote Link to comment Share on other sites More sharing options...
Lotan Kane Posted February 27, 2010 Share Posted February 27, 2010 Gettin this error when trying to purchase drugs: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Query was SELECT `dID`,`drugTYPE`,`materialPRICE`,`drugCITY` FROM `drugs` WHERE `dID`= Looks like a great mod by the way.Thanx for taking the time to make it. Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 27, 2010 Author Share Posted February 27, 2010 Did you import the entire SQL's above with drug names? :-) Quote Link to comment Share on other sites More sharing options...
Lotan Kane Posted February 27, 2010 Share Posted February 27, 2010 Sure did.Just tried dropping all the tables and re-doing the sql's one by one,unfortunately still no luck.Re-did druglab,and drugmarket just to see if it would help,no change though. Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 27, 2010 Author Share Posted February 27, 2010 Strange...It's working on my end, pm me a link to your site >,< Quote Link to comment Share on other sites More sharing options...
p_T_s Posted February 27, 2010 Share Posted February 27, 2010 By jimmybob Gettin this error when trying to purchase drugs: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Query was SELECT `dID`,`drugTYPE`,`materialPRICE`,`drugCITY` FROM `drugs` WHERE `dID`= Yeh i got the same, gonna take a look at it as soon as i get time. Quote Link to comment Share on other sites More sharing options...
jds137 Posted February 28, 2010 Share Posted February 28, 2010 I also got the error. I even removed, and readded it all. No luck You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Joshua Posted February 28, 2010 Author Share Posted February 28, 2010 I havent encountered this error personally, i'd like to know if anyone else is the error is in the sql as it's not fetching the $_GET['ID'] Variable. not 100% sure why it wouldnt as again, it works for me :\ Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 1, 2010 Author Share Posted March 1, 2010 for whatever reason people still use this ... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. it is messing up the security in the scripts themselves if you remove $_GET['ID'] = isset($_GET['ID']) && ctype_digit($_GET['ID']) ? abs((int) $_GET['ID']) : false; that line ^ the script will run fine, but only remove that line if you have GET ['ID'] secured in header or globals (which i dont recommend) Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 1, 2010 Author Share Posted March 1, 2010 Add-On to this mod. Drug Rehab and Drug Addiction with Drug tests ! Users will now have an addiction level. The addiction level will determine on how fast your will rises. The normal rate for will increase is 10 per 5 minutes. Each time you use a drug your addiction level goes up. Once it reaches 10, your will will only go up 8 points. If it reaches 20 or above your will only increases 5 points. To make this go away you must check yourself into a rehab center. There is a Bill to pay, a timer to sit out, and once both of these are done the user must take a multiple choice drug questionaire. There are only 11 questions right now, feel free to google / make up some more and drop them into php my admin until i set up a staff function for it. the test is only 10 questions long, questions are chosen at random and the user will not get the same question twice. User must score at LEAST an 80 on the test to pass 80/100. If they fail they have to wait another day to retry the test. i'd suggest making about 50 questions so it's dificult to know the answers to all easily :-) SQLS You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. open up druglab.php find $db->query("UPDATE `users` SET `expire`=$expires WHERE `userid`=".$_SESSION['userid'].""); change to $db->query("UPDATE `users` SET `addiction`,=`addiction`+1,`expire`=$expires WHERE `userid`=".$_SESSION['userid'].""); open up cron_minute.php add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. open up cron_day.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. More coming.... Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 1, 2010 Author Share Posted March 1, 2010 title this rehab.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 1, 2010 Author Share Posted March 1, 2010 drugtest.php Divided in half due to size. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 1, 2010 Author Share Posted March 1, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 1, 2010 Author Share Posted March 1, 2010 screenshots Screen 1 Screen 2 Screen 3 Screen 4 Screen 5 Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 1, 2010 Author Share Posted March 1, 2010 forgot the drug addiction cron You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
jds137 Posted March 2, 2010 Share Posted March 2, 2010 Removing that one line of code like you said, gives me a new error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data/users/jsmigle/mobslife.net/mobslife.net/public/druglab.php:2) in /data/users/jsmigle/mobslife.net/mobslife.net/public/globals.php on line 20 Quote Link to comment Share on other sites More sharing options...
Joshua Posted March 2, 2010 Author Share Posted March 2, 2010 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data/users/jsmigle/mobslife.net/mobslife.net/public/druglab.php:2) in /data/users/jsmigle/mobslife.net/mobslife.net/public/globals.php on line 20 are you converting it to V1? usually that's a double globals.php call >,< Quote Link to comment Share on other sites More sharing options...
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.