Jump to content
MakeWebGames

CJ - Twitch

Members
  • Posts

    391
  • Joined

  • Last visited

Everything posted by CJ - Twitch

  1. By the way is it mccodes based? Is TC mccodes based?
  2. Thank you very much! :)
  3. Or Illusions you can download the image open it in Adobe Dream weaver and draw the the rectangles on it view the source code and copy the area code it gives you. ;) Some people say thats cheating though. Edit: Typo. :(
  4. To be honest its a futuristic version. :P It has flash casino, better fors every thing uses ajax or javascript. Its a very well built game. :)
  5. Why does that happen to me? Try this. <?PHPinclude(DIRNAME(__FILE__) . '/globals.php'); print "<font size='4' face='Arial, Helvetica, sans-serif'>Your Attack Logs</font> <hr width='75%'> "; switch($_GET['step']){case 'ayw': ayw(); break;case 'ayl': ayl(); break;default; index(); break;}function index(){print "So you want to see you attack logs huh? Please choose a section. ";Print "• [url='pal.php?step=ayw']Attacks you've won[/url]. • [url='pal.php?step=ayl']Attacks you've lost[/url].";print " <hr width=75%>> <a href=index.php>Home</a><hr width=75%>";}function ayw(){global $db,$userid;$atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u1.userid=$userid) AND result='won' ORDER BY time DESC LIMIT 100");print "The last 100 players you have killed. <center><table width=75% cellspacing=1></center><tr bgcolor=#999999> <th>Time</th><th>Attacked</th></tr>";while($r=$db->fetch_row($atks)){$bgcolor = ($bgcolor == "#dfdfdf") ? "#cccccc" : "#dfdfdf";$d=date('F j, Y, g:i:s a',$r['time']);print "<tr bgcolor=$bgcolor><td><center>$d</td><td>[url='viewuser.php?u={$r[']<center>{$r['attackedn']}[/url]</td></tr>";}print "</table>";print " <hr width=75%>> <a href=pal.php>Back</a><hr width=75%>";}function ayl(){global $db,$userid;$atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u2.userid=$userid) AND result='won' ORDER BY time DESC LIMIT 100");print "The last 100 players that killed you. <center><table width=75% cellspacing=1></center><tr bgcolor=#999999><th>Time</th><th>Attacker</th></tr>";while($r=$db->fetch_row($atks)){$bgcolor = ($bgcolor == "#dfdfdf") ? "#cccccc" : "#dfdfdf";$d=date('F j, Y, g:i:s a',$r['time']);print "<tr bgcolor=$bgcolor><td><center>$d</td><td>[url='viewuser.php?u={$r[']<center>{$r['attackern']}[/url] </td></tr>";}print "</table>";print " <hr width=75%>> <a href=pal.php>Back</a><hr width=75%>";}?>
  6. Well here is my version of the code. Thought I might aswell post it like everyone else xD pal.php (player attack logs) <?PHPinclude(DIRNAME(__FILE__) . '/globals.php'); print "<font size='4' face='Arial, Helvetica, sans-serif'>Your Attack Logs</font> <hr width='75%'> "; switch($_GET['step']){case 'ayw': ayw(); break;case 'ayl': ayl(); break;default; index(); break;}function index(){print "So you want to see you attack logs huh? Please choose a section. ";Print "• [url='pal.php?step=ayw']Attacks you've won[/url]. • [url='pal.php?step=ayl']Attacks you've lost[/url].";print " <hr width=75%>> <a href=index.php>Home</a><hr width=75%>";}function ayw(){global $db,$userid;$atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u1.userid=$userid) AND result='won' ORDER BY time DESC LIMIT 100");print "The last 100 players you have killed. <center><table width=75% cellspacing=1></center><tr bgcolor=#999999> <th>Time</th><th>Attacked</th></tr>";while($r=$db->fetch_row($atks)){$bgcolor = ($bgcolor == "#dfdfdf") ? "#cccccc" : "#dfdfdf";$d=date('F j, Y, g:i:s a',$r['time']);print "<tr bgcolor=$bgcolor><td><center>$d</td><td>[url='viewuser.php?u={$r[']<center>{$r['attackedn']}[/url]</td></tr>";}print "</table>";print " <hr width=75%>> <a href=pal.php>Back</a><hr width=75%>";}function ayl(){global $db,$userid;$atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u2.userid=$userid) AND result='won' ORDER BY time DESC LIMIT 100");print "The last 100 players that killed you. <center><table width=75% cellspacing=1></center><tr bgcolor=#999999><th>Time</th><th>Attacker</th></tr>";while($r=$db->fetch_row($atks)){$bgcolor = ($bgcolor == "#dfdfdf") ? "#cccccc" : "#dfdfdf";$d=date('F j, Y, g:i:s a',$r['time']);print "<tr bgcolor=$bgcolor><td><center>$d</td><td>[url='viewuser.php?u={$r[']<center>{$r['attackern']}[/url] </td></tr>";}print "</table>";print " <hr width=75%>> <a href=pal.php>Back</a><hr width=75%>";}?> :D
  7. xD Immortal I just did that. xD
  8. xD I got the idea from http://crimevalley.com/ someone mentioned it there. xD
  9. Nice work :thumbsup:
  10. I don't believe he has.
  11. If you do make one a decide to sell it give me a free licence for the great idea. :P
  12. Could somebody make a bookie mod where users can bet on sports events and win money. There are 2 ways this could be done. An RSS feed with the teams or whatever and the chance of them wining/losing A staff panel where staff post manually. I think this could be a great addition to any game and would be a great free mod. ;) Thanks, CJ :thumbsup:
  13. Im having trouble with editing crimes and creating crimes .. EDIT CRIME 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 ' crimeITEM=0 WHERE crimeID=1' at line 3Query was UPDATE crimes SET crimeNAME='Search the train station', crimeBRAVE='1', crimePERCFORM='((WILL*0.8)/0.5)+(LEVEL/4)', crimeSUCCESSMUNY='', crimeSUCCESSCRYS='1', crimeSUCCESSITEM='0', crimeGROUP='1', crimeITEXT='Initial Text ', crimeSTEXT='Success Text! You got ${money} ', crimeFTEXT='Failure Text ', crimeJTEXT='Jail Text: ', crimeJAILTIME=0, crimeJREASON='', crimeXP=0 WHERE crimeID=1, crimeITEM=0 WHERE crimeID=1   CREAT CRIME 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, '1', 'test', 'test', 'test', 'test', 1, '', 1, 0)' at line 2Query was INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeMINMONEY, crimesMAXMONEY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP, crimeITEM) VALUES( 'test', '1', '((WILL*0.8)/2.5)+(LEVEL/4)', '1', '4', , 0, '1', 'test', 'test', 'test', 'test', 1, '', 1, 0)   Can you help? My staff_crimes.php <?phpinclude "sglobals.php";if($ir['user_level'] > 2){die("403");}//This contains course stuffsswitch($_GET['action']){case 'newcrime': new_crime_form(); break;case 'newcrimesub': new_crime_submit(); break; case 'editcrime': edit_crime_begin(); break;case 'editcrimeform': edit_crime_form(); break;case 'editcrimesub': edit_crime_sub(); break;case 'delcrime': delcrime(); break; case 'newcrimegroup': new_crimegroup_form(); break;case 'newcrimegroupsub': new_crimegroup_submit(); break;case 'editcrimegroup': edit_crimegroup_begin(); break;case 'editcrimegroupform': edit_crimegroup_form(); break;case 'editcrimegroupsub': edit_crimegroup_sub(); break;case 'delcrimegroup': delcrimegroup(); break;case 'reorder': reorder_crimegroups(); break;default: print "Error: This script requires an action."; break;}function new_crime_form(){global $ir, $c, $db;print "Adding a new crime. <form action='staff_crimes.php?action=newcrimesub' method='post'>Name: <input type='text' name='name' /> Brave Cost: <input type='text' name='brave' /> Item Needed: ".item2_dropdown($c, 'itemneed')." Success % Formula: <input type='text' name='percform' value='((WILL*0.8)/2.5)+(LEVEL/4)' /> Min Money: <input type='text' name='minmoney' /> Max Money: <input type='text' name='maxmoney' /> Success Crystals: <input type='text' name='crys' /> Success Item: ".item2_dropdown($c, 'item')." Group: ".crimegroup_dropdown($c,'group')." Initial Text: <textarea rows=4 cols=40 name='itext' /></textarea> Success Text: <textarea rows=4 cols=40 name='stext' /></textarea> Failure Text: <textarea rows=4 cols=40 name='ftext' /></textarea> Jail Text: <textarea rows=4 cols=40 name='jtext' /></textarea> Jail Time: <input type='text' name='jailtime' /> Jail Reason: <input type='text' name='jailreason' /> Crime XP Given: <input type='text' name='crimexp' /> <input type='submit' value='Create Crime' /></form>";}function new_crime_submit(){global $ir,$c,$userid, $db;if($_POST['itemon'] != "on") { $_POST['item']=0; }$db->query("INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeMINMONEY, crimesMAXMONEY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP, crimeITEM) VALUES( '{$_POST['name']}', '{$_POST['brave']}', '{$_POST['percform']}', '{$_POST['minmoney']}', '{$_POST['maxmoney']}', {$_POST['crys']}, {$_POST['item']}, '{$_POST['group']}', '{$_POST['itext']}', '{$_POST['stext']}', '{$_POST['ftext']}', '{$_POST['jtext']}', {$_POST['jailtime']}, '{$_POST['jailreason']}', {$_POST['crimexp']}, {$_POST['itemneed']})");print "Crime created!";stafflog_add("Created crime {$_POST['name']}");} function edit_crime_begin(){global $ir,$c,$h,$userid,$db;print "<h3>Editing Crime</h3>You can edit any aspect of this crime. <form action='staff_crimes.php?action=editcrimeform' method='post'>Crime: ".crime_dropdown($c,'crime')." <input type='submit' value='Edit Crime' /></form>";}function edit_crime_form(){global $ir,$c,$h,$userid,$db; $d=$db->query("SELECT * FROM crimes WHERE crimeID={$_POST['crime']}");$itemi=$db->fetch_row($d);print "<h3>Editing Crime</h3><form action='staff_crimes.php?action=editcrimesub' method='post'><input type='hidden' name='crimeID' value='{$_POST['crime']}' /> Name: <input type='text' name='crimeNAME' value='{$itemi['crimeNAME']}' /> Brave Cost: <input type='text' name='crimeBRAVE' value='{$itemi['crimeBRAVE']}' /> Item Needed: ".item2_dropdown($c, 'crimeITEM', $itemi['crimeITEM'])." Success % Formula: <input type='text' name='crimePERCFORM' value='{$itemi['crimePERCFORM']}' /> Min Money: <input type='text' name='crimeMINMONEY' value='{$itemi['crimeMINMONEY']}' /> Min Money: <input type='text' name='crimeMAXMONEY' value='{$itemi['crimeMAXMONEY']}' /> Success Crystals: <input type='text' name='crimeSUCCESSCRYS' value='{$itemi['crimeSUCCESSCRYS']}' /> Success Item: ".item2_dropdown($c, 'crimeSUCCESSITEM', $itemi['crimeSUCCESSITEM'])." Group: ".crimegroup_dropdown($c,'crimeGROUP', $itemi['crimeGROUP'])." Initial Text: <textarea rows=4 cols=40 name='crimeITEXT' />{$itemi['crimeITEXT']}'</textarea> Success Text: <textarea rows=4 cols=40 name='crimeSTEXT' />{$itemi['crimeSTEXT']}</textarea> Failure Text: <textarea rows=4 cols=40 name='crimeFTEXT' />{$itemi['crimeFTEXT']} </textarea> Jail Text: <textarea rows=4 cols=40 name='crimeJTEXT' />{$itemi['crimeJTEXT']} </textarea> Jail Time: <input type='text' name='crimeJAILTIME' value='{$itemi['crimeJAILTIME']}' /> Jail Reason: <input type='text' name='crimeJREASON' value='{$itemi['crimeJREASON']}' /> Crime XP Given: <input type='text' name='crimeXP' value='{$itemi['crimeXP']}' /> <input type='submit' value='Edit Crime' /></form>";}function edit_crime_sub(){global $ir,$c,$h,$userid, $db;$db->query("UPDATE crimes SET crimeNAME='{$_POST['crimeNAME']}', crimeBRAVE='{$_POST['crimeBRAVE']}', crimePERCFORM='{$_POST['crimePERCFORM']}', crimeSUCCESSMUNY='{$_POST['crimeSUCCESSMUNY']}', crimeSUCCESSCRYS='{$_POST['crimeSUCCESSCRYS']}', crimeSUCCESSITEM='{$_POST['crimeSUCCESSITEM']}', crimeGROUP='{$_POST['crimeGROUP']}', crimeITEXT='{$_POST['crimeITEXT']}', crimeSTEXT='{$_POST['crimeSTEXT']}', crimeFTEXT='{$_POST['crimeFTEXT']}', crimeJTEXT='{$_POST['crimeJTEXT']}', crimeJAILTIME={$_POST['crimeJAILTIME']}, crimeJREASON='{$_POST['crimeJREASON']}', crimeXP={$_POST['crimeXP']} WHERE crimeID={$_POST['crimeID']}, crimeITEM={$_POST['crimeITEM']} WHERE crimeID={$_POST['crimeID']}");print "Crime edited...";stafflog_add("Edited crime {$_POST['crimeNAME']}"); }function delcrime(){global $ir,$c,$h,$userid, $db;switch ($_GET['step']){ default: echo "<h3>Deleting Crime</h3> Here you can delete a crime. <form action='staff_crimes.php?action=delcrime&step=2' method='post'> Crime: ".crime_dropdown($c,'crime')." <input type='submit' value='Delete Crime' /></form>"; break; case 2: $target = $_POST['crime']; $d=$db->query("SELECT crimeNAME FROM crimes WHERE crimeID='$target'"); $itemi=$db->fetch_row($d); print "<h3>Confirm</h3> Delete crime - ".$itemi["crimeNAME"]."? <form action='staff_crimes.php?action=delcrime&step=3' method='post'> <input type='hidden' name='crimeID' value='$target' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='staff_crimes.php?action=delcrime';\" /></form>"; break; case 3: $target = $_POST['crimeID']; if($_POST['yesorno']=='No') { die("Crime not deleted. [url='staff_crimes.php?action=delcrime']>Back to main delete crimes page.[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); $d=$db->query("SELECT crimeNAME FROM crimes WHERE crimeID='$target'"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM crimes WHERE crimeID='$target'"); echo "Crime {$itemi['crimeNAME']} Deleted. [url='staff_crimes.php?action=delcrime']>Back to main delete crimes page.[/url]"; stafflog_add("Deleted crime {$itemi['crimeNAME']}"); break;}} function new_crimegroup_form(){global $ir, $c,$db;print "Adding a new crime group. <form action='staff_crimes.php?action=newcrimegroupsub' method='post'>Name: <input type='text' name='cgNAME' /> Order Number: <input type='text' name='cgORDER' /> <input type='submit' value='Create Crime Group' /></form>";}function new_crimegroup_submit(){global $ir,$c,$userid,$db;if(!isset($_POST['cgNAME']) || !isset($_POST['cgORDER'])){print "You missed one or more of the required fields. Please go back and try again. [url='staff_crimes.php?action=newcrimegroup']> Back[/url]";$h->endpage();exit;}$db->query("INSERT INTO `crimegroups` (`cgNAME`, `cgORDER`) VALUES('{$_POST['cgNAME']}','{$_POST['cgORDER']}')");print "Crime Group created!";stafflog_add("Created Crime Group {$_POST['cgNAME']}");} function edit_crimegroup_begin(){global $ir,$c,$h,$userid,$db;print "<h3>Editing A Crime Group</h3><form action='staff_crimes.php?action=editcrimegroupform' method='post'>Crime Group: ".crimegroup_dropdown($c,'crimeGROUP')." <input type='submit' value='Edit Crime Group' /></form>";} function edit_crimegroup_form(){global $ir,$c,$h,$userid,$db; $d=$db->query("SELECT * FROM crimegroups WHERE cgID={$_POST['crimeGROUP']}");$itemi=$db->fetch_row($d);print "<h3>Editing Crime Group</h3><form action='staff_crimes.php?action=editcrimegroupsub' method='post'><input type='hidden' name='cgID' value='{$_POST['crimeGROUP']}' />Name: <input type='text' name='cgNAME' value='{$itemi['cgNAME']}' /> Order Number: <input type='text' name='cgORDER' value='{$itemi['cgORDER']}' /> <input type='submit' value='Edit Crime Group' /></form>";} function edit_crimegroup_sub(){global $ir,$c,$h,$userid, $db;if(!isset($_POST['cgORDER']) || !isset($_POST['cgNAME'])){print "You missed one or more of the required fields. Please go back and try again. [url='staff_crimes.php?action=editcrimegroup']> Back[/url]";$h->endpage();exit;}else{$db->query("UPDATE crimegroups SET cgNAME='{$_POST['cgNAME']}', cgORDER='{$_POST['cgORDER']}' WHERE cgID='{$_POST['cgID']}'");print "Crime Group edited...";stafflog_add("Edited Crime Group {$_POST['cgNAME']}");}} function delcrimegroup(){global $ir,$c,$h,$userid, $db;switch ($_GET['step']){ default: echo "<h3>Deleting Crime Group</h3><script type='text/javascript'>function checkme(){if(document.theform.crimeGROUP.value==document.theform.crimeGROUP2.value){alert('You cannot select the same crime group to move the crimes to.');return false;}return true;}</script> <form action='staff_crimes.php?action=delcrimegroup&step=2' method='post' name='theform' onsubmit='return checkme();'> Crime Group: ".crimegroup_dropdown($c,'crimeGROUP')." Move crimes in deleted group to: ".crimegroup_dropdown($c, 'crimeGROUP2')." <input type='submit' value='Delete Crime Group' /></form>"; break; case 2: $target = $_POST['crimeGROUP'];$target2 = $_POST['crimeGROUP2'];if($target==$target2) { die("You cannot select the same crime group to move the crimes to."); } $d=$db->query("SELECT cgNAME FROM crimegroups WHERE cgID='$target'"); $itemi=$db->fetch_row($d); print "<h3>Confirm</h3> Delete crime group - ".$itemi["cgNAME"]."? <form action='staff_crimes.php?action=delcrimegroup&step=3' method='post'> <input type='hidden' name='cgID' value='$target' /><input type='hidden' name='cgID2' value='$target2' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='staff_crimes.php?action=delcrimegroup';\" /></form>"; break; case 3: $target = $_POST['cgID'];$target2 = $_POST['cgID2']; if($_POST['yesorno']=='No') { die("Crime Group not deleted."); } if ($_POST['yesorno'] != ("No" || "Yes")) die('This shouldnt happen'); $d=$db->query("SELECT cgNAME FROM crimegroups WHERE cgID='$target'"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM crimegroups WHERE cgID='{$_POST['cgID']}'");$db->query("UPDATE crimes SET crimeGROUP={$target2} WHERE crimeGROUP={$target}");stafflog_add("Deleted crime group {$itemi['cgNAME']}"); echo "Crime Group deleted."; break;}}function reorder_crimegroups(){global $db,$ir,$c,$h,$userid;if($_POST['submit']){unset($_POST['submit']);$used=array();foreach($_POST as $v){if(in_array($v, $used)){print "You have used the same order number twice! Go back and try again.";$h->endpage();exit;}$used[]=$v;}foreach($_POST as $k => $v){$cg=str_replace("order","", $k);if(is_numeric($cg)){$db->query("UPDATE crimegroups SET cgORDER={$v} WHERE cgID={$cg}");}}print "Crime group order updated!";stafflog_add("Reordered crime groups");}else{$q=$db->query("SELECT * FROM crimegroups ORDER BY cgORDER ASC, cgID ASC");$rows=$db->num_rows($q);$i=0;print "<h3>Re-ordering Crime Groups</h3><hr /><table width='80%' cellspacing='1' class='table'><tr><th>Crime Group</th><th>Order</th></tr><form action='staff_crimes.php?action=reorder' method='post'><input type='hidden' name='submit' value='1' />";while($r=$db->fetch_row($q)){$i++;print "<tr><td>{$r['cgNAME']}</td><td><select name='order{$r['cgID']}' type='dropdown'>";for($j=1;$j<=$rows;$j++){if($j == $i){print "<option value='{$j}' selected='selected'>{$j}</option>";}else{print "<option value='{$j}'>{$j}</option>";}}print "</select></td></tr>";}print "<tr><td colspan='2' align='center'><input type='submit' value='Reorder' /></td></tr></form></table>";}}function report_clear(){global $db,$ir,$c,$h,$userid;if($ir['user_level'] > 3){die("403");}$_GET['ID'] = abs((int) $_GET['ID']);stafflog_add("Cleared player report ID {$_GET['ID']}");$db->query("DELETE FROM preports WHERE prID={$_GET['ID']}");print "Report cleared and deleted! [url='staff_users.php?action=reportsview']> Back[/url]";}$h->endpage();?>   I installed 2 mods ... [mccode v2] Item needed to perform crime. and [mccode] Crimes give random money   They are both V2 mods. If you can help thanks, :)
  14. Sorry for bringing up an old thread but how would I get it to print the random moey of> Example. Result: Success Text! You got $   should be Result: Success Text! You got $RANDOM MONEY   Just so the users know exactly how much they get. :)   Thanks, CJ
  15. Awesome!
  16. Thanks :!: :D
  17. I know I wouldn't play a game like that. Maybe 5 trains a day but not 1. ;(
  18. Thanks! :D
  19. Thanks. :)
  20. Oh well....
  21. I replied to the mail. :) The link works fine for me ...
  22. I forgot to say thanks. :P
  23. lol  
  24. Ok im still new here and have used many of the free mods from the community! I wanted to do something in return so I made this new explore! Download: Here Screenie: All PSDs included so you may change the look or color etc etc .. Thanks! PS. I saw someone selling this for $10 so I made my own. :P (Tonka I stole your copyright tag :P)
  25. Looks good. :P
×
×
  • Create New...