Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    727
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by peterisgb

  1. Hi, i'm trying to make names in my game universal. Eg have a code like this   if($r['display_pic']) { $display = "<img src='{$r['display_pic']}' width='17' height='17' />"; } else { $display = "<img src='images/nopic.png' width='15' height='15' />"; } if($r['user_level'] == 1) { $rankcolour = "#ffffff"; } if($r['user_level'] == 2) { $rankcolour = "#06519b"; } if($r['user_level'] >= 3) { $rankcolour = "#49b536"; } if($ir['donatordays']) { $d = "<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' />"; $rankcolour = "red"; } $user = $r['username']; $usernamei = "<font color='$rankcolour'>$display $user $d</font>";   in the global_func file. Then put anywhere on the site $usernamei like useronline/userlist, This don't work, but how or what do i need to do to get this to work. Thanks in Advance Pete
  2. ok can this be moved to the right board/
  3. Got a Demo anywhere?
  4. I think this sounds good and worth a gander if you release it, probs use it as i don't like the basic one.
  5. could you post a screeny
  6. oh right, on my old site i iframed it.
  7. i must be a complete idiot of something, but what does it exactly do....
  8. screenshot?
  9. just wondering and bringing this up after so long but its now 10th May 2014. (Nearly 2 years later.) Is there any chance of some news now......
  10. I'm stuck here, looking at main menu ideas... i look at it and not sure what i want to do to it, can someone throw a few ideas or screenys of theres to see if it can spark an idea. Thanks.
  11. You should be able to edit it in the header file.
  12. well so far the ? is still there like so viewuser?u=1 instead of viewuser.php?u=1. i dont mind the ?u=1. i just though it would of been easier to use .htaccess to change the link looks instead of going through each page (which will takes for ages)
  13. so isnt there a code that i can just stick in .htaccess
  14. well i am completely new to .htaccess files and i hardly know anything about it.
  15. Hello, i'm playing around with the .htaccess file. I've got this   RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]   Which does this to links: http://www.example.com/usersonline.php to http://www.example.com/usersonline Is there a way in the .htaccess file to make all pages display like the above link without editing every link on the site?
  16. oh it takes 5 minutes to double one seed, it costs 5 minutes per seed, so if you do 12 seeds it'll take an hour to complete. so it does take time. I do have intentions on making this bigger and better, just though i would chuck it on here to see if any other people had some good ideas to make it better.
  17. hmm, well as i said it was a quick throw together.
  18. Ok this is quick Grow Weed mod. I didn't spend alot of time on this but i might have intentions to update this as it goes along. run these sql's ALTER TABLE `users` ADD `weed` int(11) NOT NULL DEFAULT '0', ADD `weedtime` int(11) NOT NULL DEFAULT '0', ADD `treatedweed` int(11) NOT NULL DEFAULT '0'; grow.php <?php include "globals.php"; if($ir['weedtime'] > 0) { echo "<h2>You have <font color='red'>{$ir['weedtime']}</font> Minutes until your weed is done.<br /><br /><a href='grow.php'>Reload</a>"; $h->endpage(); exit; } echo "<h2>Grow House</h2><br />"; switch($_GET['action']) { default: grow_index(); break; case "grow": grow_weed(); break; case "grow1": grow_weed1(); break; case "sell": grow_sell(); break; case "sell1": grow_sell1(); break; case "sellt": grow_sellt(); break; case "sellt1": grow_sellt1(); break; case "treat": grow_treat(); break; case "treat1": grow_treat1(); break; } function grow_index() { global $db,$ir,$c,$userid; echo " Welcome to your Grow Room.<br /><br /> <table class='table1' width='75%'><tr> <td align='center'>You have <b><font color='red'>{$ir['weed']}</font></b> weed</td></tr><tr> <td align='center'>You have <b><font color='red'>{$ir['treatedweed']}</font></b> treated weed</td> </tr><tr></tr><tr> <td><a href='grow.php?action=grow'>Grow</a></td> <td><a href='grow.php?action=sell'>Sell</a></td> </tr> <tr> <td><a href='grow.php?action=treat'>Treat Weed</a></td> <td><a href='grow.php?action=sellt'>Sell Treated Weed</a></td> </tr> </table> "; } function grow_weed() { global $db,$ir,$userid; echo "It will cost you $10,000 per seed grown.<br /> It will take you 5 Minutes for every 1 seed grown.<br /> How many seeds do you want to grow? <form action='grow.php?action=grow1' method='post'>Qty: <input type='text' name='qty' value='{$ir['weed']}' class='loginbox' /><input type='submit' value='Grow' class='loginbox' /></form> <br /><a href='grow.php'>Go Back</a>"; } function grow_weed1() { global $db,$ir,$userid; $_POST['qty']= abs((int) $_POST['qty']); $cost=($_POST['qty']*10000); $time=($_POST['qty']*5); $quty=($_POST['qty']); if($ir['money'] < $cost) { echo "Your trying to grow more weed than you can afford.<br /><br /><a href='grow.php'>Go Back</a>"; exit; if($_POST['qty'] <= 0) { echo "Your trying to grow no weed!<br /><a href='grow.php'>Go back</a>"; } exit; } else { $db->query("UPDATE users SET money=money-$cost, weed=weed+$quty, weedtime=weedtime+$time WHERE userid=$userid"); echo "You started to grow {$_POST['qty']} ounces costing you $cost.<br /> Your weed will be ready in $time Minutes. <br /><br /><a href='grow.php'>Go back</a>"; } } function grow_sell() { global $db,$ir,$userid; echo "You currently have <b><font color='red'>{$ir['weed']}</font></b> ounce of Weed.<br /> One ounce will get you $7,500 <form action='grow.php?action=sell1' method='post'>Qty: <input type='text' name='qty' value='{$ir['weed']}' class='loginbox' /><input type='submit' value='Sell' class='loginbox' /></form> <br /><a href='grow.php'>Go Back</a>"; } function grow_sell1() { global $db,$ir,$userid; $_POST['qty']= abs((int) $_POST['qty']); if($_POST['qty'] <= 0) { echo "You dont have that much weed<br /><a href='grow.php'>Go back</a>"; } else { $price=($_POST['qty']*7500); $db->query("UPDATE users SET money=money+$price, weed=weed-{$_POST['qty']} WHERE userid=$userid"); echo "You sold {$_POST['qty']} ounces of weed for $price.<br /><br /><a href='grow.php'>Go back</a>"; } } function grow_treat() { global $db,$ir,$userid; echo "You currently have <b><font color='red'>{$ir['weed']}</font></b> ounce of Weed.<br /> It will cost you $1,000 to treat your weed.<br /> It will take 1 minute for each ounce of weed to complete.<br /> Treating your weed will allow you to see you weed at double its price.<br /> <form action='grow.php?action=treat1' method='post'>Qty: <input type='text' name='qty' value='{$ir['weed']}' class='loginbox' /><input type='submit' value='Treat' class='loginbox' /></form> <br /><a href='grow.php'>Go Back</a>"; } function grow_treat1() { global $db,$ir,$userid; $_POST['qty']= abs((int) $_POST['qty']); if($_POST['qty'] <= 0) { echo "You dont have that much weed to treat<br /><a href='grow.php'>Go back</a>"; } else { $price=($_POST['qty']*1000); $time=($_POST['qty']*1); $db->query("UPDATE users SET money=money-$price, weed=weed-{$_POST['qty']}, treatedweed=treatedweed+{$_POST['qty']}, weedtime=weedtime+$time WHERE userid=$userid"); echo "You treated {$_POST['qty']} ounces of weed for $price.<br /><br /><a href='grow.php'>Go back</a>"; } } function grow_sellt() { global $db,$ir,$userid; echo "You currently have <b><font color='red'>{$ir['treatedweed']}</font></b> ounce of treated Weed.<br /> One ounce will get you $20,000 <form action='grow.php?action=sellt1' method='post'>Qty: <input type='text' name='qty' value='{$ir['weed']}' class='loginbox' /><input type='submit' value='Sell' class='loginbox' /></form> <br /><a href='grow.php'>Go Back</a>"; } function grow_sellt1() { global $db,$ir,$userid; $_POST['qty']= abs((int) $_POST['qty']); if($_POST['qty'] <= 0) { echo "You dont have that much weed<br /><a href='grow.php'>Go back</a>"; } else { $price=($_POST['qty']*20000); $db->query("UPDATE users SET money=money+$price, treatedweed=treatedweed-{$_POST['qty']} WHERE userid=$userid"); echo "You sold {$_POST['qty']} ounces of weed for $price.<br /><br /><a href='grow.php'>Go back</a>"; } } $h->endpage(); ?> and then in explore add <a href='grow.php'>Grow Weed</a> The Cron: $db->query("UPDATE `users` SET weedtime=weedtime-1 WHERE `weedtime` > 0"); And your done, if you have any ideas on where i could expand etc please post here.
  19. I like this, would a CSS code added in overide the default chatbox style.
  20. oh right, well i aint that good yet, i did it this way as i noticed i dont always get the log in staff log. plus this way i can keep an eye on the staff without them really knowing. i shall improve on this once i learnt abit more./
  21. This is only small but i made it on my site and i though other game owners might want it to. First Create page called follow.php <?php $page = basename($_SERVER['PHP_SELF']. "?" . $_SERVER['QUERY_STRING']); if($ir['userid'] > 2) { event_add(1, "{$ir['username']} has loaded the page $page"); } ?> and then on all staff pages under include "sglobals.php"; Add include "follow.php";
  22. yeah, just putting in how to get it added into mccodes.
  23. Nope not quite sure on that yet,
  24. for me works with firefox and opera
  25. yup feedback goes nicely, there shouldn't be anything wrong with it i hope.
×
×
  • Create New...