
TMan
Members-
Posts
59 -
Joined
-
Last visited
Never
TMan's Achievements
Newbie (1/14)
0
Reputation
-
Re: V2 help in staff_users its saying NPC's user_level = 0 Type: <input type='radio' name='user_level' value='0' />NPC <input type='radio' name='user_level' value='1' checked='checked' />Regular Member Possibly something like: $db->query(sprintf("SELECT * FROM users WHERE user_level=%u" , 0)); The code you have is from that page but the function is from global_func.php: function user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } This Should lead you in the direction you want i believe.
-
Re: Great Potential CONTINUE after end func's: print "<hr><h3> Gang Wars</h3><hr> <table width=95% cellspacing=1 border='2' class='table'>"; $q=$db->query("SELECT w.*,g1.gangNAME as declarer, g1.gangRESPECT as drespect, g2.gangNAME as defender, g2.gangRESPECT as frespect FROM gangwars w LEFT JOIN gangs g1 ON w.warDECLARER=g1.gangID LEFT JOIN gangs g2 ON w.warDECLARED=g2.gangID WHERE g1.gangNAME != '' AND g2.gangNAME != ''"); if($db->num_rows($q) > 0) { while($r=$db->fetch_row($q)) {print "<tr> <td width=45%>[url='gangs.php?action=view&ID={$r[']{$r['declarer']}[/url] [{$r['drespect']} respect]</a></td> <td width=10%>vs.</td> <td width=45%>[url='gangs.php?action=view&ID={$r[']{$r['defender']}[/url] [{$r['frespect']} respect]</a></td> </tr>";} } else {print "</table>There are currently no gang wars in progress.";} print "Gang Territories Cost $250,000 each. Each territory gains $25,000 to the owners(gangs) Vault Daily. You need to be Press or VP in order to buy the Territories. Click the name of the Territory to buy it for your gang. "; echo' <center> <table width=95% height=60% border="4" background="gangcity.jpg" align="center"> <tr><td width="100" height="100"><center>'; ///TERRITORY 1//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER1!=%u", 0)); $gangdata=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata; if($gangdata['gangTER1'] == 0) {print "[url='gangwars.php?action=buy1']<font color='yellow'>[b]Territory 1[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 2//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER2!=%u", 0)); $gangdata2=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata2; if($gangdata2['gangTER2'] == 0) {print "[url='gangwars.php?action=buy2'][b]<font color='yellow'>Territory 2[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata2['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 3//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER3!=%u", 0)); $gangdata3=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata3; if($gangdata3['gangTER3'] == 0) {print "[url='gangwars.php?action=buy3']<font color='yellow'>[b]Territory 3[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata3['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 4//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER4!=%u", 0)); $gangdata4=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata4; if($gangdata4['gangTER4'] == 0) {print "[url='gangwars.php?action=buy4'][b]<font color='yellow'>Territory 4[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata4['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 5//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER5!=%u", 0)); $gangdata5=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata5; if($gangdata5['gangTER5'] == 0) {print "[url='gangwars.php?action=buy5'][b]<font color='yellow'>Territory 5[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata5['gangNAME']}[/b]</font>";} echo'</td></center> </tr> <tr> <td width="100" height="100"><center>'; ///TERRITORY 6//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER6!=%u", 0)); $gangdata6=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata6; if($gangdata6['gangTER6'] == 0) {print "[url='gangwars.php?action=buy6'][b]<font color='yellow'>Territory 6[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata6['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 7//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER7!=%u", 0)); $gangdata7=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata7; if($gangdata7['gangTER7'] == 0) {print "[url='gangwars.php?action=buy7'][b]<font color='yellow'>Territory 7[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata7['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 8//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER8!=%u", 0)); $gangdata8=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata8; if($gangdata8['gangTER8'] == 0) {print "[url='gangwars.php?action=buy8'][b]<font color='yellow'>Territory 8[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata8['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 9//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER9!=%u", 0)); $gangdata9=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata9; if($gangdata9['gangTER9'] == 0) {print "[url='gangwars.php?action=buy9']<font color='yellow'>[b]Territory 9[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata9['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 10//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER10!=%u", 0)); $gangdata10=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata10; if($gangdata10['gangTER10'] == 0) {print "[url='gangwars.php?action=buy10']<font color='yellow'>[b]Territory 10[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata10['gangNAME']}[/b]</font>";} echo'</td></center> </tr> <tr> <td width="100" height="100"><center>'; ///TERRITORY 11//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER11!=%u", 0)); $gangdata11=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata11; if($gangdata11['gangTER11'] == 0) {print "[url='gangwars.php?action=buy11'][b]<font color='yellow'>Territory 11[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata11['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 12//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER12!=%u", 0)); $gangdata12=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata12; if($gangdata12['gangTER12'] == 0) {print "[url='gangwars.php?action=buy12']<font color='yellow'>[b]Territory 12[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata12['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 13//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER13!=%u", 0)); $gangdata13=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata13; if($gangdata13['gangTER13'] == 0) {print "[url='gangwars.php?action=buy13'][b]<font color='yellow'>Territory 13[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata13['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 14//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER14!=%u", 0)); $gangdata14=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata14; if($gangdata14['gangTER14'] == 0) {print "[url='gangwars.php?action=buy14']<font color='yellow'>[b]Territory 14[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata14['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 15//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER15!=%u", 0)); $gangdata15=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata15; if($gangdata15['gangTER15'] == 0) {print "[url='gangwars.php?action=buy15']<font color='yellow'>[b]Territory 15[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata15['gangNAME']}[/b]</font>";} echo'</td></center> </tr> <tr> <td width="100" height="100"><center>'; ///TERRITORY 16//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER16!=%u", 0)); $gangdata16=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata16; if($gangdata16['gangTER16'] == 0) {print "[url='gangwars.php?action=buy16']<font color='yellow'>[b]Territory 16[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata16['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 17//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER17!=%u", 0)); $gangdata17=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata17; if($gangdata17['gangTER17'] == 0) {print "[url='gangwars.php?action=buy17']<font color='yellow'>[b]Territory 17[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata17['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 18//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER18!=%u", 0)); $gangdata18=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata18; if($gangdata18['gangTER18'] == 0) {print "[url='gangwars.php?action=buy18']<font color='yellow'>[b]Territory 18[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata18['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 19//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER19!=%u", 0)); $gangdata19=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata19; if($gangdata19['gangTER19'] == 0) {print "[url='gangwars.php?action=buy19']<font color='yellow'>[b]Territory 19[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata19['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 20//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER20!=%u", 0)); $gangdata20=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata20; if($gangdata20['gangTER20'] == 0) {print "[url='gangwars.php?action=buy20'][b]<font color='yellow'>Territory 20</font>[/b][/url] ";} else {print"<font color='yellow'>[b]{$gangdata20['gangNAME']}[/b]</font>";} echo'</td></center> </tr> <tr> <td width="100" height="100"><center>'; ///TERRITORY 21//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER21!=%u", 0)); $gangdata21=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata21; if($gangdata21['gangTER21'] == 0) {print "[url='gangwars.php?action=buy21'][b]<font color='yellow'>Territory 21</font>[/b][/url] ";} else {print"<font color='yellow'>[b]{$gangdata21['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 22//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER22!=%u", 0)); $gangdata22=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata22; if($gangdata22['gangTER10'] == 0) {print "[url='gangwars.php?action=buy22'][b]<font color='yellow'>Territory 22[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata22['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 23//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER23!=%u", 0)); $gangdata23=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata23; if($gangdata23['gangTER23'] == 0) {print "[url='gangwars.php?action=buy23'][b]<font color='yellow'>Territory 23[/b]</font>[/url] ";} else {print"<font color='yellow'>[b]{$gangdata23['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 24//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER24!=%u", 0)); $gangdata24=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata24; if($gangdata24['gangTER24'] == 0) {print "[url='gangwars.php?action=buy24'][b]<font color='navy'>Territory 24[/b]</font>[/url] ";} else {print"<font color='navy'>[b]{$gangdata24['gangNAME']}[/b]</font>";} echo'</td></center> <td width="100" height="100"><center>'; ///TERRITORY 25//// $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER25!=%u", 0)); $gangdata25=$db->fetch_row($gq); global $db,$ir,$c,$h,$gangdata25; if($gangdata25['gangTER25'] == 0) {print "[url='gangwars.php?action=buy25'][b]<font color='yellow'>Territory 25[/b]</font>[/url] ";} else {print"[b]<font color='yellow'>{$gangdata25['gangNAME']}[/b]</font>";} echo'</td></center></tr> </table> </center>'; $h->endpage(); ?>
-
Re: Great Potential CONTINUE after func10: function buy_11() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER11!=%u", 0)); $gangter11=$db->fetch_row($gt); if($gangter11==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata11=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata11['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER11=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 11 for your gang."; } } } else {die("403");} } function buy_12() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER12!=%u", 0)); $gangter12=$db->fetch_row($gt); if($gangter12==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata12=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata12['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER12=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 12 for your gang."; } } } else {die("403");} } function buy_13() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER13!=%u", 0)); $gangter13=$db->fetch_row($gt); if($gangter13==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata13=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata13['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER13=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 13 for your gang."; } } } else {die("403");} } function buy_14() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER14!=%u", 0)); $gangter14=$db->fetch_row($gt); if($gangter14==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata14=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata14['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER14=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 14 for your gang."; } } } else {die("403");} } // function buy_15() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER15!=%u", 0)); $gangter15=$db->fetch_row($gt); if($gangter15==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata15=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata15['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER15=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 15 for your gang."; } } } else {die("403");} } function buy_16() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER16!=%u", 0)); $gangter16=$db->fetch_row($gt); if($gangter16==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata16=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata16['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER16=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 16 for your gang."; } } } else {die("403");} } function buy_17() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER17!=%u", 0)); $gangter17=$db->fetch_row($gt); if($gangter17==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata17=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata17['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER17=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 17 for your gang."; } } } else {die("403");} } function buy_18() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER18!=%u", 0)); $gangter18=$db->fetch_row($gt); if($gangter18==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata18=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata18['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER18=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 18 for your gang."; } } } else {die("403");} } function buy_19() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER19!=%u", 0)); $gangter9=$db->fetch_row($gt); if($gangter19==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata19=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata19['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER19=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 19 for your gang."; } } } else {die("403");} } function buy_20() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER20!=%u", 0)); $gangter20=$db->fetch_row($gt); if($gangter20==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata20=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata20['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER20=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 20 for your gang."; } } } else {die("403");} } function buy_21() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER21!=%u", 0)); $gangter21=$db->fetch_row($gt); if($gangter21==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata21=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata21['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER21=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 21 for your gang."; } } } else {die("403");} } function buy_22() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER22!=%u", 0)); $gangter22=$db->fetch_row($gt); if($gangter22==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata22=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata22['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER22=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 22 for your gang."; } } } else {die("403");} } function buy_23() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER23!=%u", 0)); $gangter23=$db->fetch_row($gt); if($gangter23==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata23=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata23['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER23=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 23 for your gang."; } } } else {die("403");} } function buy_24() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER24!=%u", 0)); $gangter24=$db->fetch_row($gt); if($gangter24==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata24=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata24['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER24=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 24 for your gang."; } } } else {die("403");} } function buy_25() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER25!=%u", 0)); $gangter25=$db->fetch_row($gt); if($gangter25==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata25=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata25['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER25=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 25 for your gang."; } } } else {die("403");} } //////END FUNCTIONS//////////////
-
Re: Great Potential The Code:gangwars.php <?php include "globals.php"; switch($_GET['action']) { /////////////////START CASES/////////// case "buy1": buy_1(); break; case "buy2": buy_2(); break; case "buy3": buy_3(); break; case "buy4": buy_4(); break; case "buy5": buy_5(); break; case "buy6": buy_6(); break; case "buy7": buy_7(); break; case "buy8": buy_8(); break; case "buy9": buy_9(); break; case "buy10": buy_10(); break; case "buy11": buy_11(); break; case "buy12": buy_12(); break; case "buy13": buy_13(); break; case "buy14": buy_14(); break; case "buy15": buy_15(); break; case "buy16": buy_16(); break; case "buy17": buy_17(); break; case "buy18": buy_18(); break; case "buy19": buy_19(); break; case "buy20": buy_20(); break; case "buy21": buy_21(); break; case "buy22": buy_22(); break; case "buy23": buy_23(); break; case "buy24": buy_24(); break; case "buy25": buy_25(); break;} ////////////END CASES////////START FUNCTIONS////////////// function buy_1() {global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER1!=%u", 0)); $gangter1=$db->fetch_row($gt); if($gangter1==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata1=$db->fetch_row($gq)) {if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata1['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER1=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 1 for your gang."; } } } else {die("403");} } function buy_2() {global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER2!=%u", 0)); $gangter2=$db->fetch_row($gt); if($gangter2==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata2=$db->fetch_row($gq)) { if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata2['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER2=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d",$ir['gang'])); print "You paid \$$cost to buy Territory 2 for your gang."; } } else {die("403");} } } function buy_3() {global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER3!=%u", 0)); $gangter3=$db->fetch_row($gt); if($gangter3==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata3=$db->fetch_row($gq)) { if(!$gangid) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata3['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER3=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 3 for your gang.";} } } else {die("403");} } function buy_4() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER4!=%u", 0)); $gangter4=$db->fetch_row($gt); if($gangter4==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata4=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata4['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER4=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 4 for your gang.";} } } else {die("403");} } function buy_5() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER5!=%u", 0)); $gangter5=$db->fetch_row($gt); if($gangter5==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata5=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata5['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER5=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 5 for your gang."; } } } else {die("403");} } function buy_6() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER6!=%u", 0)); $gangter6=$db->fetch_row($gt); if($gangter6==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata6=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata6['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER6=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 6 for your gang."; } } } else {die("403");} } function buy_7() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER7!=%u", 0)); $gangter7=$db->fetch_row($gt); if($gangter7==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata7=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata7['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER7=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 7 for your gang."; } } } else {die("403");} } function buy_8() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER8!=%u", 0)); $gangter8=$db->fetch_row($gt); if($gangter8==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata8=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata8['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER8=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 8 for your gang."; } } } else {die("403");} } function buy_9() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER9!=%u", 0)); $gangter9=$db->fetch_row($gt); if($gangter9==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata9=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata9['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER9=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 9 for your gang."; } } } else {die("403");} } function buy_10() { global $db,$ir,$c,$userid,$gangdata; $gt=$db->query(sprintf("SELECT * FROM gangs WHERE gangTER10!=%u", 0)); $gangter10=$db->fetch_row($gt); if($gangter10==0) { $gangid=$ir['gang']; $gq=$db->query(sprintf("SELECT * FROM gangs WHERE gangID=%u", $gangid)); if($gangdata10=$db->fetch_row($gq)) { if(!$ir['gang']) {print "You're not in a gang.";} if($ir['ID'] != $gangdata['gangPRESIDENT'] || $ir['ID'] != $gangdata['gangVICEPRES']) {print"You Cannot Buy Territories unless your President or VP.";} if($gangdata10['gangMONEY'] < 250000) {print"Your gang doesn't have enough Money.";} else { $cost=250000; $db->query(sprintf("UPDATE gangs SET gangTER10=1, gangMONEY=gangMONEY-$cost WHERE gangID=%d", $ir['gang'])); print "You paid \$$cost to buy Territory 10 for your gang."; } } } else {die("403");} }
-
Well the way things are going I'll never complete this mod for sale..... So here you guys go. Have fun with it there could be many add-ons for this. As of right now it's just a place for gang pres/VP's to buy spots/territories for a $$ deposit daily to their gang vault. I wanted to add to attack so gangs could battle for Territories... I also wanted to make a staff_gangs edit for the price/payout/name of the territories. But due to loads of work and everything else I won't be able to finish this, and i feel you guys could do good with this if someone has the time and ambition. lol (also you may notice im still quite new to php and coding so give me a break lol) http://i630.photobucket.com/albums/uu21/Roach261/gangwars.png ALTER TABLE `gangs` ADD `gangTER1` INT(1) NOT NULL DEFAULT '0', ADD `gangTER2` INT(1) NOT NULL DEFAULT '0', ADD `gangTER3` INT(1) NOT NULL DEFAULT '0', ADD `gangTER4` INT(1) NOT NULL DEFAULT '0', ADD `gangTER5` INT(1) NOT NULL DEFAULT '0', ADD `gangTER6` INT(1) NOT NULL DEFAULT '0', ADD `gangTER7` INT(1) NOT NULL DEFAULT '0', ADD `gangTER8` INT(1) NOT NULL DEFAULT '0', ADD `gangTER9` INT(1) NOT NULL DEFAULT '0', ADD `gangTER10` INT(1) NOT NULL DEFAULT '0', ADD `gangTER11` INT(1) NOT NULL DEFAULT '0', ADD `gangTER12` INT(1) NOT NULL DEFAULT '0', ADD `gangTER13` INT(1) NOT NULL DEFAULT '0', ADD `gangTER14` INT(1) NOT NULL DEFAULT '0', ADD `gangTER15` INT(1) NOT NULL DEFAULT '0', ADD `gangTER16` INT(1) NOT NULL DEFAULT '0', ADD `gangTER17` INT(1) NOT NULL DEFAULT '0', ADD `gangTER18` INT(1) NOT NULL DEFAULT '0', ADD `gangTER19` INT(1) NOT NULL DEFAULT '0', ADD `gangTER20` INT(1) NOT NULL DEFAULT '0', ADD `gangTER21` INT(1) NOT NULL DEFAULT '0', ADD `gangTER22` INT(1) NOT NULL DEFAULT '0', ADD `gangTER23` INT(1) NOT NULL DEFAULT '0', ADD `gangTER24` INT(1) NOT NULL DEFAULT '0', ADD `gangTER25` INT(1) NOT NULL DEFAULT '0', OPEN: creategang.php FIND: $db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'')"); CHANGE TO: $db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)"); OPEN: cron_day.php FIND: $db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0 and donatordays>0"); $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); ADD: $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER1 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER2 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER3 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER4 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER5 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER6 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER7 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER8 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER9 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER10 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER11 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER12 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER13 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER14 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER15 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER16 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER17 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER18 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER19 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER20 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER21 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER22 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER23 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER24 > 0"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+25000 WHERE gangTER25 > 0");
-
Re: Xampp and Mccodes? yes it works with xampp lol. xampp is just a compilation of php apache and mysql in 1. xampp creates a server on your comp... upload the source code to your htdocs folder. then open your web browser and go to like. http://localhost.................... chances are you will have to run the installer and enter your dbdata.
-
Re: Level specific items Its just a check for lvl like housing. Look at your db at the housing it has min lvl. Add that to items in the db. (Ilvl for example) Add an update query to staff_item.php(and a txt box) Then add something like: $itlvl=mysql_query("SELECT * FROM items WHERE Ilvl<={$ir['level']}",$c); $itl=mysql_fetch_array($itlvl); To your itembuy.php or itemmarket.php not sure(cba 2 w/o $$ lol) And add lvl checks to stop 'illegal' buys. Its basically the exact same as housing(estate.php) More work but worth it if you want the luxury of adding min lvl to each item.
-
Re: Skill exp? You need to add cook to userstats in phpmyadmin. (Note: when adjusting userstats in the db remember to fix registration for userstats) Then add a query to update the userstats by a set/rand amount. $gain= (*your set/rand equation*(x*WILL/x)) $db->query("UPDATE userstats SET cook=cook+$gain WHERE userid=$userid",$c); Just an idea.. but should help u figure it out. Also just fallow the gym.php seeing as that's what your trying to do but for cooking.
-
Re: Mccodes V2 crime formula help In docrime.php you have an array that tells you which attributes you can use for crimes.(you can edit these to the userstats... that you want to be used for crimes) lines 18-21 else { $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); This says you can use LEVEL CRIMEXP EXP WILL and IQ for crimes. If you want to add strength agility and guard just add them lol. Example:(including STR, AGI, GRD) (array("LEVEL","CRIMEXP","EXP","WILL","IQ","STR","AGI","GRD"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ'], $ir['strength'], $ir['agility'], $ir['guard']),$r['crimePERCFORM'])
-
Attack Script made by us one that works Hopefully.
TMan replied to Uridium's topic in Free Modifications
Re: Attack Script made by us one that works Hopefully. I would like to see a different type of attack system. Not like the original attack until they are hospitalized. I'd like to see it with 1 click success: Both sides lose % of hp.(only cause not all fights are one sided) If loss attacker loses a higher %. If success opponent loses a higher %. Something simple like this: $ydamage=(str+guard+agi)+((hp*weap+armor)*will) $odamage=(str+guard+agi)+((hp*weap+armor)*will) $ydamage1=$ydamage*10 $odamage1=$odamage*10 $ydamage2=$ir['hp']*.28 $odamage2=$r['hp']*.28 $ydamage3=$ir['hp']*.32 $odamage3=$r['hp']*.32 if($ydamage>$odamage1) { $db->query("UPDATE users SET hp=hp-$ydamage2 WHERE userid={$ir['ID']}",$c) $db->query("UPDATE users SET hp=hp-$odamage3 WHERE userid={$_GET['ID']}",$c) print "You have made it past {$oppattack['username']}\'s defense Choose what to do now <form action='attackwon.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Mug Them' /></form> <form action='attackbeat.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Hospitalize Them' /></form> <form action='attacktake.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Leave Them' /></form>"; } if($ydamage<$odamage1) { print"You have failed to break through {$oppattack['username']}\'s Defense."; $db->query("UPDATE users SET hp=hp-$ydamage3 WHERE userid={$ir['ID']}",$c) $db->query("UPDATE users SET hp=hp-$odamage2 WHERE userid={$_GET['ID']}",$c) } But in my game I'm going to remove hosp from everything, except in attacks where they hosp the user. Also my game uses soldiers(hp) for attacks... you can remove that part. I'm also working on a mod for gangs, which will be like gang wars, but more in depth........and I need a better attack system. I have practically nothing completed here i know but it's just an example. g2g right now maybe i could assist in this later(if help is wanted) -
Re: Creating New Stat Problem If your adding a new stat to the userstats part of your sql You need to adjust your register.php accordingly or you will get errors when ppl sign up for your game.
-
Re: Can someone help $damaged=itemdamage > 0 (or <100 if you have it set that way) If($GET_['ID'] == $damaged) {print"You can not sell a damaged item";} else {(insert into itemadd...........................)} This will not work its an example. I have no idea of the weapon damage mod or its sql's so your on your own there.
-
Re: Multiple Cases switch($_GET['action']) { case "buy1": buy_1(); break; } function buy_1() { blah blah blah } Not sure if that's what your looking for
-
Re: Help with Custom Mod V2 A few hundred jeez. If it works perfectly from the installation instructions, and is secure. I understand the need to buy the rights to sell a mod somebody else created. But charging more than the source code itself is kinda rough. (seeing as your probably just going to modify/add to the current code and secure them)
-
Hello, I'm looking for somebody who might be willing to help me make a custom mod for my game. This mod will be for the gang side of Mccodes. I have everything set and functional for the mod. EXCEPT: the attacking system. - I want the gangs to be able to war for territories(spots on a map) - The wars will be for each sector of the map(there is 25 so far) - Instead of removing gang when Respect hits 0 it removes ALL territories. - Make a separate part of gang wars for each Territory Battle. (like respect for each territory, so when each respect hits 0 it sets the Territory of the battle back to 0 for the gang) I would like to be able to sell this mod after its construction for others to add to their games.(if this is a problem we can talk about it more) Not sure if I explained it well enough for you guys to understand. But I have to go to work right now and I'll be back in 9 hours. I would like free/cheap help with this mod. (note if your willing to help for free I will give you the whole mod and help with set-up) I believe this will be a nice mod for mccodes and well worth the effort if it can be finished. Any questions feel free to post or PM me. Thanks