
John1
Members-
Posts
42 -
Joined
-
Last visited
Never
John1's Achievements
Newbie (1/14)
0
Reputation
-
Re: Header ? where you find <table width="100%" border="0" cellpadding="0" cellspacing="0"> go and add in align=centre after <table <table align=center width="100%" border="0" cellpadding="0" cellspacing="0"> this should work as i have used it on games that i run which had the same problem
-
Re: [mccode] ReadRules I was talking to halo2master. :-) Oh sorry mate didn't realise
-
Re: [mccode] ReadRules The code i posted is exactly what i had put in my game which was taken from the original post by halo2master i take no credit for it and i do not wish to take any credit for it but the changes that i made to the mod have not changed the way it works but made it so it does work correctly. Also you still haven't spelt efficient correctly yet .
-
Re: [mccode] ReadRules i take no credit for this mod. For v2, if you used the original post and haven't been able to get it to work change this line in header if($ir['rulesread']<1) to if($ir['readrules']<1) and change the query to in gamerules.php $db->query("UPDATE users SET readrules=2 WHERE userid=$userid",$c); For those who haven't added this mod yet SQL: ALTER TABLE `users` ADD `readrules` int(11) NOT NULL default '0' Add in header.php where you want it to show up i added near the donate to your game bit: if($ir['readrules']<1) { print "You have not read the [url='gamerules.php']game rules[/url] yet. "; } Now go to gamerules.php and add this below "$h->menuarea();" $db->query("UPDATE users SET readrules=2 WHERE userid=$userid",$c);
-
Re: [mccode] ReadRules For V2 you need to paste this $db->query("UPDATE users SET readrules=2 WHERE userid=$userid",$c); under include "globals.php"; in order for it to work
-
Re: Mccodes Lite Exploits? depending on what mods you have mate will depend on the exploits that can be made, for example cmarket.php on V1 and V2 can be exploited very easily much the same with dmarket.php. this exploit can be made on lite aswell because V1 and lite are identical the only difference is that V1 has more features and mods
-
Re: Full user details Fatal error: Function name must be a string in /home/gamagang/public_html/fullinfo.php on line 35 Line:35 $pos_array(1, 2, 3, 4, 5);
-
Re: can nolonger login to owner account i have tried numerous things and that is one of them it still doesn't work
-
Re: can nolonger login to owner account it's only my account and my brothers accounts at the moment because i have a test account that i can still log in to
-
Re: Swim Mod For V2 [Free] this is basically a changed version of the mining mod
-
Re: Mining V2 Converted you need to go into your sql database and change the following values mine_level = 1 mine_exp = 0 mine_needed = 1000 power = 10 max_power = 10
-
[V2] Reward the active. - Punish the inactive.
John1 replied to Ragnar's topic in Free Modifications
Re: [V2] Reward the active. - Punish the inactive. but a month is only 30 days, i have it set to delete accounts that are left for more then 50 days -
Re: Mining V2 Converted i have added the files as an attachment, the code works. please read the install notes, and post any errors or problems u have
-
mccode-v1 Automatic total cost calculation in shop buy.
John1 replied to Will's topic in Free Modifications
Re: [mccode][v1]+[v2]Automatic total cost calculation in shop buy. Changed it so it says Total price under the Qty box just so ppl don't get confused can be seen working on www.real-criminals.info <?php include "globals.php"; $_GET['shop'] = abs((int) $_GET['shop']); if(!$_GET['shop']) { print "You begin looking through town and you see a few shops. "; $q=$db->query("SELECT * FROM shops WHERE shopLOCATION={$ir['location']}"); print "<table width=85% cellspacing=1 class='table'><tr style='background: gray;'><th>Shop</th><th>Description</th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>[url='shops.php?shop={$r[']{$r['shopNAME']}[/url]</td><td>{$r['shopDESCRIPTION']}</td></tr>"; } print "</table>"; } else { $sd=$db->query("SELECT * FROM shops WHERE shopID={$_GET['shop']}"); if($db->num_rows($sd)) { $shopdata=$db->fetch_row($sd); if($shopdata['shopLOCATION'] == $ir['location']) { print "Browsing items at [b]{$shopdata['shopNAME']}...[/b] <table cellspacing=1 class='table'><tr style='background: gray;'><th>Item</th><th>Description</th><th>Price</th><th>Sell Price</th><th>Buy</th></tr>"; $qtwo=$db->query("SELECT si.*,i.*,it.* FROM shopitems si LEFT JOIN items i ON si.sitemITEMID=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE si.sitemSHOP={$_GET['shop']} ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC"); $lt=""; ?> <script language="Javascript" type="text/javascript"> //<![CDATA[ function moneyformat(num) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + '$' + num); } function tot(id,a,b) { var c=a*Math.round(b); var d=moneyformat(c); document.getElementById("res" + id).innerHTML = d; } function clearText(thefield){ if (thefield.defaultValue==thefield.value) thefield.value = "" } function returnText(thefield){ if (thefield.value=='' || thefield.value==0) thefield.value = thefield.defaultValue } //]]> </script> <?php while($r=$db->fetch_row($qtwo)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=5>{$lt}</th></tr>"; } $buyprice=money_formatter($r['itmbuyprice']); $sellprice=money_formatter($r['itmsellprice']); ?><tr><td><? echo $r['itmname']; ?></td><td><? echo $r['itmdesc']; ?></td><td><? echo $buyprice; ?></td><td><? echo $sellprice; ?></td><td><form action='itembuy.php?ID=<? echo $r['itmid']; ?>' name="shopbuy" method='post'> Qty: <input type='text' name='qty' value='1' onkeyup="tot(<? echo $r['itmid']; ?>,<? echo $r['itmbuyprice']; ?>,this.value);" onfocus="clearText(this);" onblur="returnText(this);" /><input type='submit' value='Buy' /></form><div id="res<? echo $r['itmid']; ?>" align="center">Total cost <? echo $buyprice; ?></div></td></tr> <? } print "</table>"; } else { print "You are trying to access a shop in another city!"; } } else { print "You are trying to access an invalid shop!"; } } $h->endpage(); ?>