ishmell Posted December 8, 2008 Share Posted December 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
ishmell Posted December 8, 2008 Author Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) Oh I just realized you have to be a premium member to use that mod on my site. So ill take off having to be a premium member for a day or two so you people can test it out. 8-) Quote Link to comment Share on other sites More sharing options...
radio_active Posted December 8, 2008 Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) I believe it would have been much more effecient to use a LOOP and ARRAY rather then having the same piece of code repeated 5-10 times. =) For future reference though. Quote Link to comment Share on other sites More sharing options...
Savager Posted December 8, 2008 Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) lol thats what i was just about to say. :) could of made all those lines turn into only 75 lines. using array and loop. Quote Link to comment Share on other sites More sharing options...
radio_active Posted December 8, 2008 Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) xD lol Quote Link to comment Share on other sites More sharing options...
Karlos Posted December 8, 2008 Share Posted December 8, 2008 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.... Quote Link to comment Share on other sites More sharing options...
toufail Posted December 8, 2008 Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. you mean add this SQL Quote Link to comment Share on other sites More sharing options...
radio_active Posted December 8, 2008 Share Posted December 8, 2008 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! Quote Link to comment Share on other sites More sharing options...
Savager Posted December 8, 2008 Share Posted December 8, 2008 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++ Quote Link to comment Share on other sites More sharing options...
ishmell Posted December 8, 2008 Author Share Posted December 8, 2008 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-) Quote Link to comment Share on other sites More sharing options...
Savager Posted December 8, 2008 Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) its never too late to learn the better way. Quote Link to comment Share on other sites More sharing options...
radio_active Posted December 8, 2008 Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) Yes exactly, its not your "way" ishmell its just you don't know how to use Loops and arrays as of yet and like Savager said, its not to late to learn. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted December 8, 2008 Share Posted December 8, 2008 Re: [mccodes v2]Movie Theatre(basic) its never too late to learn the better way. Very true, good luck Ishmell Quote Link to comment Share on other sites More sharing options...
Karlos Posted December 9, 2008 Share Posted December 9, 2008 Re: [mccodes v2]Movie Theatre(basic) See what i mean? Your using his code with he understood and editted it and made it better whioch he can learn off..... Quote Link to comment Share on other sites More sharing options...
ronhouston2 Posted December 16, 2008 Share Posted December 16, 2008 Re: [mccodes v2]Movie Theatre(basic) the mod works every but when someone gose to watch the movie QUERY ERROR: Unknown column 'hapiness' in 'field list' Query was UPDATE users SET hapiness=hapiness+20 WHERE userid=1 that shows up in theater.php Quote Link to comment Share on other sites More sharing options...
Guest Sniko` Posted December 16, 2008 Share Posted December 16, 2008 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 Quote Link to comment Share on other sites More sharing options...
ronhouston2 Posted December 16, 2008 Share Posted December 16, 2008 Re: [mccodes v2]Movie Theatre(basic) Thank You that Code worked Quote Link to comment Share on other sites More sharing options...
ishmell Posted December 21, 2008 Author Share Posted December 21, 2008 Re: [mccodes v2]Movie Theatre(basic) To tell you the truth you can just change happiness to will or something to make it suit your game. Quote Link to comment Share on other sites More sharing options...
weewooz Posted July 12, 2009 Share Posted July 12, 2009 Re: [mccodes v2] Movie Theatre(basic) it lets you take your will over 100 any one have any ideas will this please Quote Link to comment Share on other sites More sharing options...
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.