
MyGunWars
Members-
Posts
237 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by MyGunWars
-
Re: Complete new gang system... Sounds Like You Have A Good Mod Going. Here Are Some Of My Ideas: - Gang Images - Gang Allies, Leaders Can Become Allies With Other Gangs - Gang Enemies, Leaders Can Add Gangs The Hate To A List And There Allies Can See It. The Allies Can Also See If Your In A War And With Who. - I Have Some More But Are These Good Ideas?
-
Re: New type of Crimes!! Looks Good I May Uses This But Redo Some Of It For My Class Mod.
-
Re: [V2] Choose Benefits Looks Like A Good Mod Good Job Man.
-
Re: Building Mods - now for sale! Im Looking To Buy Tis Mod Mail Me On MSN. [email protected]
-
[V2] Class Benefits - Fighter || Traveller || Banker
MyGunWars replied to a topic in Free Modifications
Re: [V2] Class Benefits - Fighter || Traveller || Banker Ok Thanks Man. -
Re: Small mod to header [any version] +1 I Used It But I Changed It To Work With Showing My Game Icons.
-
[V2] Class Benefits - Fighter || Traveller || Banker
MyGunWars replied to a topic in Free Modifications
Re: [V2] Class Benefits - Fighter || Traveller || Banker The SQL is wrong, it should be: $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, class, email, bankmoney, lastip, lastip_signup, humanorzombie) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), $level, $money, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(),'{$_POST['class']}', '{$_POST['email']}', -1, '$IP', '$IP', $zom)"); I think, it is untested also, the fix i did is that you did $db->query("INSERT INTO users (username, login_name, userpass, level, $money, The error is here, this should not be $money becuse these are the fields names in the database table of users so it should be money, I Did Fix But Still Got The Error. I Cant Find It. Here My File. <?php session_start(); include "config.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; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $q=$db->query("SELECT userid FROM users"); $membs=$db->num_rows($q); $q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); $online=mysql_num_rows($q); $q=$db->query("SELECT userid FROM users WHERE gender='Male'"); $male=$db->num_rows($q); $q=$db->query("SELECT userid FROM users WHERE gender='Female'"); $fem=$db->num_rows($q); $q=mysql_query("SELECT * FROM users WHERE laston<unix_timestamp()-86400*10 ORDER BY laston DESC",$c); $act=mysql_num_rows($q); $perctact = $membs - $act; $pact = round( ($perctact/$membs)*100, 0 ); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } //thx to [url]http://www.phpit.net/code/valid-email/[/url] for valid_email function valid_email($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|("[^(\\|")]{0,62}"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } session_start(); print <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>.:My Gun Wars l Page You Are On: Registration :.</title> <link rel="shortcut icon" href="/images/URL.gif"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="imagetoolbar" content="no" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta name="author" content="" /> <meta name="copyright" content="" /> <meta name="revisit-after" content="3 days" /> <script type="text/javascript"> var xmlHttp // xmlHttp variable function GetXmlHttpObject(){ // This function we will use to call our xmlhttpobject. var objXMLHttp=null // Sets objXMLHttp to null as default. if (window.XMLHttpRequest){ // If we are using Netscape or any other browser than IE lets use xmlhttp. objXMLHttp=new XMLHttpRequest() // Creates a xmlhttp request. }else if (window.ActiveXObject){ // ElseIf we are using IE lets use Active X. objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") // Creates a new Active X Object. } // End ElseIf. return objXMLHttp // Returns the xhttp object. } // Close Function function CheckPasswords(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="http://www.mygunwars.com/check.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("passwordresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function CheckUsername(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="http://www.mygunwars.com/checkun.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("usernameresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function CheckEmail(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="http://www.mygunwars.com/checkem.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("emailresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function PasswordMatch() { pwt1=document.getElementById('pw1').value; pwt2=document.getElementById('pw2').value; if(pwt1 == pwt2) { document.getElementById('cpasswordresult').innerHTML="OK"; } else { document.getElementById('cpasswordresult').innerHTML="Not Matching"; } } </script> <link href="/css/signup.css" rel="stylesheet" type="text/css" /> </head> EOF; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } if($_POST['username']) { if($set['regcap_on']) { if(!$_SESSION['captcha'] or $_SESSION['captcha'] != $_POST['captcha']) { unset($_SESSION['captcha']); die("Captcha Test Failed >[url='register.php']Back[/url]"); } unset($_SESSION['captcha']); } if(!valid_email($_POST['email'])) { die("Sorry, the email is invalid. >[url='register.php']Back[/url]"); } if(strlen($_POST['username']) < 4) { die("Sorry, the username is too short. >[url='register.php']Back[/url]"); } $sm=100; if($_POST['promo'] == "MARC") { $sm+=1000; } $username=$_POST['username']; $username=str_replace(array("<", ">"), array("<", ">"), $username); $q=$db->query("SELECT * FROM users WHERE username='{$username}' OR login_name='{$username}'"); $q2=$db->query("SELECT * FROM users WHERE email='{$_POST['email']}'"); if($db->num_rows($q)) { print "Username already in use. Choose another. >[url='register.php']Back[/url]"; } else if($db->num_rows($q2)) { print "E-Mail already in use. Choose another. >[url='register.php']Back[/url]"; } else if($_POST['password'] != $_POST['cpassword']) { print "The passwords did not match, go back and try again. >[url='register.php']Back[/url]"; } else { $_POST['ref'] = abs((int) $_POST['ref']); $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $q=$db->query("SELECT * FROM users WHERE lastip='$IP' AND userid={$_POST['ref']}"); if($db->num_rows($q)) { die("No creating referral multies. Bad dog. >[url='register.php']Back[/url]"); } if($_POST['ref']) { $q=$db->query("SELECT * FROM users WHERE userid={$_POST['ref']}"); $r=$db->fetch_row($q); } $zom2=$db->query("SELECT * FROM hvzstats"); $hvz=$db->fetch_row($zom2); if($hvz['hvz'] ==1) { $zom=1; } else { $zom=0; } if($_POST['class'] == Citizen) { $level = 1; $money = 250; } if($_POST['class'] == Law Enforcer) { $level = 1; $money = 1000; } if($_POST['class'] == Gangster) { $level = 1; $money = 750; } if($_POST['class'] == P.I.M.P) { $level = 1; $money = 600; } if($_POST['class'] == Gambler) { $level = 1; $money = 500; } if($_POST['class'] == Thug) { $level = 1; $money = 400; } $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, class, email, bankmoney, lastip, lastip_signup, humanorzombie) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), $level, $money, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(),'{$_POST['class']}', '{$_POST['email']}', -1, '$IP', '$IP', $zom)"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); if($_POST['ref'] > 0) { $refer=$_POST['ref']; mysql_query("UPDATE users SET crystals=crystals+10,referals=referals+1 WHERE userid='$refer'",$c); event_add($refer,"You Received 10 Point For Referring A Player To The Game.",$c,'transfer'); mysql_query("INSERT INTO referals VALUES($refer,$i,1,0)",$c); } $message = "Welcome To My Gun Wars We HopeYou Enjoy The Game"; $db->query("INSERT INTO mail VALUES ('',0,1,$i,unix_timestamp(),'Welcome to {$set['game_name']}','{$message}')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid=$i"); if($_POST['ref']) { require "global_func.php"; $db->query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}"); event_add($_POST['ref'],"For referring $username to the game, you have earned 2 valuable crystalliums!",$c); $db->query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); } print "<center>You Have Signed Up, Enjoy The Game. > [url='login.php']Login[/url]</center>"; } } else { if($set['regcap_on']) { $chars="123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!?\\/%^"; $len=strlen($chars); $_SESSION['captcha']=""; for($i=0;$i<6;$i++) $_SESSION['captcha'].=$chars[rand(0, $len - 1)]; } $year=date('Y'); echo ' <center><h2>My Gun Wars Registration:</h2> <form action="signup.php" method="post" /> <table width="90%" border="0" class="table" cellspacing="0"> <tr> <td width="30%"><font color=red>*</font>Username</td> <td width="40%"><input type="text" name="username" onkeyup="CheckUsername(this.value);" /></td> <td width="30%"><div id="usernameresult"></div></td> </tr> <tr> <td><font color=red>*</font>Password</td> <td><input type="password" id="pw1" name="password" onkeyup="CheckPasswords(this.value);PasswordMatch();" /></td> <td><div id="passwordresult"></div></td> </tr> <tr> <td><font color=red>*</font>Confirm Password</td><td><input type="password" name="cpassword" id="pw2" onkeyup="PasswordMatch();" /></td> <td><div id="cpasswordresult"></div></td> </tr> <tr> <td><font color=red>*</font>Email</td><td><input type="text" name="email" onkeyup="CheckEmail(this.value);" /></td> <td><div id="emailresult"></div></td> </tr> <tr> <td><font color=red>*</font>Gender</td> <td colspan="2"> <select name="gender"> <option value="Male">Male</option> <option value="Female">Female</option> </select></td> </tr> <tr> <td><font color=red>*</font>Class:</td> <td colspan="2"> <select name="class" type="dropdown"> <option value="Citizen">Citizen <option value="Law Enforcer">Law Enforcer <option value="Gangster">Gangster <option value="P.I.M.P">P.I.M.P <option value="Gambler">Gambler <option value="Thug">Thug </select></td> </tr> <tr> <td>Promo Code</td><td colspan="2"><input type="text" name="promo" /></td> </tr>'; print " <tr> <td colspan='3'><center>[size="1"]By Clicking Sign Up, You Are Agreeing To The My Gun Wars [url='tos.php']<small>Terms of Service[/url] And [url='policy.php']<small>Privacy Policy[/url][/size]. <label><input name='' class='' value='Sign Up' type='submit'></label></center></td> </tr> </table></center> "; } echo' <center>My Gun Wars © Copyright 2007-2010</center> </body> </html>'; ?> -
[V2] Class Benefits - Fighter || Traveller || Banker
MyGunWars replied to a topic in Free Modifications
Re: [V2] Class Benefits - Fighter || Traveller || Banker Nice Job +1 And Would This Work: I Got Parse error: syntax error, unexpected T_STRING in /home/mygun4/public_html/mobile/signup.php on line 250 LINE 250: if($_POST['class'] == Citizen) { $level = 1; $money = 250; } if($_POST['class'] == Law Enforcer) { $level = 1; $money = 1000; } if($_POST['class'] == Gangster) { $level = 1; $money = 750; } if($_POST['class'] == P.I.M.P) { $level = 1; $money = 600; } if($_POST['class'] == Gambler) { $level = 1; $money = 500; } if($_POST['class'] == Thug) { $level = 1; $money = 400; } $db->query("INSERT INTO users (username, login_name, userpass, level, $money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, class, email, bankmoney, lastip, lastip_signup, humanorzombie) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), $level, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(),'{$_POST['class']}', '{$_POST['email']}', -1, '$IP', '$IP', $zom)"); -
Re: [Class - Spydre452] Update I'm adding it to my site i was going to code something like this my self but did not i kept putting it off. I cant wait to see more ideas and more features.
-
Re: [mccodes] Dogtags [$30.00] Can I Buy This Mod?
-
Re: Advanced Tax Mod [$5] I Will Like To Buy This Mod When You Are Done Making It. Mail Me: [email protected]
-
Re: [mccode v2] Player Card ($8) I Will Like To Get This Mod Mail Me. [email protected]
-
Re: [mccode v2] Site lockdown :-D Nice Add On I Added It To My Game No Problem. +1
-
Re: MCCodes Item info [Layout] Nice I Made My Own To. :-D
-
Re: [mccodes][V2]changable currency mod Looks Like A Good Mod
-
Re: [v2] New Header LOL I Tryed To Go To That Site http://street-crime.co.cc And I Brought Me To A Porn Site.
-
Re: [ANY] Another itmbuy.php Update I Used It But You Forgot A } At The End if($_POST['qty'] > 1) print "You bought {$_POST['qty']} {$itemd['itmname']}'s for \$$price"; } if($_POST['qty'] == 1) print "You bought {$_POST['qty']} {$itemd['itmname']} for \$$price"; } $h->endpage(); ?>
-
Re: [mccodes] New Crime System [$5.00] Does This Come With Crimes?
-
(MCCODES) V2 Layout For Sale $100 is starting bid
MyGunWars replied to doinkinator's topic in Paid Modifications
Re: (MCCODES) V2 Layout For Sale $100 is starting bid I Mailed You My Game Idea And Im Willing To Pay You $150 For It. -
Re: New Houses Mod [Mccodes V2] Becon HOUSE UPGRADE MOD: First open smenu.php! Find: [url='staff_houses.php?action=delhouse']Delete House[/url] Under it add: [url='staff_houses.php?action=addupgrade']Add Upgrade[/url] [url='staff_houses.php?action=editupgrade']Edit Upgrade[/url] [url='staff_houses.php?action=delupgrade']Delete Upgrade[/url] Then open global_func.php Find: $ret.=">{$r['itmtypename']}</option>"; } $ret.="\n</select>"; return $ret; } Under it add: function upgrade_dropdown($connection,$ddname="upgrade",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM house_upgrades ORDER BY upgradeName ASC"); if($selected < 1) { } else { $ret.="<option value='0'>-- None --</option>"; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['upgradeId']}'"; if ($selected == $r['upgradeId']) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['upgradeName']}</option>"; } $ret.="\n</select>"; return $ret; } Then open staff_houses.php Find: case "delhouse": delhouse(); break; Under it add: case "addupgrade": addupgrade(); break; case "editupgrade": editupgrade(); break; case "delupgrade": delupgrade(); break; case "delupgradesub": delupgradesub(); break; function addupgrade() { global $db, $ir, $c, $h, $userid; $uprice=abs((int) $_POST['price']); $uwill=abs((int) $_POST['will']); $uname=$_POST['name']; if($uprice and $uwill and $uname) { $q=$db->query("SELECT * FROM house_upgrades WHERE upgradeName='{$_POST['name']}'"); if($db->num_rows($q) != 0) { print "<h3>Sorry, you cannot have two upgrades with the same name.</h3> "; $h->endpage(); exit; } $db->query("INSERT INTO house_upgrades VALUES(NULL, '$uname', '$uprice', '$uwill')"); print "<h3>House upgrade {$uname} added to the game.</h3> "; stafflog_add("Created House Upgrade $uname"); } else { print "<h3>Add House Upgrade</h3> <form action='staff_houses.php?action=addupgrade' method='post'> Name: <input type='text' name='name' /> Price: <input type='text' name='price' /> Max Will: <input type='text' name='will' /> <input type='submit' value='Add Upgrade' /></form>"; } } function editupgrade() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $uprice=abs((int) $_POST['price']); $uwill=abs((int) $_POST['will']); $q=$db->query("SELECT * FROM house_upgrades WHERE upgradeMood={$uwill} AND upgradeId!={$_POST['upgrade']}"); if($db->num_rows($q)) { print "<h3>Sorry, you cannot have two upgrades with the same maximum will.</h3> "; $h->endpage(); exit; } $uname=$_POST['name']; $q=$db->query("SELECT * FROM house_upgrades WHERE upgradeId={$_POST['upgrade']}"); $old=$db->fetch_row($q); if($old['upgradeMood'] == 100 && $old['upgradeMood'] != $uwill) { die("Sorry, this house's upgrade cannot be edited."); } $db->query("UPDATE house_upgrades SET upgradeMood=$uwill, upgradeCost=$uprice, upgradeName='$uname' WHERE upgradeId={$_POST['upgrade']}"); //$db->query("UPDATE users SET maxwill=$will WHERE maxwill={$old['hWILL']}"); //$db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "<h3>House upgrade \"$uname\" was edited successfully.</h3> "; stafflog_add("Edited house upgrade $uname"); break; case "1": $q=$db->query("SELECT * FROM house_upgrades WHERE upgradeId={$_POST['upgrade']}"); $old=$db->fetch_row($q); print "<h3>Editing house Upgrade</h3> <form action='staff_houses.php?action=editupgrade' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='upgrade' value='{$_POST['upgrade']}' /> Name: <input type='text' name='name' value='{$old['upgradeName']}' /> Price: <input type='text' name='price' value='{$old['upgradeCost']}' /> Max Will: <input type='text' name='will' value='{$old['upgradeMood']}' /> <input type='submit' value='Edit House' /></form>"; break; default: print "<h3>Editing an Upgrade</h3> <form action='staff_houses.php?action=editupgrade' method='post'> <input type='hidden' name='step' value='1' /> House: ".upgrade_dropdown($c, "upgrade")." <input type='submit' value='Edit Upgrade' /></form>"; break; } } function delupgrade() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>House House Upgrade</h3> The upgrade will be permanently removed from the game. <form action='staff_houses.php?action=delupgradesub' method='post'> Item: ".upgrade_dropdown($c,'upgrade')." <input type='submit' value='Delete Upgrade' /></form>"; } function delupgradesub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM house_upgrades WHERE upgradeId={$_POST['upgrade']}"); $old=$db->fetch_row($d); $db->query("DELETE FROM house_upgrades WHERE upgradeId={$_POST['upgrade']}"); print "<h3>The \"{$old['upgradeName']}\" Upgrade was removed from the game.</h3>[url='staff_houses.php?action=delupgrade']>Back[/url]"; stafflog_add("Deleted house upgrade {$old['upgradeName']}"); }
-
Re: [mccode v2] Mine Shaft I Fixed It But I Ran Into A Bug The Users Can Mine At Any Level When There Like 1 They Are Mining 50.
-
Re: [mccode v2] Mine Shaft I Put Every Thing Where It Said And Its Not Going -1 For The Mine Times. Heres My Code: <?php require "globals.php"; $_POST['shaft'] = abs((int) $_POST['shaft']); echo '<h3>Mine Shaft</h3>'; $shaft_array = array(1, 5, 10, 25, 50, 60, 75, 100); if(in_array($_POST['shaft'], $shaft_array)) // checks if the posted data is valid { $costi = $ir['level']*2+3; // Normal level gain is +2 brave each level so $ir['level']*2+3 the plus 3 is because they start with 5 is the max will for the users level $cost = $costi/2; // the divide 2 allows multiple goes if you add a 3 they will get 3 goes and so on if($ir['brave'] < $cost) // checks to see if the user has enough brave { echo 'Invalid Command. You don\'t have enough brave for this shaft. >[url="'.$_SERVER['PHP_SELF'].'"]Go Back[/url]'; $h->endpage(); exit; } if($_POST['shaft'] <= 25) // checks if its a money function { $earn = rand(1, $_POST['shaft'])*2; // example: 44 multiplied by 2 equals 88, so the user gets $88 (i suggest editing this to maybe *5) which then would equal $220 $Mtype = 'money'; // This is basically what tells the sql query several lines down what to add depending on shaft in this case money } elseif($_POST['shaft'] > 25 AND $_POST['shaft'] <= 100) // checks if its a crystal function { $earn = rand(1, $_POST['shaft'])/2; // example: 88 divided by 2 equals 44, so the user would get 44 crystals (that's using shaft 100 [the max]) $Mtype = 'crystals'; // This is basically what tells the sql query several lines down what to add depending on shaft in this case crystals } $chance = rand(1, 3); if($chance == 3) { echo '<font color="green">[b]You\'re mining trip came out to be successful, you earned: $'.$earn.' congratulations.[/b]</font>'; $query = sprintf('UPDATE `users` SET %s = %s + %u, brave = brave - %u, Mturns = Mturns - %u WHERE userid = %u', $Mtype, $Mtype, $earn, $cost, 1, $userid); // %s is text AND %u is numbers $db->query($query); } else { echo '<font color="red">[b]You\'re mining trip came out to be disastrous.[/b]</font>'; $query = sprintf('UPDATE `users` SET brave = brave - %u WHERE userid = %u', $cost, $userid); $db->query($query); } echo ' >[url="'.$_SERVER['PHP_SELF'].'"]Go Back[/url]'; $h->endpage(); exit; } else { If (!$ir['Mturns']> 20) { echo 'Invalid Command. You Have Ran Out Of Turn Today. >[url="'.$_SERVER['PHP_SELF'].'"]Go Back[/url]'; $h->endpage(); exit; } echo '<center><h1>Welcome To The Mine Shaft</h1> There Are 2 Spots To Go Mining Points Or Money. But They Are Restricted Depending On Your Mine Level. You Have Turns [b]'.$ir['Mturns'].'[/b] To Use Today. </center>'; echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post"> <table width="60%" class="table" border="0" style="background:#000000" align="center"> <tr> <th width=50%>Level</th> <th width=50%>Do</th> </tr> <tr align="center" class="h"> <td colspan="2">Money</td> </tr> <tr align="center"> <td>1</td> <td><input type="radio" name="shaft" value="1"></td> </tr> <tr align="center"> <td>5</td> <td><input type="radio" name="shaft" value="5"></td> </tr> <tr align="center"> <td>10</td> <td><input type="radio" name="shaft" value="10"></td> </tr> <tr align="center"> <td>25</td> <td><input type="radio" name="shaft" value="25"></td> </tr> <tr align="center" class="h"> <td colspan="2">Crystal</td> </tr> <tr align="center"> <td>50</td> <td><input type="radio" name="shaft" value="50"></td> </tr> <tr align="center"> <td>60</td> <td><input type="radio" name="shaft" value="60"></td> </tr> <tr align="center"> <td>75</td> <td><input type="radio" name="shaft" value="75"></td> </tr> <tr align="center"> <td>100</td> <td><input type="radio" name="shaft" value="100"></td> </tr> <tr align="center" class="h"> <td colspan="2"><input type="submit" value="Mine"></form></td> </tr> </table> '; } $h->endpage(); ?>
-
(MCCODES) V2 Layout For Sale $100 is starting bid
MyGunWars replied to doinkinator's topic in Paid Modifications
Re: (MCCODES) V2 Layout For Sale $100 is starting bid doinkinator I Waiting To Here Back From You About My Custom Template. -
Re: Great Potential Sounds Like A Kool Mod I Going To Use It But Fix It Up Some More