Jump to content
MakeWebGames

Drugs Corner


MDK666
 Share

Recommended Posts

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.

 
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 7 months later...

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:

Link to comment
Share on other sites

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 ...

Link to comment
Share on other sites

  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...