Jump to content
MakeWebGames

Shops


MyGunWars

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 7 years later...

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

Link to comment
Share on other sites

[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?

Link to comment
Share on other sites

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:

  1. Change the shopLOCATION field to be a "varchar" field in the database.
  2. 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).
  3. Update the PHP according to this setup with the following:

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

 

 

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

  1. Change the shopLOCATION field to be a "varchar" field in the database.
  2. 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).
  3. Update the PHP according to this setup with the following:

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

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.

×
×
  • Create New...