Jump to content
MakeWebGames

PrimeSuspect

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by PrimeSuspect

  1. Hello I noticed tht if you are in jail you cant see display explore.php and many other files but if you write it to browser manually you can access the page.Players can use this bug easly.For example if im in jail for 40 minutes i travel during jail time so you can save your travel time or i can shopping etc... How can i fix this bug for everypages?
  2. Hostgator is good for vps solutions but not web game hosting i thnk.I mean hostgator doesnt allow to run cron job less than 15min. for web hosting packages.
  3. 03laceys made the mod for me without any charge.Thanks alot...
  4. My problem is fixed by 03laceys thank you very much...
  5. There must be smt wrong with my inventory.php. cuz i changed the file with old one and it works.But i couldnt find whats wrong.Here is the codes...Maybe you can find whats wrong...   <?php include "globals.php"; $q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})"); print ' <div class="inventory_container"><div class="inventory_topbg"> '; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print ' <div class="generalinfo_txt"> <div>[img=images/info_left.jpg]</div> <div class="info_mid"><h2 style="padding-top:10px;"> Kuþanýlmýþ Eþyalar</h2></div> <div>[img=images/info_right.jpg]</div> </div> <div class="generalinfo_simple"> <table width="90%" class="table" style="text-align: center;"> <tr> '; if($equip[$ir['equip_primary']]['itmid']) { print"<td><font color=gold>[b]<h2>Ana Silah</h2>[/b]</font></td> <td>"; print $equip[$ir['equip_primary']]['itmname']." "; print $equip[$ir['equip_primary']]['itmpic']. "</td><td>[url='unequip.php?type=equip_primary']Eþyayý Çýkart[/url]</td>"; } else { print "<th><font color=gold>[b]Ana Silah[/b]</font></th> <td>Kuþanýlmamýþ.</td><td></td>"; } print "</tr> <tr> "; if($equip[$ir['equip_secondary']]['itmid']) { print "<td><font color=gold>[b]<h2>2.Silah</h2>[/b]</font></td> <td>";print $equip[$ir['equip_secondary']]['itmname']." "; print $equip[$ir['equip_secondary']]['itmpic']. "</td><td>[url='unequip.php?type=equip_secondary']Eþyayý Çýkart[/url]</td>"; } else { print "<th><font color=gold>[b]2.Silah[/b]</font></th> <td>Kuþanýlmamýþ.</td><td></td>"; } print "</tr> <tr>"; if($equip[$ir['equip_armor']]['itmid']) { print "<td><font color=gold>[b]<h2>Zirh</h2>[/b]</font></td> <td>"; print $equip[$ir['equip_armor']]['itmname']." "; print $equip[$ir['equip_armor']]['itmpic']. "</td><td>[url='unequip.php?type=equip_armor']Eþyayý Çýkart[/url]</td>"; } else { print "<th><font color=gold>[b]Zirh[/b]</font></th> <td>Kuþanýlmamýþ.</td><td></td>"; } print "</tr> </table> <h2 style='padding-top:10px;'> Envanterim</h2> "; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "[b]Hiç eþyanýz yok![/b]"; } else { print "[b]Eþyalarýnýz aþaðýda listelendi.[/b] <table width=100% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <th >Item Pic In Turkish</th> <th >Eþya</th> <th >Satýþ Deðeri</th> <th >Toplam Satýþ Deðeri</th> <th >Seçenekler</th> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><th colspan=5>[b]{$lt}[/b]</th></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<td>{$i['itmpic']}</td><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print "x{$i['inv_qty']}"; } print "</td><td>{$i['itmsellprice']} TL</td><td>"; print "".($i['itmsellprice']*$i['inv_qty']); print "TL"; $usershop=$db->query("select * from usershops where userid=$userid"); if(mysql_num_rows($usershop)!=0) { $addtoshop="[[url='addtoshop.php?ID={$i[']Dükkanda Sat[/url]]"; } print "</td><td>[[url='iteminfo.php?ID={$i[']Bilgi[/url]] [[url='itemsend.php?ID={$i[']Gönder[/url]] [[url='itemsell.php?ID={$i[']Sat[/url]] [[url='imadd.php?ID={$i[']Pazarda Sat[/url]] $addtoshop"; $usershop=$db->query("select * from usershops where userid=$userid"); if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']Silah olarak kuþan[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Zýrh olarak kuþan[/url]]"; } print "</td></tr> "; } print "<tr><th colspan=5></th></tr></table>"; print "[size="1"][b]Not:[/b] Kýrmýzý yýldýzlý [/size]<font color='red'>*</font>[size="1"] eþyalar savaþlarda silah olarak kullanýlabilir. Yeþil yýldýzlý [/size]<font color='green'>*</font>[size="1"] eþyalar savaþlarda zýrh olarak kullanýlabilir.[/size] </div><div>[img=images/generalinfo_btm.jpg]</div> </div></div></div></div></div> "; } $h->endpage(); ?>
  6. I set default as 0 but nothing changed.Same error again...
  7. Same error again :( Also i dont add picture from staff_item.php.I add pictures to itmpic table manually with <img src = /> code and it works.But now as i said before i cant edit or add an item to the game.When i try to do item removes from the table. Also this is the code tht i use to show pictures in shops.php iteminfo.php inventory.php   print "\n<tr><td>{$r['itmpic']}</td><td>{$r['itmname']}</td><td>{$r['itmdesc']}</td><td>{$r['itmbuyprice']} TL</td><td>{$r['itmsellprice']} TL</td><td><form action='itembuy.php?ID={$r['itmid']}' method='post'>Adet: <input type='text' STYLE='color: black; background-color: white;' name='qty' value='1' /><input type='submit' STYLE='color: black; background-color: white;' value='Sat?n Al' /></form></td></tr>";
  8. staff_items.php is same as original one nothing changed.I just added a table named itmpic to items.sql and when i want to add a picture for an item i add code to the itmpic table and it was working for me. Items.sql [mysql]-- phpMyAdmin SQL Dump -- version 3.2.4 -- http://www.phpmyadmin.net -- -- Anamakine: localhost -- Üretim Zaman?: 08 Ekim 2010 saat 19:31:16 -- Sunucu sürümü: 5.0.91 -- PHP Sürümü: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Veritaban?: `xxxxxxxx` -- -- -------------------------------------------------------- -- -- Tablo yap?s?: `items` -- CREATE TABLE IF NOT EXISTS `items` ( `itmid` int(11) NOT NULL auto_increment, `itmtype` int(11) NOT NULL default '0', `itmname` varchar(255) NOT NULL default '', `itmdesc` text NOT NULL, `itmbuyprice` int(11) NOT NULL default '0', `itmsellprice` int(11) NOT NULL default '0', `itmbuyable` int(11) NOT NULL default '0', `effect1_on` tinyint(4) NOT NULL default '0', `effect1` text NOT NULL, `effect2_on` tinyint(4) NOT NULL default '0', `effect2` text NOT NULL, `effect3_on` tinyint(4) NOT NULL default '0', `effect3` text NOT NULL, `weapon` int(11) NOT NULL default '0', `armor` int(11) NOT NULL default '0', `itmpic` varchar(255) NOT NULL, PRIMARY KEY (`itmid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=109 ; -- -- Tablo döküm verisi `items` -- INSERT INTO `items` (`itmid`, `itmtype`, `itmname`, `itmdesc`, `itmbuyprice`, `itmsellprice`, `itmbuyable`, `effect1_on`, `effect1`, `effect2_on`, `effect2`, `effect3_on`, `effect3`, `weapon`, `armor`, `itmpic`) VALUES (1, 1, 'Sack Lunch', 'Deliciously filled with nutrients. Even has a slice of your favorite cake!', 95000, 0, 1, 0, '', 0, '', 0, '', 0, 0, ''), (3, 5, 'Small Potion', 'Restores some health.', 500, 400, 1, 0, '', 0, '', 0, '', 0, 0, ''), (4, 5, 'First Aid Lotion', 'Heals a considerable amount of health.', 1500, 750, 1, 0, '', 0, '', 0, '', 0, 0, ''), (5, 1, 'Hamburger', 'A scrumptious burger.', 30, 20, 1, 0, '', 0, '', 0, '', 0, 0, ''), (6, 1, 'Sugar Snake', 'A snake covered in sugar.', 10, 5, 1, 0, '', 0, '', 0, '', 0, 0, ''), (7, 3, 'Dagger', 'A small gold dagger.', 200, 100, 1, 0, '', 0, '', 0, '', 0, 0, ''), (8, 3, 'Kitchen Knife', 'A knife filled with dreaded spirits of dead animals.', 2500, 1500, 1, 0, '', 0, '', 0, '', 0, 0, ''), (9, 3, 'Chainsaw', 'Cut up your foes.', 13250, 10925, 1, 0, '', 0, '', 0, '', 0, 0, ''), (11, 4, 'Colt', 'An average gun.', 5000, 3750, 1, 0, 'a:4:{s:4:"stat";s:6:"energy";s:3:"dir";s:3:"pos";s:8:"inc_type";s:6:"figure";s:10:"inc_amount";i:0;}', 0, 'a:4:{s:4:"stat";s:6:"energy";s:3:"dir";s:3:"pos";s:8:"inc_type";s:6:"figure";s:10:"inc_amount";i:0;}', 0, 'a:4:{s:4:"stat";s:6:"energy";s:3:"dir";s:3:"pos";s:8:"inc_type";s:6:"figure";s:10:"inc_amount";i:0;}', 100, 0, ''), (12, 4, 'Rifle', 'The standard in modern weaponry.', 25000, 17850, 1, 0, '', 0, '', 0, '', 0, 0, ''), (14, 4, 'Mini-Rocket Launcher', 'Blast your foes.', 99450, 78765, 1, 0, '', 0, '', 0, '', 0, 0, ''), (15, 1, 'SuperDuper Stick', 'restores 100% energy', 2147483647, 2147483647, 1, 0, '', 0, '', 0, '', 0, 0, ''), (34, 5, 'Will Potion', 'Heals will to 100%', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (35, 4, 'Scout Sniper rifle', 'will hurt big time', 99393, 78353, 1, 0, '', 0, '', 0, '', 0, 0, ''), (36, 4, 'Minigun', 'Sheer power', 100000, 75000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (37, 3, 'Diamond Dagger', 'Stabbing power to the max.', 450000, 275000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (38, 4, 'Rocket Launcher', 'Boom.', 220000, 170000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (39, 4, 'M16', 'Super Gun', 49000, 38000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (40, 6, 'Mafia Game Special', 'Extremely rare collectors item.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (42, 6, 'Tit an Implant', 'Titans own way of saying hi.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (74, 7, 'Leather Jacket', 'Nice biker style jacket', 750, 500, 1, 0, '', 0, '', 0, '', 0, 0, ''), (43, 6, 'Arsons Zippo', 'Arsons odd fantasy.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (45, 6, 'Gothic Warrior-Doll', 'Strong Warrior Slave', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (46, 2, 'Videogame Boy 2002', 'The ultimate in console action.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (47, 6, 'JaggerDoll', 'Won in a test of wits.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (49, 4, 'Hunting Bow', 'Medium range bow, silent and efficient', 425, 210, 1, 0, '', 0, '', 0, '', 0, 0, ''), (50, 3, 'Foldable Chair', 'infamous folding chair as seen in WWF!', 750, 375, 1, 0, '', 0, '', 0, '', 0, 0, ''), (51, 3, 'Nail Filer', 'nail accessory', 300, 150, 1, 0, '', 0, '', 0, '', 0, 0, ''), (52, 6, 'MasturNATion Doll', 'You can sure put this doll to good use.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (53, 6, 'Toonces Bouquet', '231 beautiful roses', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (55, 6, 'Nahdus Rubik Cube', '', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (56, 4, 'Calibre Machine Gun', 'Brute power', 175000, 130000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (58, 4, 'F90 Sub Machine Gun', 'extremely fast short to meduim distance gun', 40000, 30000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (59, 6, 'Noobi Diapers', 'For newbies', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (60, 3, 'Gladius', 'Superior dagger', 40000, 30000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (61, 3, 'Katana', 'Japanese style sword', 95000, 78000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (62, 3, 'Claymore', 'Mysterious Medievil Sword', 125000, 95000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (63, 3, 'Ragnarok', 'Mythical eastern Weapon', 175000, 125000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (64, 3, 'Diamond Sword', 'Cutting power to the max.', 2000000, 1700000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (65, 4, 'Battlements', 'Fully loaded battlements.', 5000000, 4000000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (66, 6, 'Conerias Duck Tape', 'Coneria brand duck tape', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (67, 6, 'Super Plushie', 'Good toy! What more could you want!', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (68, 6, 'Titanium NightVision Goggles', 'Increases your sight and accuracy at night', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (69, 6, 'Cyber-Surfboard', 'Netbois !!!!', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (70, 6, 'Nyuuubii Sword', 'Sword of the gods made for newbies', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (71, 7, 'Thick Jacket', 'Warm clothing for the long winter', 100, 75, 1, 0, '', 0, '', 0, '', 0, 0, ''), (73, 7, 'Trash Can Lid', 'Hard Round metal Lid', 200, 150, 1, 0, '', 0, '', 0, '', 0, 0, ''), (75, 7, 'Riot Shield', 'standard issue shield', 3000, 2250, 1, 0, '', 0, '', 0, '', 0, 0, ''), (77, 7, 'Semi-bullet proof Vest', 'Excellent Shield for beginners', 8750, 6000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (78, 6, 'Nuclear Bomb', 'Can kill anyone in one blow even though the guy is lvl 100000000 and has there stats higher than everyone! ****This weapon is restricted to poor people, but still can be buyable for a high enough prize****NOTE: This weapon can kill every member in the game and can gain you heaps of exp ! The Deadlyest weapon in the whole world', 1000000000, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (79, 7, 'Helmet and Vest', 'Newbie Shiled', 25000, 17850, 1, 0, '', 0, '', 0, '', 0, 0, ''), (80, 7, 'Plated armour', 'Heavy armour', 75000, 50000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (93, 7, 'God Father Suit', 'Advanced version: Agile body suit with maximum protection', 3250000, 2800000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (94, 7, 'Conerias DuckTaped Suit', 'Made with superior brand of duck tape', 150000, 125000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (83, 7, 'Mini-Tank', 'Small tank almost bullet proof', 750000, 550000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (92, 7, 'Diamond Suit', 'Agile body suit with super protection', 1500000, 1100000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (91, 7, 'Gothic Plate', 'Improved Shiled', 300000, 225000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (86, 4, 'mini-Rail Gun', 'New Improve technology', 4000000, 3000000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (87, 4, 'Mounted Rail Gun', 'Usually mounted on tanks', 10000000, 7500000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (90, 4, 'Arsons FlameThrower', 'Flamethrower', 150000, 115000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (89, 3, 'Light Saber', ' Unique Item ', 50000000, 40000000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (95, 6, 'Fifty Cent Piece', 'A small piece of ancient Mono History.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (96, 6, '1 Dollar', '1 freaking dollar coin.', 0, 0, 0, 0, '', 0, '', 0, '', 0, 0, ''), (97, 7, 'Plasma Shield', 'Battery powered arm guard', 25000000, 17500000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (98, 7, 'Rynax Plasma Shield', 'Made form a new type of power source', 60000000, 40000000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (99, 4, 'Plasma Gun', 'Fires Bolts of plasma Energy', 35000000, 22500000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (100, 4, 'Plasma Rifle', 'Full automatic energy rifle', 75000000, 50000000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (102, 4, 'Nuke Gun', 'Kill anyone with just one shot', 200000000, 125000000, 1, 0, '', 0, '', 0, '', 0, 0, ''), (105, 6, 'Conerians', 'Awarded to helpful players. Can be redeemed for rewards.', 0, 5000, 0, 0, '', 0, '', 0, '', 0, 0, ''), (107, 4, 'Bio Aeroactive 350', 'Shoots green plasma', 500000000, 300000000, 1, 0, '', 0, '', 0, '', 0, 0, ''); [/mysql] staff_items.php <?php include "sglobals.php"; //This contains item stuffs 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(); ?>
  9. Hello When i try to edit or add an item i get this error and the item tht i tried to edit removes from the database... QUERY ERROR: Query was INSERT INTO items VALUES('57',4,'Benelli m15','Automatic Shotgun',33000,26500,1, '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', 2, 0)
  10. I sent you my msn addres.Thanks for your interest... I would like to give you ++ karma too but i didnt find where it is lol :D
  11. Hello Guys i know there are some free item pic mods in forum but i coulndt get it work.I need a simple item picture mod tht pictures will seen in inventory item markets etc... I will pay...
  12. My question is simple.I just want to translate $date from english to turkish but the url tht you gave me is very long and hard to find my question's answer for me. anyway thank you
  13. Hello Im traslateing codes into my language but sometimes i exprience some noobish problems.When i cannot find a way i write here :) I want to change dates into my language for example September 14 2010, 2:42:23 am. it shows date as $date in files.But i couldnt find how i translate it.i appreciate if you help me :)
  14. Thank you very much.Its solved...
  15. Hello guys Im translateing files in my language but i cannot translate Hospital reasons like hospitalized by xxplayer , muged by xxxplayer etc.. Its shown like this ; {$r['hospreason']} also i check sql tables like hospital hospreason etc.. but i couldnt find anythning..
  16. Shouldn't there be a space between 1200 and WHERE i dunno..are you sure ? Edit : I checked the codes but i thnk its not about this.. This is the error what i have.. I solved the problem..You were right , i checked again staffjob.php and put a space between 1200 and WHERE and solved... Thank You...
  17. Shouldn't there be a space between 1200 and WHERE Yes.. I can easyly change it from the sql table (jobrank).But when i try to change it from the staff panel i get tht error..
  18. Shouldn't there be a space between 1200 and WHERE i dunno..are you sure ? Edit : I checked the codes but i thnk its not about this.. This is the error what i have..
  19. Hello ; i get this error when i try to edit a job rank.. QUERY ERROR: Query was UPDATE jobranks SET jrNAME='Nurse', jrJOB = 1, jrPAY= 1000, jrIQG=15, jrLABOURG=30, jrSTRG=18, jrIQN=1000, jrLABOURN=1500, jrSTRN=1200WHERE jrID=3 I only try to change name of the job rank.For example ; Chancing Nurse as Hemsire
  20. There is a example picture of the mod tht i want...i thnk its polish or whatever i dunno :D i want a mod sliding from right to left like in picture...
  21. Which command do you use ? ?f curl , try wget -c command. Check this topic.i was having same problem like you. MCCode v2 Cron Jobs Problem
  22. Hello I dunno if there is a mod like this but i couldnt find.I want a latest event mod as marquee.For example xxxplayer is in jail for 5min. , xxplayer has killed xx2player , xxxgang won the gang war at 5:00am...
  23. Editing ENUM('Male', 'Female') to ENUM('Erkek', 'Kad?n') and preferences , register files solved my problem. Thank you all
  24. Hi i know its a little bit noobish question.I translate every single files of my game from english to turkish but i have a problem about gender.It shows gender as Male and Female but i want to translate it.But it shows gender like this , {$r['gender']}.Pls tell me how can i traslate it and where can i find it (which file).
  25. But i want to use ravan theme with legal mccode v2 files..So there are some encoded and different files in ravan files...
×
×
  • Create New...