Jump to content
MakeWebGames

NonStopCoding

Members
  • Posts

    572
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by NonStopCoding

  1. mess up lol
  2. to add a item via mccodes use the item add function   item_add(usersid,itemid,amount);
  3. try looking for two session_start();
  4. its saying that the headers have been set twice try read this might help you http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php
  5. I am trying to fix a issue for a client my mod don't want to seem to work for him ill need to try dig out my old copy of rc someplace been a while lol
  6. wow that still not been fixed been ages
  7. have you turned on error reporting yet hehe? if you need anything done let me know I can do an MCC mod but I'd get way too confused doing one for rc. Its just the same as mccodes all you need to do is find the main stuff (mcc - points = rc - bars) (mcc - money = rc - wallet) also in rc it has $_SESSION['playerid']
  8. I quite like the rc engine i did some work for it a while back and yea the coding is bad but if you have the time and just recode it from scratch would be much better
  9. hehe cool if you get any issues or that you can get me on skype or [email protected]
  10. Yea i seen your topic the other day about that nightmare and thanks thats appreciated :)
  11. Hello all i am offering 65% discount off any of my modules from my website simply add the module or modules you wish to purchase to cart and apply discount at the end Starts: June 18, 2015 (NOW) Ends: July 17, 2015 Code: NONSTOP65 GRPG Modules: http://nonstopcoding.com/?download_category=generic-rpg-modules Mccodes: http://nonstopcoding.com/?download_category=mccodes-v2
  12. Little Update * Added code to buy x amount of buildings * Added database structure for users buildings and added code to show * Added code for selling your buildings * Added code for showing your buildings To Come * Code up the cron that will handle daily drug production and daily fees * Code up a formula for max buildings a user can have based on iq and other factors * Code up a drug dealer which will buy / sell drugs Screenshots So Far [ATTACH=CONFIG]2105[/ATTACH] [ATTACH=CONFIG]2106[/ATTACH] Have Removed the option for special benefits
  13. Hey all so i have started working on a little project which i am going to be releasing for free its nothing fancy. This module will allow your users to be able to buy drug buildings which will produce drugs for them every day i will say that the mod will properly be useless to you as i think its more of a module for a Round Based RPG as it will cause major inflation issues (unless i or you re code it some and find a way to make it give less money) screenshot of what i have done so far [ATTACH=CONFIG]2104[/ATTACH] Edit: I grabbed a quick image from google looks like a school but ah well :D Also forgot to say that this module will include a drug dealer who will buy and sell your drugs
  14. thats good seems it need single quote ' around the query
  15. try this   <?php include "config.php"; include "language.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; include_once('global_func.php'); /*Remove the comment when this works, change your cron URL to add ?code=enter config code found in config.php if(!isset($_GET['code']) || isset($_GET['code']) != $_CONFIG['code']) { return; } */ $random_select = $db->query("SELECT `user` FROM `lottery_players` ORDER BY RAND() LIMIT 1"); $rs = $db->fetch_row($random_select); $lotto_config = $db->query("SELECT `ticketprice` FROM `lottery_config`"); $lc = $db->fetch_single($lotto_config); $winnings = $db->query("SELECT COUNT(`user`) FROM `lottery_players`"); $win = $db->fetch_single($winnings); $gain = $lc * $win; $db->query("UPDATE `users` SET `money` = `money` + '{$gain}' WHERE `userid` = '{$rs['user']}'"); event_add($rs['user'], "You have won ".money_formatter($gain)." on the lottery."); $db->query("TRUNCATE TABLE `lottery_players`"); $db->query("UPDATE `users` SET `tickets` = 0"); ?>
  16. is this in your cron file?   include "config.php"; include "language.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); }
  17. something is wrong with your db wrapper try include the file inside the cron usually found class/class_db_mysql.php or class/class_db_mysqli.php
  18. http://www.tizag.com/phpT/ http://www.w3schools.com/php/default.asp Read up on stuff they sites are pretty handy also Variables are "containers" for storing information.   $text = "I am a Variable"; echo $text;   outputs "I am a Variable"
  19. nope not yet been busy working on some stuff
  20. I have been noticing you are using <form> tags when not really needed a link is easy enough to add instead   <form method='post' action='brewery.php?action=brewbeer'> <input type='submit' name='brewbeer' value='Brew Beer' /> </form>   could be done easy via a <a> tag   <a href='brewery.php?action=brewbeer'>Brew Beer</a>   if you are using the form submit because you like the look of the button instead of the text link you could add the <button> tag around the <a> tag   <a href='brewery.php?action=brewbeer'><button>Brew Beer</button></a>   Now to work out how to make it so you require the item Bottle of Beer the item add function will do this as sniko said but for in order for this to work you need to have the item in the items table in the database. So then it credits the user the energy it provides, and also deletes one if that item from the users inventory as i was saying above use a <a> tag to provide the link you need to go to the file when using a switch statement and functions to be able to call the function you need to call the case for example case 'go': go_brew(); break; so using <a href='filename.php?action <- notice the action we used it earlier in our switch statement switch($_GET['action']) ok back to link <a href='filename.php?action=go'>Go Brew Beer</a> noticed i used the go on the end of ?action= this is to let the a tag know that we want to access the go_brew() function if you wish to remove a item you will need the item_remove(); function Edit: I also see you have made it they need to wait 25 minutes to brew beer but you give item instantly when coding a module you need to think where the queries or code will go.
  21. You need to place that code in the function that handles brewing
  22. i have not had a chance to take a full look at all the features yet
  23. it is a nice mod i would like to see it in action when its completed :p
×
×
  • Create New...