Jump to content
MakeWebGames

WarMad

Members
  • Posts

    218
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by WarMad

  1. ya it is right at the top :/ i will add it to attack hosp and all that as well see if that helps
  2. nope no errors what so ever
  3. i will be turning this into v1 some time soon and giving it a try i like this idea
  4. im pretty sure this in attackwin.php should be telling it to do so $_SESSION['attacking'] = 0; correct me if i am wrong
  5. how would i make it to where if i added another userstat i could have one to where the more of this stat you have the longer you are stronger durring the fight say i attack you and yours is higher becides that all our other stats where identical then toward the end of the fight you win because all your stats get lowered by say 25 or 50% because your pretty much tired
  6. no matter what i do when a fight is over and i choose to put them in the hosp/mug/ or leave i get the thing for cheaters saying i lose all my exp how do i fix that? this is the code causing it   if ($dosessh && isset($_SESSION['attacking'])) { if ($_SESSION['attacking'] > 0) { print "<center><b>You tried to run from a fight.<br/>Dont worry for cheating you wont be going up a level any time soon.</b></center>"; mysql_query("UPDATE users SET exp=0 WHERE userid=$userid", $c); $_SESSION['attacking'] = 0; } }
  7. This is my first complete mod in a VERY long time i just started making games again if you want anything added or would like to add something feel free to do so run this in phpmyadmin -- -- Table structure for table `jobs` -- CREATE TABLE IF NOT EXISTS `jobs` ( `Jid` int(11) DEFAULT NULL, `Jname` varchar(255) NOT NULL, `Jlevel` int(11) NOT NULL, `Jpay` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `jobs` -- INSERT INTO `jobs` (`Jid`, `Jname`, `Jlevel`, `Jpay`) VALUES (1, 'job 1', 1, 100), (2, 'job 2', 5, 500); you will also have to add job and jobpay int 11 into the users table make a file called jobs.php and add this code <?php session_start(); require "global_func.php"; if ($_SESSION['loggedin'] == 0) { header("Location: login.php"); exit; } $userid = $_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is = mysql_query( "SELECT u.*,us.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid", $c) or die(mysql_error()); $ir = mysql_fetch_array($is); check_level(); $fm = money_formatter($ir['money']); $cm = money_formatter($ir['crystals'], ''); $lv = date('F j, Y, g:i a', $ir['laston']); $h->userdata($ir, $lv, $fm, $cm); $h->menuarea(); $_GET['id'] = abs((int) $_GET['id']); if (!isset($_GET['work'])) { $_GET['work'] = ''; } switch ($_GET['work']){ case 'apply': apply_job(); break; case 'hired': complete_job(); break; default: job_home(); break; } function job_home(){ global $ir,$userid,$c; $sql = sprintf("SELECT * FROM jobs ORDER BY Jid"); $sqll = sprintf("SELECT * FROM jobs WHERE Jid=%d",$ir['job']); echo "<table bgcolor='#c4c4c4' width='75%'>"; if($ir['job']) { $qq = mysql_query($sqll, $c); while($rr = mysql_fetch_array($qq)){ $jp = money_formatter($rr['Jpay']); echo "<tr><th colspan='4'>You currently work at {$rr['Jname']} making $jp a day.</th></td>"; } } echo "<tr><th>Job</th><th>Level</th><th>Pay</th><th>Apply</th></tr>"; $q = mysql_query($sql, $c); while($r = mysql_fetch_array($q)){ $jjp = money_formatter($r['Jpay']); echo "<tr align='center'><td>{$r['Jname']}</td><td>{$r['Jlevel']}</td><td>$jjp</td><td>"; if($r['Jlevel']<=$ir['level']){ echo "<a href='jobs.php?work=apply&id={$r['Jid']}'>Apply</a>"; } else {} echo "</tr>"; } echo "</table>"; } function apply_job(){ global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM jobs WHERE Jid=%d",$_GET['id']); $q = mysql_query($sql, $c); while($r = mysql_fetch_array($q)) {if(!$ir['level'] <=$r['Jlevel']){ echo "Are you sure you would like to apply at {$r['Jname']}<br/> <a href='jobs.php?work=hired&id={$_GET['id']}'>Yes</a><br/><a href='jobs.php'>No</a>"; } else { echo "Your level is to low for this job"; } } } function complete_job(){ global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM jobs WHERE Jid=%d",$_GET['id']); $q = mysql_query($sql, $c); while($r = mysql_fetch_array($q)){ if(!$ir['level'] <=$r['Jlevel']){ mysql_query("UPDATE users SET job={$_GET['id']}, jobpay={$r['Jpay']} WHERE userid=$userid", $c); echo "You got the job at {$r['Jname']}!<br/><a href='jobs.php'><font color='grey'>~</font> Back</a>"; } else { echo "Your level is to low for this job"; } } } $h->endpage(); ?> then add this in cron_day.php $work = sprintf("UPDATE users SET money=money +jobpay", $c) OR DIE(mysql_error()); $dowork = mysql_query($work); please give me your feedback let me know what you think about it im just learning how to secure things so please give me some info on that as well thank you
  8. images for the whole game and budget is kinda hard to say haha i will have to discuss that with who ever messages me about it and thank you ya that does help make people want to message me
  9. If there is a perfessional image maker on here please message me I have had no luck finding one i need images for my whole game
  10. yea i want this 2 but there is no way to download it
  11. i am willing to pay someone to fix this code and have it in good working condition and safe
  12. i used the one posted by Zephox
  13. i know this is an old post but im trying to get this working and no matter what when i click on the topic in any section i get put into the same topic and when i reply it all goes to the same place
  14. sorry it took me so long should be a little more secure now as long as i did it correctly
  15. ok how do i secure them i am really bad with that i dont want you to do it for me but give an example and i will see what i can do
  16. this is a very simple staff to to list first make a file called todo.php inside it put <?php session_start(); require "global****.php"; if ($_SESSION['loggedin'] == 0) { header("Location: login.php"); exit; } $userid = $_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysqlinformation.php"; global $c; $is = mysql_query( "SELECT u.*,us.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid", $c) or die(mysql_error()); $ir = mysql_fetch_array($is); check_level(); $fm = money_formatter($ir['money']); $cm = money_formatter($ir['crystals'], ''); $lv = date('F j, Y, g:i a', $ir['laston']); $h->userdata($ir, $lv, $fm, $cm); $h->menuarea(); switch ($_GET['action']) { case 'adddo': add_to_do(); break; case 'adddosub': add_to_sub(); break; default: a_home(); break; } function a_home() { global $ir, $userid, $h; if($ir['user_level'] >1) { $sql = sprintf("SELECT n.* FROM needsdone n ORDER BY status") or die(mysql_error()); [color=#000000][color=#0000BB]mysql_real_escape_string[/color][color=#007700]([/color][color=#0000BB]$_POST[/color][color=#007700][[/color][color=#DD0000]'name'[/color][color=#007700]]) [/color][/color] echo "<table width='65%'><tr><th>List</th><th>Status</th></tr>"; $q = mysql_query($sql); while($r = mysql_fetch_array($q)) { echo "<tr align='center'><td>{$r['doname']}</td><td>"; if ($r['status'] =='Complete') { echo "<font color='green'>{$r['status']}<\font>"; } else if ($r['status'] =='Started') {echo "<font color='yellow'>{$r['status']}<\font>"; } else { echo "<font color='Red'>{$r['status']}<\font>"; } Echo "</td></tr>"; } echo "<tr><th colspan='2' align='center'><a href='todo.php?action=adddo'>Add To List</a></th></tr></table>"; } else if($ir['user_level'] ==1) {echo "WHAT ARE YOU DOING! <br/>GET OUT NOW!!!!";} } function add_to_do() { echo "<table><tr><th>Add To The To Do List<\th><\tr> <tr><td align='center'><form action='todo.php?action=adddosub' method='post'> Name: <input type='text' name='name' /><br /> Status: <select type='dropdown' name='status'> <option value='Not Started'>Not Started</option> <option value='Started'>Started</option> <option value='Complete'>Complete</option></select><br/> <input type='submit' value='Add To List' /></form>"; } function add_to_sub() { if ($_POST['name'] == "") { echo "You did not fill out the form correctly"; } else if ($_POST['status'] == "") { echo "You did not fill out the form correctly"; } else { [color=#000000][color=#0000BB]mysql_real_escape_string[/color][color=#007700]([/color][color=#0000BB]$_POST[/color][color=#007700][[/color][color=#DD0000]'name'[/color][color=#007700]]) ;[/color][/color] mysql_query("INSERT INTO needsdone VALUES ('{$_POST['name']}', '{$_POST['status']}')") or die(mysql_error()); echo "Added to the to do list!<br/><Font color='grey'>~</font> <a href='todo.php'>back</a>"; } } $h->endpage(); ?> then run this query CREATE TABLE IF NOT EXISTS `needsdone` ( `doname` varchar(255) NOT NULL, `status` enum('Complete','Started','Not Started') NOT NULL DEFAULT 'Not Started' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `needsdone` (`doname`, `status`) VALUES ('test1', 'Complete'), ('test2', 'Started'), ('test3', 'Not Started');   then put this link where ever you would like it i recommend in the staff panel <a href='todo.php'>To Do List</a> and that is it if you guys have and ideas for it let me know i will see what i can do this is the first mod i have done in a long time i havent owned a game in roughly 6 years until now
  17. i will be testing this soon
  18. I'm going to add this later and see how it goes has this been tested?
  19. hmmm all i can see is the black bar is there anything i can do to fix that?
  20. No error or anything just doesn't redirect me to it
  21. Anyone? I am willing to pay
  22. its not showing an error but its not coming up when i go to the gym or crimes it just lets me train/commit crimes
  23. is there a way to get this to work on v1?
  24. Looking for someone who can make me some good and secure forums with rating and more pm me for more detail and with a price
  25. fixed it had to play with css
×
×
  • Create New...