Zero-Affect Posted February 23, 2010 Posted February 23, 2010 This is just something i was working on afew days back for my game and i thought i'd just run up a quick copy for MCC and post it here. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. [mysql] CREATE TABLE IF NOT EXISTS `caution_files` ( `filename` text NOT NULL, `caution` enum('jail','hospital','jail/hospital') NOT NULL default 'jail/hospital' ) [/mysql] If someone could add staff functions to this im sure it would be great, Note i have not tested this out so please post any issues or errors and we'll see what we can do. Quote
Jordan Palmer Posted February 24, 2010 Posted February 24, 2010 Looking good. I may have to test this. Prolly build onto it :) Quote
Zero-Affect Posted February 24, 2010 Author Posted February 24, 2010 Yeah i kind of just posted a mock up of what it would look like, would appreciate anyone's addons to it. Quote
Zero-Affect Posted April 29, 2010 Author Posted April 29, 2010 My edited version for you lot to take a look at header.php - Replace: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The follow MySQL code would not be needed if you choose to use the array option. [mysql] CREATE TABLE IF NOT EXISTS `notification_alert` ( `page` varchar(100) NOT NULL, PRIMARY KEY (`page`) ); [/mysql] If you can't install this then you don't deserve to use it. Note to users: This has NOT been tested on MCv2 it's a conversion of a CimGame addon so i cannot guarantee it will work 100% and im sure the code could do with a little editing and maybe could be smaller. Quote
Nicholas Posted April 29, 2010 Posted April 29, 2010 interesting so if i change those lines in header.php into this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. would that save me time adding some lines into every file and stop them from using it with just this one? as ive done You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. would that stop everyone going onto those pages if they are in hospital/jail or does this file only tell you what page your viewing when in hospital/jail? Quote
Zero-Affect Posted April 30, 2010 Author Posted April 30, 2010 Note lines 29, 30, 39 & 40 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It does kill the rest of the code so yes it will not show the files you select, The placement of the header code depends on your layout really. It is quicker and really to be honest im surprised anyone on here can see past MC generic and include something like this. I use this on CrimGame but i use a different method of including it so like i said untested on MC so if someone could i'd appreciate it. Quote
rulerofzu Posted April 30, 2010 Posted April 30, 2010 Placed in using the array version on my test site. The only line I had to change was for the minutes to $check_caution_var = ( $ir['jail'] ) ? $ir['jail'] : $ir['hospital'] ; Quote
Zero-Affect Posted April 30, 2010 Author Posted April 30, 2010 Yeah sorry about that my bad, converting it is a bugger sometimes. Quote
rulerofzu Posted April 30, 2010 Posted April 30, 2010 Not a problem was easy to spot if your working more with mccodes than your own source. Works perfect. Didnt try the mysql version but cannot see that being a problem either. Ill probably amend it to suit my own requirements as I dont use $ir['hospital'] or $ir['jail']. The less in the users table the better :D Quote
Zero-Affect Posted April 30, 2010 Author Posted April 30, 2010 My original idea of a hospital and jail time related to MC ideology but im considering going with TimeStamp in another table later in time. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.