Jump to content
MakeWebGames

jamboy1

Members
  • Posts

    183
  • Joined

  • Last visited

    Never

Everything posted by jamboy1

  1. Re: [MCcode V2] Ranks Thats just whats with MCcodes...
  2. Re: [MCcode V2] Ranks Oh ya, i copied and pasted from viewuser because i get abit lazy sometimes, and thanks
  3. I've been thinking about adding this to my game for quite some time and finally decided to do it myself. I have taken TC's rank names because i'm not very creative at words. first of all run this SQL:   ALTER TABLE `users` ADD `rank` INT(11) NOT NULL DEFAULT '1';   now in viewuser.php find: $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0)   and add underneath: if ($r['rank'] == 1) {$rank="#1 Absolute beginner";} else if ($r['rank'] == 2) {$rank="#2 Beginner";} else if ($r['rank'] == 3) {$rank="#3 Inexperienced";} else if ($r['rank'] == 4) {$rank="#4 Rookie";} else if ($r['rank'] == 5) {$rank="#5 Novice";} else if ($r['rank'] == 6) {$rank="#6 Below Average";} else if ($r['rank'] == 7) {$rank="#7 Average";} else if ($r['rank'] == 8) {$rank="#8 Reasonable";} else if ($r['rank'] == 9) {$rank="#9 Above Average";} else if ($r['rank'] == 10) {$rank="#10 Competent";} else if ($r['rank'] == 11) {$rank="#11 Highly competent";} else if ($r['rank'] == 12) {$rank="#12 Veteran";} else if ($r['rank'] == 13) {$rank="#13 Distinguished";} else if ($r['rank'] == 14) {$rank="#14 Highly distinguished";} else if ($r['rank'] == 15) {$rank="#15 Professional";} else if ($r['rank'] == 16) {$rank="#16 Star";} else if ($r['rank'] == 17) {$rank="#17 Master";} else if ($r['rank'] == 18) {$rank="#18 Outstanding";} else if ($r['rank'] == 19) {$rank="#19 Celebrity";} else if ($r['rank'] == 20) {$rank="#20 Supreme";} else {$rank="#21 Idol";}   Still in viewuser find:   Level: {$r[level']}   Add underneath: Rank: $rank   Now in index.php find:   $exp=(int)($ir['exp']/$ir['exp_needed']*100);   Add below if ($r['rank'] == 1) {$rank="#1 Absolute beginner";} else if ($ir['rank'] == 2) {$rank="#2 Beginner";} else if ($ir['rank'] == 3) {$rank="#3 Inexperienced";} else if ($ir['rank'] == 4) {$rank="#4 Rookie";} else if ($ir['rank'] == 5) {$rank="#5 Novice";} else if ($ir['rank'] == 6) {$rank="#6 Below Average";} else if ($ir['rank'] == 7) {$rank="#7 Average";} else if ($ir['rank'] == 8) {$rank="#8 Reasonable";} else if ($ir['rank'] == 9) {$rank="#9 Above Average";} else if ($ir['rank'] == 10) {$rank="#10 Competent";} else if ($ir['rank'] == 11) {$rank="#11 Highly competent";} else if ($ir['rank'] == 12) {$rank="#12 Veteran";} else if ($ir['rank'] == 13) {$rank="#13 Distinguished";} else if ($ir['rank'] == 14) {$rank="#14 Highly distinguished";} else if ($ir['rank'] == 15) {$rank="#15 Professional";} else if ($ir['rank'] == 16) {$rank="#16 Star";} else if ($ir['rank'] == 17) {$rank="#17 Master";} else if ($ir['rank'] == 18) {$rank="#18 Outstanding";} else if ($ir['rank'] == 19) {$rank="#19 Celebrity";} else if ($ir['rank'] == 20) {$rank="#20 Supreme";} else {$rank="#21 Idol";}   Still in index add: Rank: $rank where you'd like it to apear Now create a file called rank.php <?php if($ir['crimes'] == 1000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `crimes` = `crimes` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['crimes'] == 5000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `crimes` = `crimes` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['crimes'] == 10000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `crimes` = `crimes` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['crimes'] == 20000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `crimes` = `crimes` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['crimes'] == 50000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `crimes` = `crimes` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['busts'] == 250) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `busts` = `busts` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['busts'] == 1000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `busts` = `busts` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['busts'] == 5000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `busts` = `busts` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['busts'] == 10000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `busts` = `busts` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } if($ir['busts'] == 20000) { $sql = sprintf("UPDATE `users` SET `rank` = `rank` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql); $sql1 = sprintf("UPDATE `users` SET `busts` = `busts` + %d WHERE (userid = %u)", 1, @intval($userid)); $db->query($sql1); } ?>   In header.php find $enperc=(int) ($ir['energy']/$ir['maxenergy']*100);   Add above include "rank.php";   That should be it, more will be added to rank.php and you will need total crimes and total busts already on your game. Enjoy
  4. Re: [mccodes v2] Gang Pictures orrrrr, you could extract it from Richards gangs mod for free saving yourself a simple $15.... This mod isn't even worth $1 it's a free mod
  5. Re: [mccode v2] Mine Shaft sorry, but Uriah, lol? thats a mis spelling i believe it should be laugh out loud but i dont use lol often :D im too cool for school i use :L it's quick, simple and looks good on msn
  6. Re: Staff Applications [FREE] I think he means he didn't call it StaffApps.php I think what you did was call it "StaffApps" and thats it :) or maybe you just did something else, i'm not sure
  7. Re: The Standards of CE Mod! I believe he doesn't need to write with any capital letters, i often do when in the forums because i like to give the impression i can spell, although on msn i spell like an idiot But i've noticed people do seem to copy other people's mods and convert them, then change words, i admit, i suck at coding, but at least i do admit it :) and don't take other peoples mods
  8. Re: Staff Applications [FREE] There is an alternative Don't run SQL2 Convert it to V1 Delete everything that involves locking and locking the table, that should work fine
  9. Re: NEW V2 LOGIN PAGE I like the ones i can use to eat XD But i don't use them much, CSS tables are good :)
  10. Re: [V2] Pollution I thought what i make is bad... This is just wrong what your saying about putting { at the end... i don't understand, i'd do something like   $h->endpage(); ?> { {   when i believe it should be } $h->endpage(); ?>   Also in the 5 min cron, you don't need an if statement, it's just: $db->query("UPDATE users SET pollution=0 WHERE pollution > 0");
  11. Re: Warning   You got'a be kidding, right? Jesus... To be honest, I'm speechless. I really do not understand how you've just said that when the TWO post's above clearly state HE HACKED THROUGH CMARKET.PHP and btw, How would you know he hacked through cpanel anyway? Ok, he didn't hack through the Cpanel because he had a password already from you, still you need to patch up your cmarket
  12. Re: Warning I've given mine to 1 person, he was probably 98% clean, he liked to mess with my header a little just to give it a little something without testing it first :L but apart from that, i've been smart enough to say no oh, not everyone knows how to copy and paste XD i know people who can't, kinda funny, but not to be taking the piss if someone doesn't no much about computer :)
  13. Re: Warning i'm pretty clear he hacked through cpanel, but shouldn't that be patched up???
  14. Re: Warning For ArmageddonDude: Your a fraud, i can see that with the way you beg for Cpanel details. For Arkvoodle` You need to accept you've been beaten even though i know what you mean, it's just you were the one who fell for it, DON'T GIVE YOUR CPANEL DETAILS TO ANYONE I hope we all resolve this :D
  15. Re: Warning it's pretty simple... dont give him access to your cpanel same with anyone else
  16. Re: [MOD] Auto Hide Game Pages   loooooooooooooool :D nope
  17. Re: [V2] Libary thats a great mod and idea, i may use it for my game, later on and this way it can unlock new possibilities in the game :)
  18. Rules Ruuuuuuuuuuuules An important part of life they keep us alive, well, the right rules do some rules may not be "important" to some, but it's often best to follow the rules Why not just let them post the mod themselves :) btw screenshots are always good for mailbox's i like screenshots
  19. Re: Adding an Item It still doesn't work :S Abit confusing
  20. Re: Adding an Item Well, i'll post the SQL Create Item And the error SQL: 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, `armor` int(11) NOT NULL default '0', `primarywep` int(11) NOT NULL default '0', `meleewep` int(11) NOT NULL default '0', `donatorpack` int(11) NOT NULL default '0', PRIMARY KEY (`itmid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;   Create Item:   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' /><hr /> 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] Primary Weapon Power: <input type='text' name='primarywep' value='0' /> Melee Weapon Power: <input type='text' name='meleewep' 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']); $primarywep=abs((int) $_POST['primarywep']); $meleewep=abs((int) $_POST['meleewep']); $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,'{$_POST['itmpic']}, '', '', '')"); print "The {$_POST['itmname']} Item was added to the game."; stafflog_add("Created item {$_POST['itmname']}"); }   Error: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 0,', '', '', '')' at line 1 Query was INSERT INTO items VALUES('',2,'Broken Sword','A sword used by the elders of mankind salvaged from ruins found in a hidden place accross the mountain can still hit with minor damage',20000,1000,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;}', , 0,', '', '', '')   i love code tags XD
  21. Re: Adding an Item yes, i had, i have done the following tried after adding the mod tried replacing the table then had replaced the script for it to all run perfectly, but it still seems to be the same as before
  22. Re: [V2] Ignore User Mail [V2]   Jamboy which part are you having problems with are you getting an error is everyone else being put on ignore ? ya if i put one person on ignore, it will then put every othr player in the game on my ignore list there is no error
  23. Re: [V2] Ignore User Mail [V2] i've done exactly as you posted, and done no editing, it just doesn't seem to work :(
  24. QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 0,'')' at line 1 Query was INSERT INTO items VALUES('',2,'Broken Sword','This is an old sword, broken, but can inflict abit of damage on players',20000,1000,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;}', , 0,'')   ummmm, any help?? this is really confusing, i get this when adding an items :S i've tried replacing the table with a new copy but that didn't work
  25. Re: [V2] Ignore User Mail [V2] it didn't work for me, all the users will be ignored by the person who has someone on there ignore list, can someone help me with this?
×
×
  • Create New...