Jump to content
MakeWebGames

Newbie

Members
  • Posts

    289
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Newbie

  1. i liked it very nice
  2. i have not worked with grpg so im not to sure but whats this ?   $row['postid'];   i dont see $row in the above code wouldnt it be   $_POST['postid']   probz wouldnt listen to me lol am learning but to me it looked wrong but i would wait for one of the more experienced coders to have a look
  3. ok so i went with a_bertrand and decided to try do it from the table heres what i got The mod still is not finished yet :( but hoping that soon gets fixed i am having one problem so far   PROBLEM: cant get the user to buy the building?? doesn't load it anything SQL   CREATE TABLE IF NOT EXISTS `drugbuildings` ( `bID` int(11) NOT NULL AUTO_INCREMENT, `dPRICE` int(11) NOT NULL, `bDRUG` varchar(255) NOT NULL, `bPROFIT` int(11) NOT NULL, PRIMARY KEY (`bID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;     INSERT INTO `drugbuildings` (`bID`, `dPRICE`, `bDRUG`, `bPROFIT`) VALUES (1, 1000, 'Weed', 10), (2, 5000, 'Cocaine', 200);   ALTER TABLE `users` ADD `permit` INT( 11 ) NOT NULL DEFAULT '0' ALTER TABLE `users` ADD `weed` INT( 11 ) NOT NULL DEFAULT '0' ALTER TABLE `users` ADD `Cocaine` INT( 11 ) NOT NULL DEFAULT '0'   drugbuildings.php <?php # Drugs Mod include ("globals.php"); if($ir['permit'] == 0) { echo "<br /> <img src='http://oulhaj.com/img/private.png' width='100px' height='100px' /> <center><h5><font color=red>ACCESS DENINED:</font> <br /> <br />You do not own a permit please come back when you have one.</h5> <b>If you wish to purchase a Permit please go <a href='permit.php'><font color=gold>Permit Center</font></a> <center>"; exit; } $drugprice = $db->query("SELECT `dPRICE` FROM drugbuildings", $c); $drugprice2 = $db->fetch_row($drugprice); $price = $ir['dPRICE']; $price1 = number_format($price); switch($_GET['action']) { case "buy": buy(); break; case "buildingbuy": buildingbuy(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; $result = $db->query("SELECT * FROM drugbuildings"); echo "<h2>Buildings</h3><br /> <i>Here you can purchase a building and gain profit from it each hour!</i>"; echo "<table border='1' width='50%'> <tr title='You are looking at Row 1' bgcolor='silver'> <th>Building</th> <th>Price</th> <th>Profit</th> <th>Buy</th> <tr>"; while($row = $db->fetch_row( $result )) { echo" <td>{$row['bDRUG']}</td> <td>\${$row['dPRICE']}</td> <td>\${$row['bPROFIT']}</td> <td><a href='drugbuildings.php?action=buildingbuy'>Buy</a></td> <tr>"; } } function buy() { global $db, $ir,$c,$userid,$h; echo "Buying a building! <a href='drugbuildings.php?action=buy'>Buy a Building</a> "; } function buildingbuy() { global $db, $ir,$c,$userid,$h; if($ir['money'] <= $price) { echo "<center><font color=red>Error!</font> <br />You dont have enough for a building! <br /> <a href='index.php'>Back Home</a> "; } if($ir['money'] > $price) { echo "<font color=green>Success!</font> You bought a ($ir['dNAME'])."; $db->query("UPDATE users SET money=money-'$cost' WHERE userid={$userid}"); $db->query("UPDATE users SET weed=weed+1 WHERE userid={$userid}"); # what i was wondering was how would i get it to upgrade whatever drug they buy??? } } $h->endpage(); ?>   i created a permit.php where user needs to buy a permit before they can access the page this page works fine permit.php <?php include ("globals.php"); if($ir['permit'] == 1) { echo "<h5>You already own a permit silly go and invest your money into some drugs.</h5> <i><a href='drugbuildings.php'><font color=green>Drugs<?font></a>";exit; } switch($_GET['action']) { case "buy": buy(); break; case "buyconf": buyconf(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; $cost = '1000'; echo " <h2>Permit Center</h2> <table border='1' width='75%'> <tr title='info' bgcolour='silver'> <th>Name</th> <th>Cost</th> <th>Info</th> <th>Buy</th> <tr> <td>Drug Permit</td> <td>$1,000</td> <td>A permit lets you access the drug building page where you can buy a building and gain profit from it every hour.</td> <td><a href='permit.php?action=buyconf'>Buy Premit</a></td></tr></table>"; } function buy() { global $db, $ir,$c,$userid,$h; echo "Buying Building Permit for $1,000 <a href='permit.php?action=buy'>Buy a Permit </a> "; } function buyconf() { global $db, $ir,$c,$userid,$h; if($ir['money'] < '1000') { echo "<center><font color=red>Error!</font> <br />You dont have enough for a Permit you need <font color=green>$1,000.</font> <br /> <a href='index.php'>Back Home</a> "; } if($ir['money'] > '999') { echo "<font color=green>Success!</font> You bought a permit for $1,000. <br /> Goto <a href='drugbuildings.php'>Drug Buildings</a> and see what you can invest!"; $db->query("UPDATE users SET money=money-1000 WHERE userid={$userid}"); $db->query("UPDATE users SET permit=permit+1 WHERE userid={$userid}"); } } $h->endpage(); ?>   What i cant get it to do is Doesnt come up that you dont have enough money to buy building buy button doesnt do anything i wouldnt be able to get it to updrade the drug building for example its been taking out the drugbuildings table   $db->query("UPDATE users SET weed=weed+1 WHERE userid={$userid}");   would i have to write i new function for each drug so the database knows what i am adding because so far i have 2 drugs but im planning on adding more
  4. i would of bought it but don't have that kind of money just spend $100 on a license if your interested in selling your layout contact me and we can work something out.
  5. Hey there just want to say goodluck with your sales. couple things i noticed No screenshots No Link to website so i did a quick google search and found http://www.wisecrime.com heres some attachments i did only 3 [ATTACH=CONFIG]626[/ATTACH] [ATTACH=CONFIG]627[/ATTACH] [ATTACH=CONFIG]628[/ATTACH]
  6. would have to agree the colors are bad had to close my eyes a little when i looked at it practice makes perfect :) good job
  7. i think i tried joshua mod before when i was helping a friend on his game and it didn't work right or it didn't work the way my friend wanted it.
  8. i was already planning to do this but mine was going to be different same concept user can buy some land users then go to the grow shop depending on what way they wanna grow indoor or outdoor there will be certain things to buy ( indoor drowing would need lights, seeds etc will not go in to go into much detail because its still in planning stage but good mod and good luck with your sales .
  9. yep would seem better to use a new table but for example lets say this is the table drugs ID dID dNAME dPRICE   so if i wanted to make out how much they would make a day would it be something like this   ($ir['dNAME'] & $ir['dPRICE'] * $ir['IQ'] / 50)
  10. alright thanks for that this is my first time i have tried to put it in arrays i was just referring to what i read on tiztag.com i thought i would try put it into action see if it would work.   as i said any help is appreciated as i will be releasing the mod for free for V2 and when i do convert it to V1 when its done unless someone beats me :P thanks again for the ideas
  11. i just purchased a license for v2 but me being stupid i put the money on my account where you spend it on mods so had to speak to cold about that and he has gave me a license however there is no engine to download so just waiting on that getting sorted out and ill be able to get it up and tested and hopefully get the mod finished asap as i said in another post you don't see very much mods getting posted on here anymore. i will hit you up if i get stuck appreciate any help i could get :)
  12. Hey i have been working on a drug mod where users can pick a drug and then gain a profit every day You will see from the coding what i mean its not nearly completed but just wanted to ask if this would work really. I dont have mccodes set up   <?php # Drug Mod # Mccodes V2 # Created for MWG # Free Mod include ("globals.php"); if($ir['level'] > 10) { echo "Restricted Access: Please come back when you are level 10 or higher."; $h->endpage(); exit; } echo "<h2><b>Drug Corrner</b></h2><br /> <i>Here in the drug corrner you can pick a drug to choice from and it will earn you profit each day!</i>"; $drug_array[0] = "Rohypnol"; $drug_array[1] = "Valium"; $drug_array[2] = "Mcat"; $drug_array[3] = "Cannabis"; $drug_array[4] = "Speed"; $drug_array[5] = "Xanax"; $drug_array[6] = "MDMA"; $drug_array[7] = "Cocaine"; $drug_array[8] = "Heroin"; $drug_price[0] = "100"; $drug_price[1] = "250"; $drug_price[2] = "500"; $drug_price[3] = "750"; $drug_price[4] = "1500"; $drug_price[5] = "2500"; $drug_price[6] = "5000"; $drug_price[7] = "10000"; $drug_price[8] = "20000"; $gain_price = $drug_array[0] + $drug_price[0] * ($ir['IQ']) / 50 # Total price your drugs earn! $h->endpage(); ?>   So basicly am i on the right track or way off? so say they had drug number 0 price number 0 Rohypnol $100 * users iq then divided that by 5   (Drug price:100) * (IQ: 1000) / 50 = 2000 profit Thanks Steve
  13. sounds nice and could be used for other things (none that come to mind) i would like to see this for v2 as you don't see very many free mods getting posted these days I am working on a couple free mods my self for v2 but i am a slow coder be a while before there done.
  14. the crimes don't seem to be going up i did the first crime 3 times and jail every time and % still at 0 looks good especially for your first website well done   EDIT: oh its went up to 1% now that i have tried a gta
  15. Newbie

    Php Windows 32 Bit

    ye i didn't really understand what to do when i posted this message i went and did some more research i managed to set up wamp which installed php and mqsl and apache which what i was looking for i was trying to install them without using wamp   Basically what i was trying to do was set up php on my computer with MySQL so i don't need to rely on free hosting to set up my game until its complete as said above i managed to set up wamp but having some problems accessing the phpmyadmin on it.
  16. Newbie

    Php Windows 32 Bit

    Hey all i am looking to install php on my computer but don't really know how it works i have PHP 5.4   i only know of wamp apache is there any other ones that i could use or anyone have any tips? thanks Steven
  17. i am pretty sure it comes with a installation file Use google use youtube i have seen lots of tuts on how to set up a mccodes game
  18. i had a issue with this before try this go to your config.php file and check the code make sure its the same code as in your crons failing that either check your cron files and make sure there error isn't there if still no luck i would contact the host and let them know that the crons are not working
  19. Newbie

    Psn

    alright will do dj next time im on :P
  20. Newbie

    Psn

    alright added
  21. Newbie

    Psn

    Hello all if you play any of the below games and fancy a match add me. Games i play: GTA IV + BOGT & TLAD - Not very much Black ops - properly go off it when my black ops 2 gets delivered Saints row the 3rd psn id XxGetty2k12xX
  22. goto the file that is causing the error so for example lets say the error was only showing up when you go to gym.php look for the query mysql_query("UPDATE pass_salt ADD blah blah"); just a example if your using v2 should look like this kinda $db->query("UPDATE pass_salt ADD blah blah"); just remove it and make sure the error is not showing once you are done. or you could go to phpmyadmin and add the table in but would be better to just remove the query if its doing nothing. hope this helps a little.
  23. try this   change   mysql_query("INSERT INTO users (userid, username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES('', '{$username}', '{$username}', md5('{$_POST['password']}'), 1, {$startm}, {$startc}, 3, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', " . time() . ", '{$_POST['email']}', -1, '$ip')", $c);   to   mysql_query( "INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', " . time() . ", '{$_POST['email']}', -1, '$ip')", $c);
  24. ok i replaced my gangs.php and staff_gangs.php with your code and everything is working fine i can set up gang crimes from staff menu in yourgang.php You have started to plan this crime. It will take 24 hours. if its not showing up i would go back and check the orgcrimes table ill post it below if you dont have   CREATE TABLE IF NOT EXISTS `orgcrimes` ( `ocID` int(11) NOT NULL AUTO_INCREMENT, `ocNAME` varchar(255) NOT NULL DEFAULT '', `ocUSERS` int(11) NOT NULL DEFAULT '0', `ocSTARTTEXT` text NOT NULL, `ocSUCCTEXT` text NOT NULL, `ocFAILTEXT` text NOT NULL, `ocMINMONEY` int(11) NOT NULL DEFAULT '0', `ocMAXMONEY` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`ocID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;   INSERT INTO `orgcrimes` (`ocID`, `ocNAME`, `ocUSERS`, `ocSTARTTEXT`, `ocSUCCTEXT`, `ocFAILTEXT`, `ocMINMONEY`, `ocMAXMONEY`) VALUES (1, 'Rob a Bank', 1, '1. You head out and get your crew.<br />\r\n2. You move towards the bank with your mask on.<br />\r\n3. You storm the bank with your crew.', '<font color=green>You Succeeded</font>', '<font color=red>you failed</font>', 1000, 5000);
  25. have you checked that the crime is in the database? post up your gang file/s would be easier to check
×
×
  • Create New...