Author Topic: Bus stops  (Read 4097 times)

0 Members and 2 Guests are viewing this topic.

Offline _wiktor

  • Street Thug
  • *
  • Posts: 4
    • View Profile
Bus stops
« on: December 23, 2010, 07:01:34 am »
Hi, I'm new here at the forum so I thought I'd start off by contributing something myself.
This code will spawn buses at all the bus stops - you may use it in your OnGameModeInit(), for example.
Please let me know here if I've missed a stop or if you'd like to provide better coordinates :-)
One stop is broken (the one I commented out). I'm not sure why, but if I spawn a bus there it falls through the ground and respawns a little to the side. I tried spawning it a bit higher but that didn't work either (it did not fall through the ground if I spawned it from Z>80). When I spawn a bus at the same coords as it respawns, it falls through the ground again.

The reason for this is simple, I use VC:MP as a simple platform for running races around Vice City with friends. The buses are meant to be an obstacle, but they might work for some other scenario.

Anyway, here's the code:
Code: [Select]
// West island
// Airport
AddStaticVehicle(167,-1432.89, -780.50,14.79, 90,-1,-1);
// Sunshine Autos
AddStaticVehicle(167,-1019.04, -917.79,14.44, 45,-1,-1);
// Little Havana
AddStaticVehicle(167,-1128.27, -593.15,11.56,268,-1,-1);
AddStaticVehicle(167,-1062.27, -340.08,10.86,268,-1,-1);
AddStaticVehicle(167, -996.25, -513.60,10.86,180,-1,-1);
AddStaticVehicle(167, -908.65, -660.12,11.20,269,-1,-1);
AddStaticVehicle(167, -987.71, -545.34,10.86,  0,-1,-1);
// Downtown
AddStaticVehicle(167, -385.70, 1008.29, 9.99,339,-1,-1);
AddStaticVehicle(167, -295.24, 1284.02,11.69,  0,-1,-1);
AddStaticVehicle(167, -478.18, 1343.06,11.69, 92,-1,-1);
AddStaticVehicle(167, -743.93, 1318.62,11.69, 90,-1,-1);
AddStaticVehicle(167, -874.54, 1350.92,11.38,180,-1,-1);
AddStaticVehicle(167, -869.61, 1074.28,11.00,180,-1,-1);
// East island
// Ocean Beach
AddStaticVehicle(167,  160.57,-1328.51,10.37,160,-1,-1);
AddStaticVehicle(167,  -24.71,-1565.69,10.39, 80,-1,-1);
AddStaticVehicle(167,  -22.11,-1307.33,10.39,  0,-1,-1);
AddStaticVehicle(167,  -77.85, -982.86,10.40 10,-1,-1);
AddStaticVehicle(167,  120.90, -807.78,10.40,325,-1,-1);
AddStaticVehicle(167,  183.71, -487.13,10.99,  0,-1,-1);
AddStaticVehicle(167,  319.78,  -81.48,10.92,  0,-1,-1);
// Vice Point
AddStaticVehicle(167,  428.77,  310.86,11.56,  0,-1,-1);
AddStaticVehicle(167,  472.07,  628.51,11.29,  0,-1,-1);
AddStaticVehicle(167,  228.68,  718.88,10.99,300,-1,-1);
AddStaticVehicle(167,  306.51, 1047.87,13.22, 10,-1,-1);
AddStaticVehicle(167,  449.16, 1273.10,17.37,270,-1,-1);
AddStaticVehicle(167,  498.60, 1022.64,18.07,190,-1,-1);
//AddStaticVehicle(167,  527.11,  628.24,11.00,  0,-1,-1); <-- This is the broken one
// Washington Beach
AddStaticVehicle(167,  516.14,  400.53,10.99,160,-1,-1);
AddStaticVehicle(167,  492.93,   -1.52,10.99,200,-1,-1);
AddStaticVehicle(167,  434.09, -454.09,10.11,180,-1,-1);
AddStaticVehicle(167,  216.84,  -972.83,10.37,170,-1,-1);

Edit history:
2010-12-23 13:26 UTC: Simplified the coordinates.
« Last Edit: December 23, 2010, 04:26:04 pm by _wiktor »

Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: Bus stops
« Reply #1 on: December 23, 2010, 10:55:00 am »
I would like to help you but I am a bit sleepy, so let's start from beginning, what I understood...

You want to spawn buses at specific coords, and at one coord, the bus is always falling down, no matter what Z level you used? Could you please post a screenie of the "not working place"? Or try to place e.g. a bike there.

Btw. You use millions of numbers in your script to describe a coordinate. Cut every number to e.g. 2 numbers after the ".", so change 216.8491210937500 to 216.84. Looks better, the script file is lighter and there will be no difference between your coordination and mine :P.

Offline _wiktor

  • Street Thug
  • *
  • Posts: 4
    • View Profile
Re: Bus stops
« Reply #2 on: December 23, 2010, 05:26:05 pm »
Yeah, it was quite late at night when I posted it and I just ran out of ideas. I tried changing the coordinates a bit but it seems as if spawning a bus in the vicinity of the stop causes it to glitch. I'll record a video in a few moments.

I shortened the coordinates as per your suggestion, too.

Edit: Here is the video: http://tinyvid.tv/show/17u7we2cjb0be
« Last Edit: December 23, 2010, 07:43:43 pm by _wiktor »

Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: Bus stops
« Reply #3 on: December 24, 2010, 01:17:14 pm »
Do you use VCMP's build mode for placing the buses?

Merry Christmas!

Offline _wiktor

  • Street Thug
  • *
  • Posts: 4
    • View Profile
Re: Bus stops
« Reply #4 on: December 25, 2010, 07:07:49 am »
Do you use VCMP's build mode for placing the buses?
No, I figured out the coords myself, but the build mode gives the same coords. I've not tried placing anything else on that spot, but I also found that trying to spawn the Love Fist limo at the location from main.scm it does the same thing as the bus. I'll try spawning something else there and report later during the day.
I spawned some cars around the city halfway through the ground and they appear fine, they're just stuck "sunk" in the tarmac.
Quote
Merry Christmas!
And a happy New Year! ;-)

Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: Bus stops
« Reply #5 on: December 25, 2010, 04:45:51 pm »
So you suggest, that this is VC's fault? Maybe the map file need a fix.
* [AoD]NC wonders why VCMP doesn't patch some map files to reduce glitches.

yazeen

  • Guest
Re: Bus stops
« Reply #6 on: March 15, 2011, 04:09:38 pm »
Use /s to get the COOrds XD

Offline Charleyutton

  • Street Thug
  • *
  • Posts: 46
    • View Profile
Re: Bus stops
« Reply #7 on: March 15, 2011, 05:55:29 pm »
Nice one yazeen


Don't bump old topics
Charleyutton, VU clan leader, XE Management/Scripter, SvM Server Owner, VCHA admin http://vu.vrocker-hosting.co.uk http://svm.vrocker-hosting.co.uk


Click the image to make your own XE signature!

yazeen

  • Guest
Re: Bus stops
« Reply #8 on: March 15, 2011, 06:02:03 pm »
Nice one yazeen


Don't bump old topics

LoL u Kidding or Serious