Jump to content
MakeWebGames

Oo-Savage-oO

Members
  • Posts

    91
  • Joined

  • Last visited

Everything posted by Oo-Savage-oO

  1. You people are assuming that this group will only make mccodes mods and sell them, but you are wrong. We will start off working on mccodes but if the project is successful and ourncoders and designers are doing a great job we may start working on different engines, or even create our own game engine. Anither thing you people are saying is that with 5 peop,e it will be too much. But. Also look at the fact that the more people the quicker the job will be done. For e.g if a person wants to make a template he first needs to create the images then he need to code it, a job which would take a week or two. But if you are in this team the designers will make the images and the three coders will put it together a job taking only two-three days .
  2. I have come up with this idea that I want to create a small team consisting of 3 coders and 2 designers, in which we will layout our ideas and make some brilliant mods. Some will be free others won't. This will benefit the entire MWG community as we will try our best to fulfill their needs. All profit will be divided evenly among all 5 of us. All we need is a small testing site where we can test our mods, and this can be achieved with a free host so there would be no expense. Now if you want to join just post in this thread, I myself will be a coder so I will need 2 more coders and 2 designers. Here are the requirements: 1. Must be active atleast 30-60 mins. 2. Must have knowledge of designing or coding(depending on what you want) 3. Must have made some mods before so I can know your skills. 4. Must actively participate. I hope you guys like the idea and you will reply
  3. @a_bertrand WHat will be the use of selling the site as whole when I am selling everything in it, anyway the domain is free one anyone wouldn't want it
  4. First of all I would like to state that there are paid mods but since I have paid for them and their rules state that one license means you can only install it on one site, so if I sell the codes I wouldn't be using it anymore, so it will only be used on one site, and anyway I am only selling one copy. Also the reason I am selling it much cheaper then the mccodes codes is because I am not selling my license. I am just selling it as one big mod, and if you wanna intall mods you must have the license. So you guys should think of this of one big paid mod instead of an entire site, as I am not selling the domain nor hosting.
  5. The login is made by myself, the header I turned a PSD into it and not all mods are free 50% are made myself along with a few paid ones, but yes some are free. But there are many crimes and items and stuff you will get along with it
  6. I didn't know where to post this, but I ended up posting here. I am tired of coding and anyway I don't have the time to run a game. So I wondered what to do with all the codes I worked so hard for, well here is my plan. My website is http://mafia-country.cz.cc I am selling all the files and the entire database. When I say all files I mean all files including globals.php, header.php login.php ext. You can see all the mods I have up on there by visiting the site. User: tester pass: test Offer me any price between $0-10. Nothing more then that. Here are a few things to note: 1. This package only include files not the domain and nor the hosting account. 2. I am not selling my mccodes license, so you must have your own liscense. 3. These codes are not 100% secure but they will protect you from most hacks. 4. If there are bugs tell me before buying, I won't help you after you buy the files.(You can find bugs by visiting the site) Offer me what ever you want and I will send over the files to the best offer.
  7. I am using mccodes here is my site http://www.mafia-country.cz.cc you urself can see what has happened
  8. I have been hacked by 077, who is this and how can i secure my site
  9. I wanna use the mod auto merits but i hav a question. Wouldnt it harm ur game to hav all those queries running everytime a user clicks
  10. You should add a seperate table for awards And one question Wouldnt it harm ur game to have all the award scripts running all the time everytime a user clicks
  11. Sorry the code didnt come correcty her it is <script type='text/javascript' src='http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US'></script> <script type='text/javascript'>FB.init('77e1ecbeca31b5bb2d30e90d9e543379');</script> <fb:fan profile_id='145874625443089' stream='' connections='10' width='250' height='230'></fb:fan>
  12. I am using this piece of code <script type='text/javascript' src='http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US'></script><script type='text/javascript'>FB.init('77e1ecbeca31b5bb2d30e90d9e543379');</script><fb:fan profile_id='145874625443089' stream='' connections='10' width='250' height='230'></fb:fan>   When I keep it in a seperate file it works fine, but when i keep it in a file such as header or anything It doesnt display Please tell what to do
  13. Now I wanna keep my CPU usage low what things effect CPU??
  14. I know but when someone does click it updates for all the days for e.g no one clicks for 3 days but on the 4th day someone does it updates for 4 days not one
  15. actually it doesnt for eg every 5 mins a person gets one brave if no one clicks for 20 mins then they click everyone will get 4 brave not one But I was asking about game performance is that better
  16. Well u see hawnted_dawg(forgive for wrong spelling) posted a removal of minute crons. I have extended it to make a removal of all crons. Now is that way better or should I revert back to original crons
  17. Here it is with timestamps, not tested though it should work it also has a little edit   <?php include "globals.php"; print "<h3>Investment Bank</h3><hr> "; $time=time(); if ( !$_GET['action'] ) { if($ir['bankTIME'] < $time AND $ir['bankCASH']) { print "Please click below to withdrawl your investment. <font size=3>\$".number_format($ir['bankCASH'])."</font> > [url='investbank.php?action=withdrawl']Withdrawl my investment now![/url] "; } else if($ir['bankTIME'] > $time) { $itime=($ir['bankTIME']-time()); $days=(int) ($itime/60/60/24); $dcheck=(int) ($days*60*60*24); $hrs=(int) ($itime-$dcheck); $hours=(int) ($hrs/60/60); $hrscheck=(int) ($hours*60*60); $mins=(int) ($itime-$hrscheck); $minutes=(int) ($mins/60); $mincheck=(int) ($minutes*60); $secs= (int)(($itime-$dcheck)-$hrscheck)-$mincheck; print "<font size=3>You currently have a investment for $days Days, $hours Hours,$minutes Minutes and $secs Seconds.</font> "; } else { print "Are you tired of never having money? This is a perfect business opportunity for you. Invest your hard earned cash, and profit of it. simple eh? Invest your money and make money without doing anything! There are no promises you will profit. You may settle, you may lose it. "; print "<table width='50%' bgcolor='#dcdcdc' cellspacing='0' cellpadding='3'> <th bgcolor='#dcdcdc' width='50%'>Rates</th> <th bgcolor='#dcdcdc' width='50%'>Money</th><tr>"; print "<td bgcolor='#dcdcdc' width='50%' align=center> <form action='investbank.php?action=invest' method='post'> <select name='rate' type='dropdown'> <option value='0.0035'>1 Day (0.35%) <option value='0.0095'>1 Week (0.95%) <option value='0.0215'>2 Weeks (2.15%) <option value='0.0395'>1 Month (3.95%) <option value='0.0535'>2 Month (5.35%) <option value='0.0675'>3 Months (6.75%) </select></td>"; print "<td bgcolor='#dcdcdc' width='50%' align=center> \$<input type='text' name='cash' value='{$ir['money']}' /></td><tr> <td bgcolor='#dcdcdc' width='50%' colspan=2 align=center> <input type='submit' value='Invest' /></form></td>"; print "</table>"; } } else if ( $_GET['action'] == 'invest' ) { $_POST['cash'] = abs((int) $_POST['cash']); if ( $ir['money'] < $_POST['cash'] ) { print "You dont have that kind of money! "; } else if ( $ir['bankTIME'] > $time ) { print "Your already investing! "; } else if ( $ir['bankCASH'] > 0 ) { print "Your already investing! "; } else { $interest = $_POST['cash'] * $_POST['rate']; $total = $_POST['cash'] + $interest; $T = $_POST['rate']; if ($T == 0.0035){$time1 = 1;} elseif ($T == 0.0095){$time1 = 7;} elseif ($T == 0.0215){$time1 = 14;} elseif ($T == 0.0395){$time1 = 30;} elseif ($T == 0.0535){$time1 = 60;} elseif ($T == 0.0675){$time1 = 90;} else { print "An error occured, Please try again. <hr>> [url='investbank.php']Back[/url]<hr>"; $h->endpage(); } $utime=time()+($time1*60*60*24); print "You have invested a total of [b]\$".number_format($_POST['cash'])."[/b] When your investment time is up (In $time1 Days) you will recieve a total of. <font size=4>[b]\$".number_format($total)."[/b]</font> "; print " > [url='investbank.php']Continue[/url] "; mysql_query("UPDATE users SET bankTIME = $utime, bankCASH = $total, money = money - {$_POST['cash']} WHERE userid=$userid"); } } else if ( $_GET['action'] == 'withdrawl' ) { if(!$ts->check($ir['bankTIME'])) { print "You either don't have an investment or your time isnt up "; } else if ( $ir['bankCASH'] < 0 ) { print "You dont have an investment! "; } else { mysql_query("UPDATE users SET money = money + {$ir['bankCASH']} WHERE userid=$userid"); print "You withdrew your investment of [b]\$".number_format($ir['bankCASH'])."[/b]! "; mysql_query("UPDATE users SET bankTIME = -1, bankCASH = 0 WHERE userid=$userid"); } } else { print "Sorry, This is an invalid link extension. "; } print " <hr>> [url='investbank.php']Back[/url]<hr>"; $h->endpage(); ?>
  18. I have a mailbox, now I want to make it that when a user is sending a mail and he forgets to enter a subject a alert comes and tells him to enter it. How can I make it that the alert comes without loading the page again, something type of like the default login has. here is my compose mail function mail_compose() { global $ir,$c,$userid,$h; echo <<< EOF <script type="text/javascript"> function insert(el,ins) { if (el.setSelectionRange){ el.value = el.value.substring(0,el.selectionStart) + ins + el.value.substring(el.selectionStart,el.selectionEnd) + el.value.substring(el.selectionEnd,el.value.length); } else if (document.selection && document.selection.createRange) { el.focus(); var range = document.selection.createRange(); range.text = ins + range.text; } } </script> <form action='mailbox.php?action=send' method='post'> <table width=75% border=2> <tr> <td>ID to send to:</td> <td><input type='text' name='userid' value='{$_GET['ID']}'/></td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject'/></td></tr><tr> <td>Message:</td> <td> <center> <input type="button" class="bbcode_hover" onClick="insert(this.form.message,'[b][/b]'); return false;" value="" /> <input type="button" class="bbcode_hover1" onClick="insert(this.form.message,'[i][/i]'); return false;" value="" /> <input type="button" class="bbcode_hover2" onClick="insert(this.form.message,'[u][/u]'); return false;" value="" /> <input type="button" class="bbcode_hover3" onClick="insert(this.form.message,'[url][/url]'); return false;" value="" /> <input type="button" class="bbcode_hover4" onClick="insert(this.form.message,'[s][/s]'); return false;" value="" /> <input type="button" class="bbcode_hover5" onClick="insert(this.form.message,'[img][/img]'); return false;" value="" /> <input type="button" class="bbcode_hover6" onClick="insert(this.form.message,'[center][/center]'); return false;" value="" /> <input type="button" class="bbcode_hover7" onClick="insert(this.form.message,'[color=#xxxxxx][/color]'); return false;" value="" /> <textarea name='message' rows='10' cols='70' style='color: black; background-color: white'></textarea> <input type="image" src="smilies/smiley1.gif" alt="Smile" title="smile" onclick="insert(this.form.message,':)'); return false;" /> <input type="image" src="smilies/smiley2.gif" alt="Wink" title="Wink" onclick="insert(this.form.message,';)'); return false;" /> <input type="image" src="smilies/smiley3.gif" alt="Suprised" title="Suprised" onclick="insert(this.form.message,':o'); return false;" /> <input type="image" src="smilies/smiley4.gif" alt="Cheesy Grin" title="Cheesy Grin" onclick="insert(this.form.message,':D'); return false;" /> <input type="image" src="smilies/smiley5.gif" alt="Confused" title="Confused" onclick="insert(this.form.message,':s'); return false;" /> <input type="image" src="smilies/smiley6.gif" alt="Sad" title="Sad" onclick="insert(this.form.message,':('); return false;" /> <input type="image" src="smilies/smiley7.gif" alt="Angry" title="Angry" onclick="insert(this.form.message,':red'); return false;" /> <input type="image" src="smilies/smiley8.gif" alt="Clown" title="Clown" onclick="insert(this.form.message,':clown'); return false;" /> <input type="image" src="smilies/smiley9.gif" alt="Embarrassed" title="Embarrassed" onclick="insert(this.form.message,':bashful'); return false;" /> <input type="image" src="smilies/smiley10.gif" alt="Star" title="Star" onclick="insert(this.form.message,':x'); return false;" /> <input type="image" src="smilies/smiley11.gif" alt="Sick" title="Sick" onclick="insert(this.form.message,':green'); return false;" /> <input type="image" src="smilies/smiley12.gif" alt="Bored" title="Bored" onclick="insert(this.form.message,':|'); return false;" /> <input type="image" src="smilies/smiley13.gif" alt="Begging" title="Begging" onclick="insert(this.form.message,';('); return false;" /> <input type="image" src="smilies/smiley14.gif" alt="Smug" title="Smug" onclick="insert(this.form.message,':]'); return false;" /> <input type="image" src="smilies/smiley15.gif" alt="Horny" title="Horny" onclick="insert(this.form.message,':horny'); return false;" /> <input type="image" src="smilies/smiley16.gif" alt="Cool" title="Cool" onclick="insert(this.form.message,':cool'); return false;" /> </center> </td></tr><tr> </td></tr><td colspan=2><input type='submit' value='Send' class='btn'></td></tr></table></form> EOF; if($_GET['ID']) { print " <table width=75% border=2><tr><td colspan=2>[b]Your last 5 mails to/from this person:[/b]</td></tr>"; $q=mysql_query("SELECT m.*,u1.username as sender from mail m left join users u1 on m.mail_from=u1.userid WHERE (m.mail_from=$userid AND m.mail_to={$_GET['ID']}) OR (m.mail_to=$userid AND m.mail_from={$_GET['ID']}) ORDER BY m.mail_time DESC LIMIT 5",$c); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>$sent</td> <td>[b]{$r['sender']} wrote:[/b] {$r['mail_text']}</td></tr>"; } OUT; $h->endpage(); } }
  19. Try this mite work   <?php include "sglobals.php"; switch($_GET['action']) { case 'newitem': new_item_form(); break; case 'newitemsub': new_item_submit(); break; case 'giveitem': give_item_form(); break; case 'giveitemsub': give_item_submit(); break; case 'killitem': kill_item_form(); break; case 'killitemsub': kill_item_submit(); break; case 'edititem': edit_item_begin(); break; case 'edititemform': edit_item_form(); break; case 'edititemsub': edit_item_sub(); break; case 'newitemtype': newitemtype(); break; default: print "Error: This script requires an action."; break; } function new_item_form() { global $db,$ir,$c; if($ir['user_level'] > 2) { die("403"); } print "<h3>Adding an item to the game</h3><form action='staff_items.php?action=newitemsub' method='post'> Item Name: <input type='text' name='itmname' value='' /> Item Desc.: <input type='text' name='itmdesc' value='' /> Item Type: ".itemtype_dropdown($c,'itmtype')." Item Buyable: <input type='checkbox' name='itmbuyable' checked='checked' /> Item Price: <input type='text' name='itmbuyprice' /> Item Sell Value: <input type='text' name='itmsellprice' /> <hr /> [b]Usage Form[/b]<hr /> [b]<u>Effect 1</u>[/b] On? <input type='radio' name='effect1on' value='1' /> Yes <input type='radio' name='effect1on' value='0' checked='checked' /> No Stat: <select name='effect1stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect1dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect1amount' value='0' /> <select name='effect1type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 2</u>[/b] On? <input type='radio' name='effect2on' value='1' /> Yes <input type='radio' name='effect2on' value='0' checked='checked' /> No Stat: <select name='effect2stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect2dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect2amount' value='0' /> <select name='effect2type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 3</u>[/b] On? <input type='radio' name='effect3on' value='1' /> Yes <input type='radio' name='effect3on' value='0' checked='checked' /> No Stat: <select name='effect3stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect3dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect3amount' value='0' /> <select name='effect3type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='0' /> Armor Defense: <input type='text' name='armor' value='0' /><hr /> <input type='submit' value='Add Item To Game' /></form>"; } function new_item_submit() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='admin.php?action=newitem']> Back[/url]"; $h->endpage(); exit; } $itmname=$db->escape($_POST['itmname']); $itmdesc=$db->escape($_POST['itmdesc']); $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); print "The {$_POST['itmname']} Item was added to the game."; stafflog_add("Created item {$_POST['itmname']}"); } function give_item_form() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } print "<h3>Giving Item To User</h3> <form action='staff_items.php?action=giveitemsub' method='post'> User: ".user_dropdown($c,'user')." Item: ".item_dropdown($c,'item')." Quantity: <input type='text' name='qty' value='1' /> <input type='submit' value='Give Item' /></form>"; } function give_item_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO inventory VALUES('',{$_POST['item']},{$_POST['user']},{$_POST['qty']})",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"); } function kill_item_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Deleting Item</h3> The item will be permanently removed from the game. <form action='staff_items.php?action=killitemsub' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Kill Item' /></form>"; } function kill_item_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM items WHERE itmid={$_POST['item']}"); $db->query("DELETE FROM shopitems WHERE sitemITEMID={$_POST['item']}"); $db->query("DELETE FROM inventory WHERE inv_itemid={$_POST['item']}"); $db->query("DELETE FROM itemmarket WHERE imITEM={$_POST['item']}"); print "The {$itemi['itmname']} Item was removed from the game."; stafflog_add("Deleted item {$itemi['itmname']}"); } function edit_item_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Editing Item</h3> You can edit any aspect of this item. <form action='staff_items.php?action=edititemform' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Edit Item' /></form>"; } function edit_item_form() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); print "<h3>Editing Item</h3> <form action='staff_items.php?action=edititemsub' method='post'> <input type='hidden' name='itmid' value='{$_POST['item']}' /> Item Name: <input type='text' name='itmname' value='{$itemi['itmname']}' /> Item Desc.: <input type='text' name='itmdesc' value='{$itemi['itmdesc']}' /> Item Type: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." Item Buyable: <input type='checkbox' name='itmbuyable'"; if ($itemi['itmbuyable']) { print " checked='checked'"; } print " /> Item Price: <input type='text' name='itmbuyprice' value='{$itemi['itmbuyprice']}' /> Item Sell Value: <input type='text' name='itmsellprice' value='{$itemi['itmsellprice']}' /><hr />[b]Usage Form[/b]<hr />"; $stats=array( "energy" => "Energy", "will" => "Will", "brave" => "Brave", "hp" => "Health", "strength" => "Strength", "agility" => "Agility", "guard" => "Guard", "labour" => "Labour", "IQ" => "IQ", "hospital" => "Hospital Time", "jail" => "Jail Time", "money" => "Money", "crystals" => "Crystals", "cdays" => "Education Days Left", "bankmoney" => "Bank money", "cybermoney" => "Cyber money", "crimexp" => "Crime XP"); for($i=1;$i<=3;$i++) { if($itemi["effect".$i]) { $efx=unserialize($itemi["effect".$i]); } else { $efx=array("inc_amount" => 0); } $switch1=($itemi['effect'.$i.'_on'] > 0) ? " checked='checked'" : ""; $switch2=($itemi['effect'.$i.'_on'] > 0) ? "" : " checked='checked'"; print "[b]<u>Effect {$i}</u>[/b] On? <input type='radio' name='effect{$i}on' value='1'$switch1 /> Yes <input type='radio' name='effect{$i}on' value='0'$switch2 /> No Stat: <select name='effect{$i}stat' type='dropdown'>"; foreach($stats as $k => $v) { if($k==$efx['stat']) { print "<option value='{$k}' selected='selected'>{$v}</option>\n"; } else { print "<option value='$k'>{$v}</option>\n"; } } if($efx['dir']=="neg") { $str="<option value='pos'>Increase</option><option value='neg' selected='selected'>Decrease</option>"; } else { $str="<option value='pos' selected='selected'>Increase</option><option value='neg'>Decrease</option>"; } if($efx['inc_type']=="percent") { $str2="<option value='figure'>Value</option><option value='percent' selected='selected'>Percent</option>"; } else { $str2="<option value='figure' selected='selected'>Value</option><option value='percent'>Percent</option>"; } print "</select> Direction: <select name='effect{$i}dir' type='dropdown'>{$str} </select> Amount: <input type='text' name='effect{$i}amount' value='{$efx['inc_amount']}' /> <select name='effect{$i}type' type='dropdown'>{$str2}</select><hr />"; } print "[b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='{$itemi['weapon']}' /> Armor Defense: <input type='text' name='armor' value='{$itemi['armor']}' /><hr /> <input type='submit' value='Edit Item' /></form>"; } function edit_item_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='staff_items.php?action=edititem']> Back[/url]"; $h->endpage(); exit; } $itmname=$_POST['itmname']; $itmdesc=$_POST['itmdesc']; $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $db->query("DELETE FROM items WHERE itmid={$_POST['itmid']}",$c); $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); print "The {$_POST['itmname']} Item was edited successfully."; stafflog_add("Edited item {$_POST['itmname']}"); } function newitemtype() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } } $h->endpage(); ?>
  20. plz post ur staff_items.php
  21. u can try this not sure it will work though did it in a huryy   <?php include "globals.php"; //add drugs $db->query("UPDATE dealer_data SET drugAMOUNT = ".mt_rand(10,20)." WHERE drugID=1"); $db->query("UPDATE dealer_data SET drugAMOUNT = ".mt_rand(5,15)." WHERE drugID=2"); $db->query("UPDATE dealer_data SET drugAMOUNT = ".mt_rand(10,15)." WHERE drugID=3"); $db->query("UPDATE dealer_data SET drugAMOUNT = ".mt_rand(5,10)." WHERE drugID=4"); $db->query("UPDATE dealer_data SET drugAMOUNT = ".mt_rand(5,10)." WHERE drugID=5"); $db->query("UPDATE dealer_data SET drugAMOUNT = ".mt_rand(5,10)." WHERE drugID=6"); $addheat = mt_rand(0,5); $info = $db->query("SELECT * FROM `dealer_global` WHERE `D_userid` = $userid"); if(!$db->num_rows($info)) { echo "Invalid source"; exit; } $user = $db->fetch_row($info); if($user['heat'] > 5) { $db->query("UPDATE dealer_global SET heat = heat - 5 WHERE D_userid = $userid"); } if($user['addiction'] > 5) { $db->query("UPDATE dealer_global SET addiction = addiction - 5 WHERE D_userid = $userid"); } if(!$user['martime'] || $user['martime'] < 0) { $db->query("UPDATE dealer_global SET martime = - 1, marijuana = marijuana + 1, heat = heat + $addheat WHERE D_userid = $userid"); event_add($userid,"You finished growing your marijuana."); } else { $db->query("UPDATE dealer_global SET martime = martime - 1 WHERE D_userid = $userid"); } if(!$user['coketime'] || $user['coketime'] < 0) { $db->query("UPDATE dealer_global SET coketime = - 1, cocaine = cocaine + 1, heat = heat + $addheat WHERE D_userid = $userid"); event_add($userid,"You finished making cocaine."); } else { $db->query("UPDATE dealer_global SET coketime = coketime - 1 WHERE D_userid = $userid"); } if(!$user['acidtime'] || $user['acidtime'] < 0) { $db->query("UPDATE dealer_global SET acidtime = - 1, acid = acid + 1, heat = heat + $addheat WHERE D_userid = $userid"); event_add($userid,"You finished making acid."); } else { $db->query("UPDATE dealer_global SET acidtime = acidtime - 1 WHERE D_userid = $userid"); } if(!$user['etime'] || $user['etime'] < 0) { $db->query("UPDATE dealer_global SET etime = - 1, ecstasy = ecstasy + 1, heat = heat + $addheat WHERE D_userid = $userid"); event_add($userid,"You finished making ecstasy."); } else { $db->query("UPDATE dealer_global SET etime = etime - 1 WHERE D_userid = $userid"); } if(!$user['herointime'] || $user['herointime'] < 0) { $db->query("UPDATE dealer_global SET herointime = - 1, heroin = heroin + 1, heat = heat + $addheat WHERE D_userid = $userid"); event_add($userid,"You finished making heroin."); } else { $db->query("UPDATE dealer_global SET herointime = herointime - 1 WHERE D_userid = $userid"); } if(!$user['methtime'] || $user['methtime'] < 0) { $db->query("UPDATE dealer_global SET methtime = - 1, meth = meth + 1, heat = heat + $addheat WHERE D_userid = $userid"); event_add($userid,"You finished making meth."); } else { $db->query("UPDATE dealer_global SET methtime = methtime - 1 WHERE D_userid = $userid"); } ?>
  22. Thats no use. When a player invests his muny he types of makes a contract that he wont be able to touch this money until investment time ends.
  23. I am trying to make my own honor awards mod, but I want it to auto credit the user he doesnt hav to click on a link. One option is too add the queries in the header.php file. But is it advisable to run 20-30 queries every click
  24. What a coincidence I was just about to make this mod. I was wondering how to do it when I came across this.
  25. Mine too but u can increase it
×
×
  • Create New...