Jump to content
MakeWebGames

Updated Travel System


Recommended Posts

Here is a updated travel system for free nothing special accept from its free :P

Basically I have coded up a travel system that will allow you to have multiple locations in your game with up to 4 travel types

Boat

Car

Bus

Plane

each location has have a set time and cost for example

London - 1 - 50 mins travel time (Car)

London - 1 - 5 mins travel time(Plane)

been a while since I did work on it but it works

Edit: also forgot user can have a accident while traveling they can also buy insurance for special currency which covers there travel cost

SQLS

You're unable to view this code.

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

 

monorail.php

http://pastebin.com/m0YZ7H2m

cron_minute.php edit

http://pastebin.com/xt7NZUEL

global_func.php edit

You're unable to view this code.

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

 

Add this to bottom of globals.php

You're unable to view this code.

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

Edited by NonStopCoding
Link to comment
Share on other sites

I know he coded this me an nonstop discussed this when he was coding this an I know he coded this, he is a trusted Dev as most people on this forum will tell you

He's sad and angry that everyone slated him in his thread so he's taking it out on other people, or the people that caught him in the lie anyway.

Link to comment
Share on other sites

He will be back though. I think he has another account

Back on topic:

I don't remember helping you with this though haha. If I did hopefully my input works

yea you helped me with the sql and function for checking if the page is allowed to visit while traveling

I am sure its in my skype log someplace :P was deff you and your input was very useful and handy thanks :)

Link to comment
Share on other sites

Love the modification, maybe we can expand on the mod e.g. When traveling whatever vechile where in there can be certain crimes we can do. Hijack a Plane, crash into the twin towers etc.

[MENTION=68711]KyleMassacre[/MENTION] [MENTION=70283]Samurai Legend[/MENTION]:

That is beyond sick... You need to have your morals checked.

Edited by Coly010
Link to comment
Share on other sites

Love the modification, maybe we can expand on the mod e.g. When traveling whatever vechile where in there can be certain crimes we can do. Hijack a Plane, crash into the twin towers etc.

I can expand on it but I won't be adding in no crashing of planes into towers sorry but that incident was sad enough for the american citizens. You never know who in your game could of been affected by this incident

Link to comment
Share on other sites

@KyleMassacre @Samurai Legend:

That is beyond sick... You need to have your morals checked.

It's ok, we have NSA. So he is probably is on a no fly list to the states now. Although I am American I am not offended it happened almost 14 years ago and is a part of our history. I don't know if it's just me and I have no heart but I feel it's time to get over the whole thing. It is still an open wound to a lot of people here, especially those that were affected by it.

Now as a moderator speaking:

I would watch what you post because I want kidding about the NSA. They have more power than a search engine and they don't take too lightly to things. If goggle can index this within a week how easy is it for the U.S. Government to find it with a few search terms they have? Even though your talking about a game, it could be seen as propaganda.

Link to comment
Share on other sites

This week on Fox News:

NSA stops possible terrorist attack hinted on an online forum.

MCCodes suddenly regained popularity.

Dog in Texas was stuck in a tree and was later rescued.

Obviously, no one tunes into Fox news so it appeals to no one :D

And on the crashing of the towers.. I personally don't care if he says such things, but I do know others DO care.

Edited by TheMasterGeneral
Link to comment
Share on other sites

  • 8 months later...
ok :(

I'm hoping to add a ton of cities so a staff area will in the long run be needed.

You sell mods too, right? (I tried to access your site, but it just keeps trying to load). How much to make a staff area?

 

yes my server was suffering from lag from last night but all issues have been fixed and site should be back up contact me on skype: dundeeboy09

or you can get me at [email protected] we can talk better

Link to comment
Share on other sites

I'm fairly certain your cron is full of errors because you did not install this mod correctly. Either that or you are showing "Notices" or "Warnings", which aren't errors at all. This mod has no "travel" field, just "traveling", which is set to 0 when the trip is completed.

Others have used this mod just fine - so that should tell you something.

~G7470

Link to comment
Share on other sites

You might want to check what he put in the paste on his initial post for this mod for the minute cron.

Line 9 of the paste is this:

 

You're unable to view this code.

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

 

...which is exactly what you put here. Unless [uSER=70347]NonStopCoding[/uSER] is changing this paste on-the-fly today for some reason, this was there.

~G7470

Link to comment
Share on other sites

At this point, I'm going to defer to [uSER=70347]NonStopCoding[/uSER] since it is his mod (since I know that he is around). I'd like to hear his input on this rather than having me continue to talk through a mod to you that I didn't create (nor do I know if he's made any changes within the past 24 hours to this mod).

~G7470

Link to comment
Share on other sites

You might want to check what he put in the paste on his initial post for this mod for the minute cron.

Line 9 of the paste is this:

 

You're unable to view this code.

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

 

...which is exactly what you put here. Unless [uSER=70347]NonStopCoding[/uSER] is changing this paste on-the-fly today for some reason, this was there.

~G7470

 

iv not touched this paste at all since god nose how long :P

ok so been a while since i touched this mod yea this cron is stupid don't know what i was thinking when i coded this wow.

ill take a look tomorrow on my demo site but it was working when i released it

Link to comment
Share on other sites

  • 5 weeks later...

Assuming the location column is the "name" you're talking about, use an ORDER BY clause.(yes, I used w3schools for the documentation)

The end of your query would look something like this (including the cityid condition for context):

 

You're unable to view this code.

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

 

~G7470

 

  • Like 1
Link to comment
Share on other sites

[uSER=70347]NonStopCoding[/uSER] since I have this working rather well now, I was wondering if it would be able to set a travel from location. This can put a heavy strain on the database, but...to me it's worth it. It's basically a global travelling system. I'm thinking it might be possible to simply add a from column in the data table. Then in the sql query only select the travel type & locations that match the users location in the from column. Not sure how to formulate that query though.

 

yes this module could cause strain on the server not my best idea

Link to comment
Share on other sites

[uSER=70347]NonStopCoding[/uSER] since I have this working rather well now, I was wondering if it would be able to set a travel from location. This can put a heavy strain on the database, but...to me it's worth it. It's basically a global travelling system. I'm thinking it might be possible to simply add a from column in the data table. Then in the sql query only select the travel type & locations that match the users location in the from column. Not sure how to formulate that query though.

Take a look at this:

http://code.tutsplus.com/articles/sql-for-beginners-part-3-database-relationships--net-8561

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