MyGunWars Posted April 13, 2009 Share Posted April 13, 2009 I Need Help Making A File That You Can Go To The Shops And See All The Shops And Go In To The Shops And Buy Items. And It Dose Not Matter What Your Location Is. This Is Where I Got: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Strats Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops Is this V21 or 2? And what file is this called? Quote Link to comment Share on other sites More sharing options...
MyGunWars Posted April 13, 2009 Author Share Posted April 13, 2009 Re: Shops V2 And Its Called shops.php Quote Link to comment Share on other sites More sharing options...
jamboy1 Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops ROFL he's probably gonna try use it now ROFLROFLROFL XD Quote Link to comment Share on other sites More sharing options...
Strats Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops Hmmm I don't think that you have edited this very well. I think you should take the shops.php file and put it in again. Someone more skilled than me can edit it for you lol I could kinda see how to but wont waste your time 8-) here : You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Strats Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops ROFL he's probably gonna try use it now ROFLROFLROFL XD Lol Am I right in thinking he has tried to modify his shop.php but just stuck that there and replaced his whole code? lol Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops I Need Help Making A File That You Can Go To The Shops And See All The Shops And Go In To The Shops And Buy Items. And It Dose Not Matter What Your Location Is. This Is Where I Got: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And in English? Does this mean you want users to be able to access all shops no matter the location? Quote Link to comment Share on other sites More sharing options...
DELETE ME NOW! Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops Wtf lol? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. LOL!!! Why sprintf it ? lol here are some. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. .. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. .. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Strats Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops I Need Help Making A File That You Can Go To The Shops And See All The Shops And Go In To The Shops And Buy Items. And It Dose Not Matter What Your Location Is. This Is Where I Got: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And in English? Does this mean you want users to be able to access all shops no matter the location? I believe so. Quote Link to comment Share on other sites More sharing options...
bocco Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops there is a better way, why not just make all the shop located at the one location and delete all the other cities then again the idea of the game is to give people something to look forward to, if you make all the shop open then the members have nothing to look forward to. Quote Link to comment Share on other sites More sharing options...
POG1 Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops overdoing the echos... Quote Link to comment Share on other sites More sharing options...
Strats Posted April 13, 2009 Share Posted April 13, 2009 Re: Shops there is a better way, why not just make all the shop located at the one location and delete all the other cities then again the idea of the game is to give people something to look forward to, if you make all the shop open then the members have nothing to look forward to. I agree completely. People need something to work towards Quote Link to comment Share on other sites More sharing options...
MyGunWars Posted April 13, 2009 Author Share Posted April 13, 2009 Re: Shops I Need Help Making A File That You Can Go To The Shops And See All The Shops And Go In To The Shops And Buy Items. And It Dose Not Matter What Your Location Is. This Is Where I Got: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And in English? Does this mean you want users to be able to access all shops no matter the location? I believe so. Yes That What I Need Help With. Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 22, 2016 Share Posted April 22, 2016 Yeah, I'm searching for something kinda like this. I want a few shops to be located in all cities, and the rest be city specific (standardized version). Not sure if that is possible though? Might be able to get away with a simple staff_shops edit for a check mark for all cities and a sql update?? Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 28, 2016 Share Posted April 28, 2016 [uSER=70347]NonStopCoding[/uSER] [uSER=69001]Zettieee[/uSER] [uSER=68711]KyleMassacre[/uSER] [uSER=65371]sniko[/uSER] [uSER=65530]Coly010[/uSER] [uSER=67703]adamhull[/uSER] Ok, you guys are kinda smart. There has to be a way to select multiple cities. By changing the select to multiselect, editting the shopLOCATION column to accept an array of options. & edit the one line in shops.php that says if shopLOCATION = ir[location] to be able to pull an array not single location. If you have seen my tables, there ARE a lot of cities. And some I would like standard in ALL cities, and others just in a few cities. Those three tweaks should be able to solve that issue. If you guys have time...mind taking a look? Quote Link to comment Share on other sites More sharing options...
G7470 Posted April 28, 2016 Share Posted April 28, 2016 There are a couple of ways that I can think of off the top of my head to accomplish what you're looking for. Option #1 - Create As Many "Location" Columns as you need in the shops table (not recommended) This option is essentially to create extra location "slots" for your shops so that they can be setup in multiple cities. So shopLOCATION, shopLOCATION2, etc. To get ALL cities, you could have a default value to look for in shopLOCATION that's impossible as a city location (like -5 for example) that would tell you that this shop is meant for ALL cities. Option #2 - Make shopLOCATION be an array (recommended) This option is a little trickier, but could be more rewarding in the end. This will require the following steps: Change the shopLOCATION field to be a "varchar" field in the database. Update that shopLOCATION field in the database to include every city that you want this shop to be available separated by a comma (so for example - you would have 1,3,5 in your shopLOCATION field if you want cities 1, 3, and 5 to have this shop). Update the PHP according to this setup with the following:Where you're adding a shop, you will have to allow for as many cities as you want in your options. I'm not 100% sure of the best way to accomplish this, so I'll leave that part up to you to determine how you would prefer your setup to be conducted. When it comes to seeing which shops are available for that city, the query will look something like this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Hopefully this will help you get started. ~G7470 1 Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted April 29, 2016 Share Posted April 29, 2016 quote fail read below lol Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted April 29, 2016 Share Posted April 29, 2016 I Need Help Making A File That You Can Go To The Shops And See All The Shops And Go In To The Shops And Buy Items. And It Dose Not Matter What Your Location Is. This Is Where I Got: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. http://makewebgames.io/forum/game-engines/mccode-development-support/free-modifications/27134-player-shops this is my module for free that does playershops Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 29, 2016 Share Posted April 29, 2016 But does it work with the item market like TC? Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 30, 2016 Share Posted April 30, 2016 There are a couple of ways that I can think of off the top of my head to accomplish what you're looking for. Option #1 - Create As Many "Location" Columns as you need in the shops table (not recommended) This option is essentially to create extra location "slots" for your shops so that they can be setup in multiple cities. So shopLOCATION, shopLOCATION2, etc. To get ALL cities, you could have a default value to look for in shopLOCATION that's impossible as a city location (like -5 for example) that would tell you that this shop is meant for ALL cities. Option #2 - Make shopLOCATION be an array (recommended) This option is a little trickier, but could be more rewarding in the end. This will require the following steps: Change the shopLOCATION field to be a "varchar" field in the database. Update that shopLOCATION field in the database to include every city that you want this shop to be available separated by a comma (so for example - you would have 1,3,5 in your shopLOCATION field if you want cities 1, 3, and 5 to have this shop). Update the PHP according to this setup with the following:Where you're adding a shop, you will have to allow for as many cities as you want in your options. I'm not 100% sure of the best way to accomplish this, so I'll leave that part up to you to determine how you would prefer your setup to be conducted. When it comes to seeing which shops are available for that city, the query will look something like this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Hopefully this will help you get started. ~G7470 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Is the current query. Which is the same thing right? But all it does is return a list of all shops despite their location. Perhaps an ENUM instead of var? But then staff_shops needs a multi-select @ You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And then the verify if empty You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. AND the insert, might need changed...not sure. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 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.