MDK666 Posted November 9, 2008 Share Posted November 9, 2008 here is a small script i did while i was bored, and had nothing else to do or think of, you can edit it and whatever you want with it at your own free will... drug_corner.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. sql 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...
88nismo Posted November 9, 2008 Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner Thanks! now how do i add the drugs? Quote Link to comment Share on other sites More sharing options...
ColdK Posted November 9, 2008 Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner on php myadmin Quote Link to comment Share on other sites More sharing options...
MDK666 Posted November 9, 2008 Author Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner Thanks! now how do i add the drugs? on php myadmin exactly as ColdK has said ill be working on a staff panel to add drugs soon so untill then ull need to do it through phpmyadmin Quote Link to comment Share on other sites More sharing options...
MDK666 Posted November 9, 2008 Author Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner well i finished the admin panel to add a drug from staff panel instead of phpmyadmin and here it is. 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. after that it should work from the staff menu. any problems let me know Quote Link to comment Share on other sites More sharing options...
88nismo Posted November 9, 2008 Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner thanks alot :-D Quote Link to comment Share on other sites More sharing options...
88nismo Posted November 9, 2008 Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner i get this when i click add "Error: This script requires an action." Quote Link to comment Share on other sites More sharing options...
MDK666 Posted November 9, 2008 Author Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner i get this when i click add "Error: This script requires an action." to fix that You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. that should fix that problem. now can somoene help me out here i been looking for a starter pack script anyone know where i can find one. Quote Link to comment Share on other sites More sharing options...
Colonel Posted November 9, 2008 Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner http://criminalexistence.com/ceforums/i ... ic=18785.0 Quote Link to comment Share on other sites More sharing options...
MDK666 Posted November 9, 2008 Author Share Posted November 9, 2008 Re: [mccode v2] Drugs Corner http://criminalexistence.com/ceforums/i ... ic=18785.0 thanks a bunch i really appreciate it Quote Link to comment Share on other sites More sharing options...
Dazza Posted November 16, 2008 Share Posted November 16, 2008 Re: [mccode v2] Drugs Corner Newbie alert. Brilliant this but I get this msg: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/*******/public_html/staff_special.php on line 186 Line 186 is : if($_POST['DrugsInfo']) { Followed by : $dNAME = htmlentities ($_POST['dNAME'], ENT_QUOTES); $dSEX = htmlentities ($_POST['dSEX'], ENT_QUOTES); $dDRUG = htmlentities ($_POST['dDRUG'], ENT_QUOTES); $dEFFECT = htmlentities($_POST['dEFFECT'], ENT_QUOTES); $energy = abs((int) $_POST['energy']); $will = abs((int) $_POST['will']); $brave = abs((int) $_POST['brave']); $health = abs((int) $_POST['health']); $dPRICE = abs((int) $_POST['dPRICE']); $dQTY = abs((int) $_POST['dQTY']); $dOD = abs((int) $_POST['dOD']); Could someone point out my glearing mistakes please Quote Link to comment Share on other sites More sharing options...
MDK666 Posted November 16, 2008 Author Share Posted November 16, 2008 Re: [mccode v2] Drugs Corner i dont see how you get that error unless your useing a differeant version then 2 Quote Link to comment Share on other sites More sharing options...
Dazza Posted November 16, 2008 Share Posted November 16, 2008 Re: [mccode v2] Drugs Corner Sorry scrap that post (Unable to delete/edit it) iv sorted it Just have a: Parse error: syntax error, unexpected $end in /home/thelayer/public_html/staff_special.php on line 259 But think I can solve this myself easily enough Quote Link to comment Share on other sites More sharing options...
Guest Sniko` Posted November 16, 2008 Share Posted November 16, 2008 Re: [mccode v2] Drugs Corner Excellent mod well done! Quote Link to comment Share on other sites More sharing options...
Dazza Posted November 24, 2008 Share Posted November 24, 2008 Re: [mccode v2] Drugs Corner Love this mod +1 Now, I want it so at the start of every day the drug amount refreshes. Please note I am new to coding. If I go into the cron_day.php would this work? $db->query("UPDATE drugs SET dQTY=1000"); If not where am I going wrong? Thanks Quote Link to comment Share on other sites More sharing options...
ak27 Posted July 1, 2009 Share Posted July 1, 2009 Re: [mccode v2] Drugs Corner Yeah i agree with dazza.. ,,.... 8-) as you could hav the prices of drugs randomate depending on wat city your in.. i would be highly interrested on a modification like this suit my game all the way down to the pixel :mrgreen: Quote Link to comment Share on other sites More sharing options...
Strats Posted July 1, 2009 Share Posted July 1, 2009 Re: [mccode v2] Drugs Corner What does this do? Quote Link to comment Share on other sites More sharing options...
Dayo Posted July 1, 2009 Share Posted July 1, 2009 Re: [mccode v2] Drugs Corner Cool Mod but i would edit it slightly to this run sql ALTER TABLE `drugs` ADD `dMIN` INT NOT NULL DEFAULT '100', ADD `dMAX` INT NOT NULL DEFAULT '1500'; i would add somat like this to day cron $drugs=mysql_query("SELECT * FROM drugs"); while($drug=mysql_fetch_row($drugs)) { $min = $drug['dMIN']; $max = $drug['dMAX']; $rand=mt_rand($min, $max); $id=$drug['dID']; mysql_query("UPDATE drugs SET dQTY={$rand} WHERE dID={$id}"); } this alows you to have diffrent ammount of quantities added each day :D also if it is alright with the creator can in edit so the amount changes upon the country you are in you as said in the post above i will relese it and give you credit ... Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted March 14, 2016 Share Posted March 14, 2016 Trying to figure out these values You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Surely not just text. Should be a positive or negative integer and would it be a base number added/subtracted or a percentage value? 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.