Jump to content
MakeWebGames

Recommended Posts

Posted

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.

  • 2 months later...
Posted

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.

Posted

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?

Posted

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.

Posted

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'] ;

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...