Jump to content
MakeWebGames

gurpreet

Members
  • Posts

    834
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gurpreet

  1. Wow that's really clever :P How about if you add an 'active' field, and if they have logged in in the last 30 days, their active = 1, if not then it's 0. Added into cron_day of course. About the actual group bit: How would you go about doing it? I have a theory but 1) Might not work 2) Won't be effective. Here's what i propose for the register part. A select query for the groups   if(group 1 size < group 2 || group 3 || group 4) { put them into group 1 } else if(group 2 size < group 3 || group 4 || group 1) { put them in 2 } else if(group 3 size < group 2 || group 4 || group 1) { put them in 3 } else if(group 4 size < group 3 || group 2 || group 1) { put them in 4 } else if(group 1 == group 2 || group 1 == group 3 || group 1 == group 4 || group 2 == group 3 || group 2 == group 4 || group 3 == group 4) { put them in any, your choice }   As I said, not very efficient and may not work properly, but theres the basic idea I guess
  2. Wow mate, that is a really good idea :) However, what would you do about existing members, and inactive members? Would you just make 5 groups, and then say if laston was over 50 days, they are moved to the 'inactive' group, or 'neutral' group?
  3. It is? Well then shouldn't it work perfectly with the coding methods of PHP? Doesn't seem to work...
  4. Ok basically, my game overall is in PHP, but the forums are in BBCode. As you know, the BBCode and PHP have different coding methods, <font color> and . By doing one method, the other method will be screwed up. E.G. php way, the <font color=blue> will show up instead of a blue name on the forums, and with that will show as it is in the whole game. Would it be wise to add a BBCode parser (or the thing where all of BBCodes are) to the header?
  5. Hitman may have edited the hospital times to be low, like hospitalising is 50 minutes and leaving may be 2-5.
  6. I showed the bare bones/simple one. Your way is much more effective but requires Hitman learning something for once
  7. Me too, cant get to the login page.
  8. Hey everyone, I was wondering how I would go about adding colours to staff names, in general through the DB (Changing the name) or header or something...My dilemma is that I have BBCode forums (MTGs) and the rest is PHP, so if I edit someone's name via the DB they'll be fine in-game, but on the forums it will show: <font color=blue>Gurpz</font>, and if they have a few colours it will be even longer. Is there an easy way to do this, or would i have to go through every page and add an if statement to check if they're staff, then it'll change the username to coloured like this:   if($r['user_level'] > 1) { if($r['user_level'] == 2) { $r['username'] = <font color = blue>$r['username']</font>; } else if($r['user_level'] == 3) { $r['username'] = <font color = red>$r['username']</font>; } } and it'll keep going until all user levels are covered. Sorry for the long post, just want to be crystal clear on the issue. Any help will be appreciated
  9. Wow mate, that looks really unique :) I seriously doubt you are a 'newbie' because a newbie wouldn't be able to code much more than a few pages..You seem quite experienced. The theme is very good, similar to games like Maplestory and that. Keep up the good work :) P.S. Change the 'Top 10th players' to 'Top 10 players' on your login page :)
  10. Thanks for that, made a new user level :)
  11. Hitman have you ever tried to make anything or do you just come here and request everything in the WRONG sections? Heres a hint how to make it: Make a cron hour that resets the hits Make an if statement so if someone has attacked the same person 5 times in one hour they get an error.
  12. I think that this would be good for new users to MCC (especially with V2.02 and the upcoming V3) but I doubt more experienced people would use this, as it'd be a normal thing for them to do, known off by heart.
  13. Tutorial: v1 - v2 Conversion just do the reverse of what it says. E.G. Instead of changing mysql_ to $db->, change it from $db-> to mysql_
  14. Just convert mods from V2 to V1.
  15. Any proof of payment?
  16. Nice mod mate. Havent tsted but looks good. Also I'm not sure but I think echo is faster than print (I'm used to using it anyway). Nicely done.
  17. Looks like you haven't added the settings SQL, as the game_marquee isn't defined (so it doesn't change to your marquee) or your $set is wrong. I may be wrong, but check :)
  18. $_GET['spend'] = isset($_GET['spend']) && is_string($_GET['spend']) ? strtolower(trim($_GET['spend'])) : ""; $quantity = mysql_query("SELECT i.* , u.userid from inventory i users uLEFT JOIN i.inv_userid=u.userid"); //This query probably fails, I suck at queries if(!$_GET['spend']) { echo "All of your itemuse stuff goes here except the qunatity actions"; } else if($_GET['spend'] == 'quantity') { echo "Type in the amount of {$r['itmname']} you wish to use. "; echo "<form action='itemuse.php?action=quantity2' method='post'>"; echo "<input type='text' name='quantity' /> "; echo "<input type='submit' value='Submit' />"; echo "</form>"; } else if($_GET['spend'] == 'crystals2') { $_POST['quantity'] = (float) $_POST['quantity']; if($_POST['quantity'] <= 0 || $_POST['quantity'] > {$ir['inv_qty']} //Once again, the {$r['inv_qty']} bit is probably wrong. { echo "Error, you either do not have enough {$r['itmname']}s or did not fill out the form. [url='itemuse.php?action=quantity']Back[/url]"; $h->endpage(); exit; } $TakeVotePoints = sprintf("UPDATE inventory SET inv_qty - inv_qty - %s WHERE (userid = %u)", $_POST['quantity'], $userid); $db->query($TakeVotePoints); echo "You have used {$_POST['quantity']} {$r['itmname']}(s). //Add in your itemuse codes here, I can't think atm :P }   Untested and most likely won't work, but thats the basic outline. The queries are probably wrong as I'm not good using 2+ tables at once. Hope a better coder can brush this up (or recode it better lol)
  19. Incase people didn't notice, you may not get this working due to an extra '. Change:   EXP: <input type='text' name='exp' value='{$itemi['exp']}'' />   To:   EXP: <input type='text' name='exp' value='{$itemi['exp']}' />
  20. Well for starters make the item type a set value - Lets say 999   if($r['itmtypeid'] == 999) { $expgain = ($ir['exp']/$ir['exp_needed']*30);; // May not work, sorry if it doesn't I can't remember how to do exp gains nowadays :P $db->query("UPDATE users SET exp=exp+$expgain WHERE userid=$userid"); echo 'You have just used your {$r['itmname']}. You have just gained 30% EXP.'; item_remove($userid, $r['inv_itemid'], 1); }   Just make sure the itmtypeid is 999, or whatever you set it to. I doubt the exp formula is right, but it should put you on the right track.
  21. I'd like to point out that illegalife uses colours and styles requested by the client. When I purchased my layout, I was asked what colours and style I wanted. I guess most owners just like black + red (Including me) :)
  22. This could help quite a lot and I'll try to make one, I'm guessing it would run via the item names and each item in the inventory has a seperate ID.
  23. Incorrect, remove the { and }echo "House tax: \$".number_format($ir['Taxes']); Oh yeh, I did {$ir['Taxes'} and then number_format, forgot to remove the {}
  24. Simple way would be:   echo "House tax: \$".number_format({$ir['Taxes']}).";
  25. Now ya can have 2 themes one for the ladies and the other for the gay population ;) AYE ;)
×
×
  • Create New...