Jump to content
MakeWebGames

Mcfarlin

Members
  • Posts

    205
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Mcfarlin

  1. okay i like this mod but i agree it need the admin functions added, sooooo im gonna TRY it myself. here is what i have so far, working on the rest. cases [mysql]case 'newcompspecial': newcompspecial(); break; case 'compspecialedit': compspecialedit(); break; case 'compspecialdele': compspecialdele(); break;[/mysql]   Bit to add to globa_func.php [mysql]function compspecial_dropdown($connection,$ddname="compspecial",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT cs.*,bus.* FROM compspecials cs LEFT JOIN businesses bus ON cs.csJOB=c.cID ORDER BY c.cNAME ASC, cs.csNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['csID']}'"; if ($selected == $r['csID'] || $first == 0) { $ret.=" selected='selected'"; $first=1; } $ret.=">{$r['busNAME']} - {$r['csNAME']}</option>"; } $ret.="\n</select>"; return $ret; }[/mysql] the links for staff_bus.php (coming) [mysql]> Make a new Bus Special > Edit a Bus Special > Delete a Bus Special [/mysql] still working on the add edit and delete functions. bear with me or you may even help? lol if im wrong here jsut tel me what im screwing up on please, i am learning as much as i can here.
  2. you will have to have a table or a column within the users table to make this work, there has to be info stored to pull it to the hof for you. no info=no ranks showing in hof [mccode v2] Ranks Mod!!!! there is mine with screen shots of if working, now i know its not exactly what you are after here. BUT it will show that it can be done, you just have to figure out how within your game setup.   that givin what kind of game do you have? i may be able to help you make this work for you also.
  3. well what is it that monster_fight_opponent does? if you do not have it in there you will have to either add it to the table or delete it from the line you have entering it into the table. i have no idea what it does for you so i cant say either way what you should do, but id prolly run the SQL and just add it to the table.
  4. well first thing i would go look at is my table, 'field list' where your trying to update this information and see that i have added 'monster_fight_opponent' to it. Then might want to check the count as well so as they are matching fields and input variables.
  5. Those are the ranks from the rank mod your talking about bro, you can reword it anyhow you like. Just alter the code slightly to your liking.   I just took the ranks mod and spun it up to get what i wanted out of it.     Make a new colum in the users table called ranks, and insert into it the new rank when they reach the level at whitch they get the rank. then have the ranks show in the HOF.
  6. I modified that ranks mod to work for me, i have those as the users job ranks. and those are in the HOF to see. i also added job rank pics to the jobs page and on the users profile. though i dont have the pics showing in this HOF. if it helps you get to what your after you can have a look at this HOF using a standard V2 halloffame.php   [mysql]<?php include "globals.php"; $filters=array( 'nodon' => 'AND donatordays=0', 'don' => 'AND donatordays > 0', 'all' => ''); $filter=(isset($filters[$_GET['filter']])) ? $_GET['filter'] : 'all'; $myf=$filters[$filter]; $bt1=($filter=="nodon") ? "" : ""; $bet1=($filter=="nodon") ? "" : ""; $bt2=($filter=="don") ? "" : ""; $bet2=($filter=="don") ? "" : ""; $bt3=($filter=="all") ? "" : ""; $bet3=($filter=="all") ? "" : ""; print "<h3>Hall Of Fame</h3><hr /> Filter: [$bt1Non-Donators$bet1 | $bt2Donators$bet2 | $bt3All Users$bet3]<hr /> <table width=90% border=1 cellspacing=1 class='table'> <tr> <td>LEVEL</td> <td>MONEY</td> <td>RESPECT</td> <td>CRYSTALS</td> <td>TOTAL STATS</td> <td>RANK</td>//////////////////////////add the link for the ranks selection </tr> <tr> <td>STRENGTH</td> <td>AGILITY</td> <td>GUARD</td> <td>LABOUR</td> <td>IQ</td> </tr> </table>"; switch($_GET['action']) { case "level": hof_level(); break; case "money": hof_money(); break; case "crystals": hof_crystals(); break; case "respect": hof_respect(); break; case "total": hof_total(); break; case "strength": hof_strength(); break; case "agility": hof_agility(); break; case "guard": hof_guard(); break; case "labour": hof_labour(); break; case "iq": hof_iq(); break; case "jobrank"://////////////case for the ranks hof_jobrank(); break; } function hof_level() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest levels <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Level</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY level DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t{$r['level']}$et</td> </tr>"; } print "</table>"; } function hof_money() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest amount of money <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Money</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY money DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t\$".money_formatter($r['money'],'')."$et</td> </tr>"; } print "</table>"; } function hof_crystals() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest amount of rations <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Rations</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY crystals DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t".money_formatter($r['crystals'],'')."$et</td> </tr>"; } print "</table>"; } function hof_respect() { global $db,$ir,$c,$userid; print "Showing the 20 gangs with the highest amount of respect <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>Gang</th> <th>Respect</th> </tr>"; $q=$db->query("SELECT * FROM gangs ORDER BY gangRESPECT DESC,gangID ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['gangID'] == $ir['gang']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangNAME']} [{$r['gangID']}]$et</td> <td>$t".money_formatter($r['gangRESPECT'],'')."$et</td> </tr>"; } print "</table>"; } function hof_total() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest total stats <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY (us.strength+us.agility+us.guard+us.labour+us.IQ) DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_strength() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest strength <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY us.strength DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_agility() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest agility <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY us.agility DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_guard() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest guard <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY us.guard DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_labour() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest labour <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY us.labour DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } function hof_iq() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest IQ <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY us.IQ DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } //////////////////////////////////////////////new function to show ranks as i have them function hof_jobrank() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest Rank <table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level !=2 $myf ORDER BY u.jobrank DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } //////////////////////////////////////////////end rank function $h->endpage(); ?>[/mysql]
  7. bro im sorry but i cant do anything with that pic. not gonna be mean, just simply i cant help that one. best of luck on this thing.
  8. not sure what your wanting out of that ranks mod, but i have one very near that rank mod your talking about [mccode v2] Ranks if thats the mod your talking about here PM me and i can show you what i have.
  9. no it wasnt a part of it, i got this one up and working fine now. i just wasn't thinking about it correctly, then it hit me and TADA! lol
  10. not to buck the trend here, but i have purchased two mods from them and both work fine with minimal work on my end.   this one was only offered as V1 untill just recently, every armory mod i have seen has had a bug or two in it.
  11. just remember that some hosting companies are not very cron friendly. check when shopping for a hosting company, and where you can chat with a site admin or staff member about all your questions before paying one dime. most companies who are in it for the long haul will be more than happy to take a little time out to answer any questions you may have.
  12. np bro, they suck as a host in my opinion, got them when i knew no better. unfortunately still have that host. lol upgrading to dedicated server soon though they are fine for developing a game, just crappy for trying to run one.
  13. Mcfarlin

    Good idea

    vistas snipping tool works wonders here. if they want it they are gonna get the image no matter what you do.
  14. thx guys but i got it to work. prolly not the best way, but it does work. hehe
  15. think he was trying to fix the one that was here, well alter it anyhow.
  16. here are two screenies
  17. this bugged me from when i first seen it on here. what i have done is take this and incorporate it with the jobs. i only have one job in my game, so this works great. military game and they are enlisted in it. so thier rank is the job rank. i have the insignia showing on the jobs.php page. also the players rank now showing on viewuser.php as well. minor edits needed to jobs.php and a good deal on viewuser.php one sql to job ranks table. i will post screen shots here when i get the gathered up. and code edits to follow if anyone is interested.
  18. think its your host bro, i had them before and they are not cron friendly at all. i had to constantly reset the crons in c-pannel. reset it to a minute then let it run, after it runs once set it back to a day. see if that helps, did the trick for me with that host.
  19. same thing i had. never did get it to work though. i cant see anything in that file wrong to my noob eyes. lol
  20. I updated this with images in the place of text for the gifts. screen shot http://img199.imageshack.us/img199/7413/treeandgifts.jpg and http://img20.imageshack.us/img20/7413/treeandgifts.jpg [mysql]<?php include_once (DIRNAME(__FILE__) . '/globals.php'); if($ir['xmas'] > 4) { echo "You have already opened your presents from Santa"; $h->endpage(); } echo "<h4>Merry Christmas, Open your presents from Santa.</h4>"; switch($_GET['option']) { case 'xmas_1': xmas_1(); break; case 'xmas_2': xmas_2(); break; case 'xmas_3': xmas_3(); break; case 'xmas_4': xmas_4(); break; case 'xmas_5': xmas_5(); break; default: index(); break; } function index() { global $ir; echo sprintf(" Merry Christmas %s Santa has left you 5 presents to open under your christmas tree.</p> ", htmlspecialchars($ir['username']));; echo " "; echo " "; echo " "; echo " "; echo " "; } function xmas_1() { global $db, $ir, $userid, $h; if($ir['xmas'] !=0) { echo "Sorry, you have already opened this present."; $h->endpage(); } $cr=rand(1,10); if($cr == 2) { echo "Santa gave you just what you always wanted! An elite computer for your household. Unfortunately when you plug it in, the computer short circuits and gives you one heck of a jolt! The ambulance is called and you must spend some time in the hospital"; $db->query(sprintf("UPDATE users SET hp = %d, hospital =%d, hospreason = '%s', xmas=%d WHERE (userid=%u)",1,5,'Electricuted from faulty merchandise',1,$ir['userid'])); $h->endpage(); exit; } else { $xm=$db->query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1"); $r=$db->fetch_row($xm); $xmasitem=$r['itmid']; $name=$r['itmname']; $userid=$ir['userid']; echo "Merry Xmas, You have received a $name from SantaBack to Christmas Tree"; $db->query(sprintf("INSERT INTO inventory VALUES ('', %u, %u, %d)",$xmasitem,$userid,1)); $db->query(sprintf("UPDATE users SET xmas=%d WHERE userid=%u",1,$ir['userid'])); } } function xmas_2() { global $db, $ir, $userid,$h; if($ir['xmas'] !=1) { echo "You must open your presents in order! You missed the first one!"; $h->endpage(); exit; } $jail=rand(1,10); if($jail=7)// If Random Number is 7--User is Jailed { echo "After opening your 2nd package from Santa you are interrupted by a Knock on the front door. As you approach the front door you are taken back when the it is kicked in and agents swarm your house. Turns out the presents Santa gave you were hot merchandise and you have to pay the time. You're hauled off to jail."; $db->query(sprintf("UPDATE users SET jail = %u, jail_reason = '%s', xmas=%d WHERE (userid=%u)",5,'Holding stolen merchandise',2,$ir['userid'])); $h->endpage(); exit; } else { $money = mt_rand(100, 1000); $crystals = mt_rand(10, 50); echo sprintf("Instead of gifts this year you find %u money %u crystals in a small envelope. Merry Xmas!", "\$". number_format($money), number_format($crystals)); $db->query(sprintf("UPDATE users SET money = money + %u, crystals = crystals + %u, xmas = %d WHERE userid = %d", $money, $crystals, 2, $userid)); } } function xmas_3() { global $db, $ir, $userid, $h; if($ir['xmas'] !=2) { echo "You must open your presents in order. You missed the first 2!"; $h->endpage(); exit; } else { $xm=$db->query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1"); $r=$db->fetch_row($xm); $xmasitem=$r['itmid']; $userid=$ir['userid']; $item=$r['itmname']; echo "Merry Xmas, You have received a $item from Santa ClausBack to Christmas Tree"; $db->query(sprintf("INSERT INTO inventory VALUES ('', %u, %u, %d)",$xmasitem,$userid,1)); $db->query(sprintf("UPDATE users SET xmas=%d WHERE userid=%u", 3,$ir['userid'])); } } function xmas_4() { global $db, $ir, $userid,$h; if($ir['xmas'] != 3) { echo "You must open your presents in order! You missed the first 3!"; $h->endpage(); exit; } else { $xm=$db->query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1"); $r=$db->fetch_row($xm); $xmasitem=$r['itmid']; $userid=$ir['userid']; $item=$r['itmname']; echo "Merry Christmas, Santa Claus has given you a $item for christmas. Happy Holidays!"; $db->query(sprintf("INSERT INTO inventory VALUES ('', %u, %u, %d)",$xmasitem,$userid,1)); $db->query(sprintf("UPDATE users SET xmas=%d WHERE userid=%u", 4,$ir['userid'])); } } function xmas_5() { global $db, $ir, $userid,$h; if($ir['xmas'] != 4) { echo "You must open your presents in order! You missed the first 4!"; $h->endpage(); exit; } else { $xm=$db->query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1"); $r=$db->fetch_row($xm); $xmasitem=$r['itmid']; $userid=$ir['userid']; $item=$r['itmname']; echo "Merry Christmas, To celebrate the New Year Santa Claus has given you an $item. Happy Holidays!"; $db->query(sprintf("INSERT INTO inventory VALUES ('', %u, %u, %d)",$xmasitem,$userid,1)); $db->query(sprintf("UPDATE users SET xmas=%d WHERE userid=%u", 5,$ir['userid'])); } } $h->endpage(); ?>[/mysql]
  21. thx first thing i did myself. with minimal help. lol i had two word i didnt change and just didnt see em
  22. i cant see the error bro. i have a black bg, thats not it. when i try to go to view it, a white box flashes where the image should be, after refreshing several times i managed to read the whole error message, jsut simply stats that the file cannot be displayed cuz it has errors.?? PM me and i can get you in to see for yourself what im talking about here.   edit added screen shot. http://img199.imageshack.us/img199/2862/errorwo.jpg
  23. okay got the most of it to work. the previous files called for .png not .jpg images. lol fixed that and the calender shows fine, lets me open the doors. but when i try to view my calender after the file adventgraph.php "image cannot be displayed because it has error"
  24. [mysql]The requested URL /adventgraph.php was not found on this server.[/mysql] i looked to see if i missed that file, three times. lol but i dont see that its posted here. and shouldnt [mysql]$db->query("UPDATE users SET calturn=1 WHERE calturn=0");[/mysql] be [mysql]$db->query("UPDATE users SET calturn=calturn+1");[/mysql] correct me be all means if im wrong, but the first one will just set those who have not went to the advent calender and opened one, to they have opened one. the second one should keep those who have not opened any from joining in the fun mid way through the calender and getting the benefits of the whole thing. would it not? it would keep a guy from going there on the last day and just opening all of them right? that way they are rewarded for being active, not being on the last day.
  25. well this one sounds nice, that would fit in with mine very well. just change em to mercs and off they go. lol
×
×
  • Create New...