Jump to content
MakeWebGames

gideon prewett

Members
  • Posts

    205
  • Joined

  • Last visited

Everything posted by gideon prewett

  1. ive just bought a mod but when i try to import the sql i get import.php: Missing parameter: import_type (FAQ 2.8) import.php: Missing parameter: format (FAQ 2.8) any idea because the faq aint helpful
  2. Re: [V2]New Explore screen shot?
  3. Re: [mccode v2] cars_mod staff_cars nice mod :-D
  4. Re: help with a few bugs ok thanks for that fix it worked great ive figured out where the organised crime bit is so here is my hour cron any ideas anybody?   <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $db->query("UPDATE gangs SET gangCHOURS=gangCHOURS-1 WHERE gangCRIME> 0"); $q=$db->query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangCRIME > 0 AND g.gangCHOURS = 0"); while($r=$db->fetch_row($q)) { $suc=rand(0,1); if($suc) { $log=$r['ocSTARTTEXT'].$r['ocSUCCTEXT']; $muny=(int) (rand($r['ocMINMONEY'],$r['ocMAXMONEY'])); $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+$muny,gangCRIME=0 WHERE gangID={$r['gangID']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'success', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Succeeded. Go [url='oclog.php?ID=$i']here[/url] to view the details.",$c); } } else { $log=$r['ocSTARTTEXT'].$r['ocFAILTEXT']; $muny=0; $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangCRIME=0 WHERE gangID={$r['gangID']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'failure', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Failed. Go [url='oclog.php?ID=$i']here[/url] to view the details.",$c); } } } if(date('G')==17) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY, u.exp=u.exp+(jr.jrPAY/20) WHERE u.job > 0 AND u.jobrank > 0"); $db->query("UPDATE userstats us LEFT JOIN users u ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET us.strength=(us.strength+1)+jr.jrSTRG-1,us.labour=(us.labour+1)+jr.jrLABOURG-1,us.IQ=(us.IQ+1)+jr.jrIQG-1 WHERE u.job > 0 AND u.jobrank > 0"); } $stock=$db->query("SELECT * FROM stock",$c); while($st=$db->fetch_row($stock)) { $rand1=(int) rand(1,2); $rand2=(int) rand(1,25); if($rand1 == 1) { $db->query("UPDATE stock SET stCOST=stCOST+$rand2,stPERC='$rand2' WHERE stID={$st['stID']}",$c); } else { $db->query("UPDATE stock SET stCOST=stCOST-$rand2,stPERC='-$rand2' WHERE stID={$st['stID']}",$c); } } $db->query("UPDATE stock SET stCOST=0 WHERE stCOST<0",$c); $db->query("DELETE FROM stock WHERE stCOST=0",$c); if($set['validate_period'] == 60 && $set['validate_on']) { $db->query("UPDATE users SET verified=0"); $db->query("UPDATE users SET tired=0 WHERE userid={$par['userid']}"); $db->query("UPDATE users SET tired=0 WHERE userid=$userid"); } ?>
  5. Re: Hacked :( well there still people and even if they are 14 or somthing its even worse because allot of u are older and some comments ive seen may make then give up coding all together   treat people how u wish to be treated (tell them to use the search box)
  6. Re: help with a few bugs thanks i will try it when my server comes bk online :@ what cron is organised crimes in? do u know anything about the job problem?
  7. ok i have 3 main problems but i get lost when looking at crons so i thought i would ask for some help 1. my jobs dont pay stats or money 2. my educational corses just go in to minus numbers 3. my organised crimes do the same as educational corses i figure as its all stuff that updates every day that u will need to see the day cron so here it is   <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM fedjail WHERE fed_days=0"); $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0"); $db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0"); $db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0"); $db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); $q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0"); $db->query("UPDATE users SET log=log-1 WHERE log > 0",$c); while($r=$db->fetch_row($q)) { $cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}"); $coud=$db->fetch_row($cd); $userid=$r['userid']; $db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})"); $upd=""; $ev=""; if($coud['crSTR'] > 0) { $upd.=",us.strength=us.strength+{$coud['crSTR']}"; $ev.=", {$coud['crSTR']} strength"; } if($coud['crGUARD'] > 0) { $upd.=",us.guard=us.guard+{$coud['crGUARD']}"; $ev.=", {$coud['crGUARD']} guard"; } if($coud['crLABOUR'] > 0) { $upd.=",us.labour=us.labour+{$coud['crLABOUR']}"; $ev.=", {$coud['crLABOUR']} labour"; } if($coud['crAGIL'] > 0) { $upd.=",us.agility=us.agility+{$coud['crAGIL']}"; $ev.=", {$coud['crAGIL']} agility"; } if($coud['crIQ'] > 0) { $upd.=",us.IQ=us.IQ+{$coud['crIQ']}"; $ev.=", {$coud['crIQ']} IQ"; } $ev=substr($ev,1); if ($upd) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid"); } $db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')"); } $db->query("UPDATE users SET course=0 WHERE cdays=0"); $db->query("TRUNCATE TABLE votes;"); ?>   all i will say is im asking for advice on how to fix my problems not to be slated for not knowing how to fix them
  8. Re: Think your a good coder? oh right got ya told u i was still half asleep lol
  9. Re: Think your a good coder? sorry i was still half asleep when i posted what im saying is if ur going to put a time limmit on ur wars think carfully on what that time limmit is   i personly dont like the idea of putting a time limmit on wars myself
  10. Re: Think your a good coder? if ur going to add a time limmit think very carefully about that limmit i know of a game that not only restricts the amount of times u can attack someone to 5 a day aswell if ur in a war it has a time limmit of 24 hours (half the members left the game)
  11. Re: Level specific items wouldnt it be better to add somthing to staff_item.php so when u fill in the form for a new item there is a section to say what lvl u have to be? i dunno how just an idea lol
  12. Re: Hacked :( i personly think allot of people on ce have the wrong idea most new members who are learning wont ask questions because of the abuse they get back to all u exsperienced coders out there who are constantly putting people and there mods down ur on a forum for learning and helping so HELP if ur not helping wats the point of being here to the thing i saw in this post that made me post this about people learning having games i dont do well learning from books so i started learning on a test game and a few friends joined up to see what i was doing even though i didnt have crons as it was on a free host now i own a game im sure its quite crap compared to allot of urs but im still new and LEARNING and my members know that and are happy the main thing thats giving these games a bad name is the amount of gangster/ pimp games that open up every day not just new coders learning
  13. Re: a couple of mods ok im not even sure how u would do it but it would be cool if when u mail a npc it sends a random mail bk? also as u have it so the npcs randomly attack could u have it so if u had a gang of npc's if u declair war on then they will fight bk?
  14. Re: I need help with a Mod i made u misunderstood what i ment yes u had help from others to finish the code but what about nathanmarck whos mine.php u blatently used to add to the streets
  15. Re: I need help with a Mod i made also if ur gunna claim somthing is urs atleast try to make it look like ur own work the searches are the standard mcc searches and well its ovious that its been merged with mine.php if ur working on a mod by useing bits of other peoples mods atleast be honest and give credit where its due
  16. Re: I need help with a Mod i made You are currently scavenging the streets. You can find everything here from money and crystals, to items and experience Your street level is 1 and you have 0/100 (0%) mining experience dont u mean street exp ?
  17. Re: [mccode v2] New improved mailbox. ok i may be slow but im stuck does anybody have a version of this that updates when u have a mail for v2 im useing the standard mainmenue if it helps
  18. Re: [mccode v2] Most of my Mods lol duh my bad its for the nudge mod to make the screen shake
  19. Re: Most of my Mods for V2     where do i add this? im a noob coder and im lost
  20. Re: Request for help thanks for ur help guys :x
  21. Re: THIS IS URGENT!!! why is this urgent?
  22. basically Ive got a shout box and i want to add a button to switch it on and off I'm sure its easy to do but Ive never done it so could someone help please
  23. Re: V2 index.php this is the style.css on my game   /* Template name: Grunge Superstar Template URI: [url]http://templates.arcsin.se/grunge-superstar-website-template/[/url] Release date: 2008-06-15 Description: A dirty, monochrome single-column template. Author: Viktor Persson Author URI: [url]http://arcsin.se/[/url] This template is licensed under a Creative Commons Attribution 2.5 License: [url]http://templates.arcsin.se/license/[/url] */ /* -------------------------------- General ----------------------------------- */ html { font-size: 62.5%; /* reset 1em to 10px */ height: 100%; } body { background: #444 url('img/body.jpg'); color: #444; font: normal 1.2em Verdana,Arial,sans-serif; height: 100%; padding-bottom: 1px; /* force scrollbars */ padding-top: 64px; } small,.small {font-size: 0.9em;} a { color: #EEC; text-decoration: none; } a:hover { color: #FFA; text-decoration: underline; } p {padding: 0.2em 0 1.2em;} legend {font-weight: bold;} /* -------------------------------- Headings, titles ----------------------------------- */ h1 {font: normal 2em Georgia,sans-serif;} h2 {font: normal 1.6em Georgia,sans-serif;} h3 {font: normal 1.4em Georgia,sans-serif;} h4 {font: bold 1em Georgia,sans-serif;} h1, h2, h3, h4 {margin-bottom: 5px;} /* -------------------------------- Main layout ----------------------------------- */ #paper_left { background: url('img/paper_left.gif') no-repeat left top; margin: 0 auto; padding-bottom: 34px; width: 778px; } #paper_right { background: url('img/paper_right.gif') no-repeat right bottom; } #layout_wrapper { background: #50504A url('img/grain_dark.gif'); margin: 0 auto; width: 736px; } #layout_container {padding: 8px;} #layout_content {border: 1px solid #333;} #header_image { height: 160px; background: #222 url('img/2582r8p.gif') no-repeat; border-bottom: 1px solid #222; border-top: 1px solid #111; } /* -------------------------------- Site title ----------------------------------- */ #site_title { background: #222; padding: 12px 20px; } #site_title h1 { color: #EED; font: normal 2em Georgia,sans-serif; margin: 0 0 5px; } #site_title h2 { color: #BFBFB6; font: normal 1.1em sans-serif; margin: 0; } /* -------------------------------- Navigation ----------------------------------- */ .navigation { background: #353535 url('img/navigation.jpg') repeat-x; border-bottom: 1px solid #222; border-top: 1px solid #555; } .navigation ul {display: inline; margin: 0;} .navigation ul li { border-right: 1px solid #303030; float: left; list-style: none; } .navigation a { color: #AAA; display: block; font: bold 1em Verdana,sans-serif; padding: 12px 14px; text-decoration: none; } .navigation a:hover { background: #444; color: #E5E5D5; text-decoration: none; } .navigation li.current_page_item a { background: none; color: #EEE; } /* Sub navigation */ #subnav a { padding: 10px; font-size: 0.9em; } /* -------------------------------- Main ----------------------------------- */ #main { background: #4A4A4A; color: #CCC; } /* -------------------------------- Bottom ----------------------------------- */ #bottom { background: #222; border-bottom: 1px solid #1A1A1A; border-top: 1px solid #2A2A2A; color: #AAA; padding: 16px; } #bottom ul li { border-bottom: 1px solid #303030; } #bottom ul li a { color: #777; display: block; padding: 4px 6px; } #bottom ul li a:hover { background: #2A2A2A; color: #FFC; text-decoration: none; } /* -------------------------------- Footer ----------------------------------- */ #footer { background: #2A2A2A; border-bottom: 1px solid #1A1A1A; border-top: 1px solid #333; color: #888; font-size: 0.9em; padding: 10px 12px; } #footer a {color: #AAA;} #footer .right,#footer .right a {color: #555;} #footer a:hover {color: #BBB;} /* -------------------------------- Floats ----------------------------------- */ .left {float: left;} .right {float: right;} .clear,.clearer {clear: both;} .clearer,.block { display: block; line-height: 0; font-size: 0; } .clearer {height: 0;} /* -------------------------------- Misc ----------------------------------- */ /* Images */ img.bordered {padding: 3px; background: #666;} /* Text */ .tleft {text-align: left;} .tcenter {text-align: center;} .tcenter2 {text-align: center; font-style: italic;} .tright {text-align: right;} .vtop {vertical-align: top;} /* Label */ .label { background: #222 url('img/post_top.gif') repeat-x left top; border-bottom: 2px solid #555; color: #BBB; margin: 0; padding: 0.5em 0.8em 0.6em; } /* Margin, padding, width, height */ .ptb10 {padding: 10px 0;} /* -------------------------------- Posts ----------------------------------- */ .post { background: #363636; border-bottom: 1px solid #111; } .post_top { background: #222 url('img/post_top.gif') repeat-x left top; border-bottom: 4px solid #777; border-top: 1px solid #3A3A3A; padding: 10px 16px 13px; } .post_title h2 { font-size: 2em; margin: 0; padding: 0; } .post_body { background: url('img/post_body.jpg') no-repeat left top; border-top: 1px solid #333; padding: 16px 16px 0; } .post_metadata {padding: 10px;} .post_metadata .content { background: #424242; color: #999; font-size: 0.9em; padding: 10px 12px; } .post_metadata a {color: #BBB;} .post_metadata a:hover {color: #DDD;} .post_body ul, .post_body ol {margin: 0 0 1em 1.5em;} .post_body ul {list-style: disc;} .post_body ol {list-style: decimal;} /* ---------------------------------------- Forms ------------------------------------------- */ form {margin: 0; padding: 0;} /* Inputs */ input { background-color: #484848; color: #FFA; } select { background-color: #484848; color: #FFA; } input#s, textarea, input.styled { background: #DDD; border: 3px solid #555; font: normal 1em Verdana,sans-serif; padding: 3px; width: 160px; } textarea {width: 440px;} body { background: #2D2D2D; font-family:Verdana, fantasy; font-size:13px; color: white; scrollbar-base-color: black; scrollbar-arrow-color: red; scrollbar-DarkShadow-Color: black; } a:visited,a:active,a:link { color: white;text-decoration: none; } a:hover { color: red;text-decoration: overline underline;background: none; } table,tr,td { font-family:Palatino Linotype; color: #FFFFFF;font-size: 12px; } .button { font-family:Verdana, fantasy; font-size:13; color:#FFFFFF; background-color: red; } input,textarea,dropdown{ font-family:Verdana, fantasy; font-size:13; color: #FFFFFF; background-color: #000000; border: 1px solid; } textarea,.submit input{ font-family:Verdana, fantasy; font-size:13; color:#ffffff; background-color: black; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { color: #000000; background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; color: #000000; font-weight: bold; background-color: #D6D6D6; } .menu th { font-font-size: 12px; color: silver; background-image:url(th.png); background-repeat:repeat-x; font-weight: bold; background-color: #4B4B4B; } .stats td { font-font-size: 12px; color: white; font-weight: bold; } .menu td { font-size: 12px; text-align: center; color: white; background-image:url(tdover.png); background-repeat:repeat-x; font-weight: bold; background-color: #4B4B4B; } .menu td:hover{ color: white; background-image:url(td.png);   i hope thats what u needed
  24. Re: V2 index.php well im nowhere near finished with this but i thought i would post it here for people to look at and give pointers
  25. Re: V2 index.php well i took that whaole part from loggedin.php so u should allready have it
×
×
  • Create New...