Jump to content
MakeWebGames

[mccodes v2] Movie Theatre(basic)


ishmell

Recommended Posts

Hello, this is a basic mod i made. At the moment what it does is users can buy tickets and enter in to watch certain movies depending on the tickets it costs to watch those movies. Then once a user has watched a movie it will raise there happiness stat. You can easily make it raise any stat that you want.

The mod has been tested, so it should all be well. If you have any problems then be sure to let me know here. You can also test it on my site www.blacksheep-mafia.com by going to explore> movie theater. Enjoy!!!

Note: You may have to change names...etc on the scripts below to suit your game.

First off add a field to users table... ticketnum int 11 0

Then make the fallowing pages.

movies.php

You're unable to view this code.

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

 

Make a theater.php page and add this below.

You're unable to view this code.

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

 

That should be it. Its nothing to advanced but a pretty nifty mod. If you want to make it increase something other than happiness just replace anything that says happiness to the stat you want to increase when they watched the movie. Be sure to leave comments.

Link to comment
Share on other sites

Re: [mccodes v2]Movie Theatre(basic)

My personal opinion is give min an example or he will never learn...

Most people like myself find it useful to learn from examples that are understandable.

Just an opinion could also help mod developers in the future....

Link to comment
Share on other sites

Re: [mccodes v2]Movie Theatre(basic)

 

My personal opinion is give min an example or he will never learn...

Most people like myself find it useful to learn from examples that are understandable.

Just an opinion could also help mod developers in the future....

Thanks for your opinion.

Sure i can post the base code for a Loop function with Arrays but im not going to do it for him, if he wants to learn he will have to read up on it, research the 4 different loop functions and then put them into place, thats how i did it!

Link to comment
Share on other sites

Re: [mccodes v2]Movie Theatre(basic)

Example With for loop and arrays

You're unable to view this code.

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

 

the for loop runs through the code in the brackets $i<5 times everytime it runs through the code in the brackets it adds +1 to the string $i.... $i++

Link to comment
Share on other sites

Re: [mccodes v2]Movie Theatre(basic)

Ah yes I see. That way would make more sense. But on the other hand everyone that programs has a way of doing things. My way is the long and complicated :-P

But you all make good points. Thanks for the helpful replies and great example. Ill work on taking out my sloppy way of programming and bring in this more officiant/sense-full way. 8-)

Link to comment
Share on other sites

Re: [mccodes v2]Movie Theatre(basic)

You need to add the field hapiness in users

 

You're unable to view this code.

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

 

Or possible you have spelt hapiness wrong in the code, i think the right spelling is happiness

Ive just looked at the code at there are no instructions to add SQL's so add this one:

 

You're unable to view this code.

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

 

and keep the spelling hapiness even though its spelt wrong xD

Link to comment
Share on other sites

  • 6 months later...

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...