Jump to content
MakeWebGames

[mccode v2] Scare People


jamboy1
 Share

Recommended Posts

This mod is designed to scare people... not much else i can say really, but it's fun.

first, make a file called scare.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now add this SQL query

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now in viewuser.php add find:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Replace with:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now in cron minute add:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Finally add this in every page you don't want the user accessing while being scared:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

This mod has been tested :)

Link to comment
Share on other sites

Re: [mccode v2] Scare People

I love the mod.. Just a few things.. When it says I go to the hospital, I don't. and when it is sucsessful the player does not get an event and still lets me access explore. Ill see if I can fix it, if not I'm sure someone esle will :lol: +1 though!

Link to comment
Share on other sites

Re: [mccode v2] Scare People

Just one thing Jamboy..

You are aware that you can do this..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

However its better to use echo instead of print, or so i have heard!

But you can do that instead of black slashing the " out again like you are doing..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

:-)

Link to comment
Share on other sites

Re: [mccode v2] Scare People

 

Just one thing Jamboy..

You are aware that you can do this..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

However its better to use echo instead of print, or so i have heard!

But you can do that instead of black slashing the " out again like you are doing..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

:-)

Echo is marginally faster than print, but not something you should worry about when picking which one to use. Also print behaves like a function, so can be used in complex expressions, where echo, can not.

Link to comment
Share on other sites

Re: [mccode v2] Scare People

For radio_active and BlueDevil23 thanks for the advice

And 88nismo... Sorry it's a little bit buggy i forgot about the event and well, it is my 1st proper mod XD i'll work on the event add and other bugs later if no one else has... i'm abit busy right now :P

Link to comment
Share on other sites

  • 4 weeks later...

Re: [mccode v2] Scare People

 

Just one thing Jamboy..

You are aware that you can do this..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

However its better to use echo instead of print, or so i have heard!

But you can do that instead of black slashing the " out again like you are doing..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

:-)

Echo is marginally faster than print, but not something you should worry about when picking which one to use. Also print behaves like a function, so can be used in complex expressions, where echo, can not.

ok explain the "complex expressions" part...

Link to comment
Share on other sites

Re: [mccode v2] Scare People

"2. Expression. print() behaves like a function in that you can do:

$ret = print "Hello World"; And $ret will be 1. That means that print

can be used as part of a more complex expression where echo cannot. An

example from the PHP Manual:

$b ? print "true" : print "false";

print is also part of the precedence table which it needs to be if it

is

to be used within a complex expression. It is just about at the bottom

of the precedence list though. Only "," AND, OR and XOR are lower."2. Expression. print() behaves like a function in that you can do:

$ret = print "Hello World"; And $ret will be 1. That means that print

can be used as part of a more complex expression where echo cannot. An

example from the PHP Manual:

$b ? print "true" : print "false";

print is also part of the precedence table which it needs to be if it

is

to be used within a complex expression. It is just about at the bottom

of the precedence list though. Only "," AND, OR and XOR are lower."

 

Taken from: http://www.faqts.com/knowledge_base/vie ... d/1/fid/40

Link to comment
Share on other sites

Re: [mccode v2] Scare People

 

Your right there iso. But ever though of something like:

echo $some_var ? 'true' : 'false';

Lol, I didn't write that tutorial on complexion. But I think its just saying print can be used within where echo can't..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You get me? It's just an example, but of course your example would work too.

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...