
gideon prewett
Members-
Posts
205 -
Joined
-
Last visited
gideon prewett's Achievements
Newbie (1/14)
0
Reputation
-
Love it, BUT!!!! i think the idea behind this mod is great and i agree with adding it manually but i personally think you should change it so only $500 a time is put in the jackpot one of the biggest killers in these games after the 14 yr olds making crap games that dont last is the economy and this is a good way of removing money from the game maybe add more codes with higher prices to guess or something but +1 as we used to say till it was taken away you have made a good mod
-
reason it was posted as free was because there was a addon made for some browsers that allows you to change the high scores not trying to score points just to let people k
-
tutorial system, add in admin panel , every page :)
gideon prewett replied to aimar9999's topic in Free Modifications
hey all i did was try to install it and saw some things were missing and that the main file had errors i havent looked threw the codes to revise anything and if u want aimar i dont know what i have done wrong and tbh was just looking to see what the mod looked like to see if i could add to it or whatever -
tutorial system, add in admin panel , every page :)
gideon prewett replied to aimar9999's topic in Free Modifications
theres a few issues with this mod and when i tested it i had to do stuff thats not in the install and i had to change a file so here goes call this page staff_tutorial.php <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains city stuffs switch($_GET['action']) { case "addtutorial": addtutorial(); break; case "edittutorial": edittutorial(); break; case "deltutorial": deltutorial(); break; default: print "scripti vale kasutamine."; break; } function addtutorial() { global $db, $ir, $c, $h, $userid; $name=$_POST['leht']; $sisu=$_POST['sisu']; if($name) { $q=$db->query("SELECT * FROM tutorial WHERE leht='{$name}'"); if($db->num_rows($q)) { print "2 same name cnt."; $h->endpage(); exit; } $db->query("INSERT INTO tutorial VALUES(NULL, '$name', '$sisu')"); print "Tutorial to page {$name} is created."; stafflog_add("New tutorial $name added"); } else { print "<h3>Lisa õpetus</h3><hr /> <form action='staff_tutorial.php?action=addtutorial' method='post'> Page<img src='images/smilies/frown.png' border='0' alt='' title='Frown' class='inlineimg' />example: /home.php) /is important <input type='text' name='leht' /> content: <textarea style='width: 100%; height:200px;' name='sisu'></textarea> <input type='submit' value='Add new' /></form>"; } } function edittutorial() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": if($_POST['uus']) { $name=$_POST['leht']; $sisu=$_POST['sisu']; $q=$db->query("SELECT * FROM tutorial WHERE leht='{$name}'"); if($db->num_rows($q)) { print "2 same name cnt ."; $h->endpage(); exit; } } break; default: if($_POST['muuda']){ $name=$_POST['leht']; $sisu=$_POST['sisu']; $q=$db->query("SELECT * FROM tutorial WHERE id='".$_GET['id']."'"); $old=$db->fetch_row($q); $db->query("UPDATE tutorial SET leht='{$name}', sisu='{$sisu}' WHERE id='".$_GET['id']."'"); print "Tutorial {$name} is edidet."; stafflog_add("Edidet page {$name} tutorial"); } if($_GET['id']){ $q=$db->query("SELECT * FROM tutorial WHERE id='".$_GET['id']."'"); $old=$db->fetch_row($q); print "<h3>Tutorial edit</h3><hr /> <form action='staff_tutorial.php?action=edittutorial&id= {$_GET['id']}' method='post'> <input type='hidden' name='id' value='{$_POST['tutorial']}' /> Page: <input type='text' name='leht' value='{$old['leht']}' /> Content:<textarea style='width: 100%; height:200px;' name='sisu'>{$old['sisu']}</textarea> <input type='submit' name='muuda' value='Edit tutorial' /></form>"; } // Get all the data from the "example" table $result = mysql_query("SELECT * FROM tutorial") or die(mysql_error()); print "<h3>Tutorial edit</h3><hr /> <table class=table> <tr> <td>Page</td><td>link</td> </tr>"; while($row = mysql_fetch_array( $result )) { print"<tr> <td>".$row['leht']."</td><td><a href='staff_tutorial.php?action=edittutorial&id=". $row['id']."'>Edit</a></td> </tr>"; } print"</table> "; break; } } function deltutorial() { global $db,$ir,$c,$h,$userid; if($_GET['id_del']) { $q=$db->query("SELECT * FROM tutorial WHERE id={$_GET['id_del']}"); $old=$db->fetch_row($q); $db->query("DELETE FROM tutorial WHERE id={$_GET['id_del']}"); print "Tutorial for page {$old['leht']} is deleted."; stafflog_add("Deleted tutorial {$old['leht']}"); } else { print "<h3>Delete tutorial</h3><hr /> are you sure? "; // Get all the data from the "example" table $result = mysql_query("SELECT * FROM tutorial") or die(mysql_error()); print " <table class=table> <tr> <td>Page</td><td>link</td> </tr>"; while($row = mysql_fetch_array( $result )) { print"<tr> <td>".$row['leht']."</td><td><a href='staff_tutorial.php?action=deltutorial&id_del =".$row['id']."'>Delete</a></td> </tr>"; } print"</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! <a href='staff_users.php?action=reportsview'>> Back</a>"; } $h->endpage(); ?> then add this into your globals.php , bottom $result = mysql_query("SELECT * FROM tutorial WHERE leht='".$_SERVER['SCRIPT_NAME']."'"); $row = mysql_fetch_array($result); if($row['leht']==''){ }else if($ir['pagetutorials'] == ON) { print" <table class='table'> <tr> <td>Tutorial to this page</td> </tr> <tr> <td><div id='sisu'>".$row['sisu']."</div><div id='aeg'>[<a href=preferences.php>Turn off tutorial</a>]</div></td> </tr> </table>"; } and then, add this to you smenu.php wher you want.. <hr /><b>Tutorial</b><br /> ><a href='staff_tutorial.php?action=addtutorial'>Add tutorial</a><br /> ><a href='staff_tutorial.php?action=edittutorial'>Edit tutorial</a><br /> ><a href='staff_tutorial.php?action=deltutorial'>Delete tutorial</a> and then add this in your preferences.php case 'pagetutorialschange'; pagetutorials_change(); break; case 'pagetutorialschange 2'; do_pagetutorials_change(); break; function pagetutorials_change() { global $ir,$c,$userid,$h; print "<h3>Page Tutorials</h3> <form action='preferences.php?action=pagetutorialschange 2' method='post'> <select name='pagetutorials' type='dropdown'> <option value='ON'>ON <option value='OFF'>OFF</select> <input type='submit' value='Change Info' /></form>"; } function do_pagetutorials_change() { global $db,$ir,$c,$userid,$h; if($ir['pagetutorials'] == "ON") { $g="OFF"; } else { $g="ON"; } $_POST['pagetutorials']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['pagetutorials']); $db->query("UPDATE users SET pagetutorials='{$_POST['pagetutorials']}' WHERE userid=$userid"); print "Page Tutorials Has Been Turned $g"; } add this wherever you want the link to turn off the tutorial to be <a href='preferences.php?action=pagetutorialschange'> Turn off tutorial</a> then the sqls CREATE TABLE IF NOT EXISTS `tutorial` ( `id` int(11) NOT NULL AUTO_INCREMENT, `leht` varchar(200) NOT NULL, `sisu` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; ALTER TABLE `users` ADD `pagetutorials` INT( 11 ) NOT NULL DEFAULT '0' ; All i have done is fixed some errors and added in things that were missing from the original posts and i must admit i still cant get it working on my base site but i will keep at it and post any fixes i manage to do -
lmao oh i quite agree that MCC isnt the be all and end all but like allot of people its how i got my interest in coding and it would be a shame to see this place die nice 1 buddy i have been out of the game for a while now due to RL and work commitments but im planning on getting back in to it and im sure i can post some mods and projects to try and get some interest back some things never change around here i was not complaining or moaning or expecting people to do work for me i was just finding out about the situation at hand i would happily water the plant and bring it back to health but if that plant is to far gone it wont help then i wouldn't water it i would get a new plant (hence why i was asking if people moved on or if its just quiet)
-
the community around here looks to me like its dieing if not dead i haven't been on here for a while properly as i am learning on my own but whenever i do come back its the same discussions and the same mods etc has everybody gone somewhere else or is the MCC community just dieing?
-
charge donator days for name change.
gideon prewett replied to PHPDevil's topic in Free Modifications
prob cause he downloaded a old version from some site rather than buy legit but hey how many people do have valid licences? -
if this is the case will someone add the files to this thread (if its a free engine) that way atleast the people here can still get to it
-
ive just stumbled across this thread and will be looking at making the email pw retrieval i personally think it will be a nice way of doing email validation
-
danny u still got me on msn? im allways looking for lil bits and pieces
-
selling a game built on mcc with no licence is dodgey anyway so money or no money i will pass
-
well right now without looking i can say to start making a game u need a idea and some planning try thinking outside the box and find somthing unique as for ready to run mafia games theres a few but i wouldnt do a mafia game its been done to death
-
does it come with a valid MCC V2 licence? it dont quite add up to me
-
you should specify this in ur first post with price and demo what engine is it built on?