Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Gta Fishhead

Los Santos bus traffic line

Recommended Posts

Gta Fishhead

Hi everyone, I'm new to Gta scripting, but I came with idea to create a Cleo mod that creates a bus at certain stops in the city (for now only Los Santos), that goes around the city, and to be able for CJ to climb aboard, alco to pay some money when entering the bus.(similar to Vice City bus lines)

 

Anyway, I wrote a part of the script, and ran into the problems.

(seriously, I gave my best, pat some parts of the script won't work cool.gifcool.gif )

 

I call everyone there who is willing to help me, because I think this mod will look good!!!!

Edited by Gta Fishhead

Share this post


Link to post
Share on other sites
Gta Fishhead
Coding Questions belong in the coding section, III coding

 

 

 

http://www.gtaforums.com/index.php?showforum=49

Allright wait to read all that, if I still cant do it all report biggrin.gifbiggrin.gif

 

(and sorry, I didn't know, about where to post it)

Share this post


Link to post
Share on other sites
Gta Fishhead
Coding Questions belong in the coding section, III coding

 

 

 

http://www.gtaforums.com/index.php?showforum=49

Allright wait to read all that, if I still cant do it all report biggrin.gifbiggrin.gif

 

(and sorry, I didn't know, about where to post it)

Ok so, this is what I have done:

 

 


thread 'COACH'

 

:COACH_11

[email protected] = 0

 

:COACH_18

wait 0

if and

Model.Load(#BUS)

Model.Load(#WMYBMX)

else_jump @COACH_18

jump @COACH_49

 

:COACH_49

wait 0

if

00EC: actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0

else_jump @COACH_49

jump @COACH_98

 

:COACH_98

wait 0

0209: [email protected] = random_int_in_ranges 0 2

if

[email protected] == 0

else_jump @COACH_165

jump @COACH_18

wait 0

if

[email protected] == 1

else_jump @COACH_11

jump @COACH_165

 

:COACH_165

wait 0

[email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)

Car.Angle([email protected]) = 270.0

0129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat

Car.SetDriverBehaviour([email protected], FollowRoad)

00AE: set_car [email protected] traffic_behaviour_to 1

jump @COACH_235

 

:COACH_235

wait 0

if and

0205: actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0

00E1: player $PLAYER_CHAR pressed_key 18

else_jump @COACH_289

jump @COACH_321

 

:COACH_289

wait 10000

Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)

jump @COACH_11

 

:COACH_321

wait 0

05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms

jump @COACH_344

 

:COACH_344

wait 10000

Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)

jump @COACH_11

 

 

 

I didn't set all the points around the city, but I cant set To enter the bus as a passanger, along with the bus moving.

 

I mean, I can set CJ enter as passanger, but then the bus goes in reverse, and won't go to the point I set.

 

and what opcode should I use for the bus to spawn from time to time is that

0209: [email protected] = random_int_in_ranges 0 2

 

 

Share this post


Link to post
Share on other sites
ZAZ

 

Ok so, this is what I have done:

 

 

 

should it be a cleo script?

do you know about cleo?

 

Don't spawn the car immediately by gameload.

Beginn your script allways with a Loop in defaulft state including a check to activate the mod action.

 

:COACH_11wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_11 if 00EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0 jf @COACH_11 

 

 

Using models requires 5 steps by applying with models and their definition in its variable name

 

1. first step to load the model

 

0247: request_model #INFERNUSModel.Load(#BUS)

 

2. second step to prove if the model is loaded in an extra "load-model-check-Loop"

 

:Load_Model_Check0001: wait  0 ms00D6: if0248:   model #INFERNUS available004D: jump_if_false @Load_Model_Checkif and Model.Available(#BUS) Model.Available(#WMYBMX)jf @COACH_18 

 

 

3. The model can be created as soon as the model file is loaded and define it with a variable name

 

00A5: [email protected] = create_car #INFERNUS at 2487.5  -1660.5  13.350175: set_car [email protected] z_angle_to [email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)

 

 

4. release the loaded model file if it not needed anymore

 

0249: release_model #INFERNUSModel.Destroy(#BUS)

 

 

5. Release the defined item from script when the script has done its work

The script can then go to the status quo by jumping back into the first Loop

 

01C3: remove_references_to_car [email protected]  // Like turning a car into any random carCar.RemoveReferences([email protected])

 

Releasing a spawned car by using 01C3: remove_references_to_car deletes the instance of the car for our script

but its still available in the game but can not used anymore in our script.

 

An other way to release the car is to delete it complete:

 

00A6: destroy_car [email protected]

 

 

 

opcode 0209: [email protected] = random_int_in_ranges 0 2 choose a random integer value

in this case 0, 1 or 2 and submit the value to variable [email protected]

 

then you can check if the values is 0, 1 or 2

 

[email protected] == 0jf @COACH_49 

 

and use it to select where the code should jump to

 

 

 

 

the script below can choose one of three spawn locations because of opcode 0209:

but you must be in the range of the main check: near_point 410.0786 -1722.0

you can leave the bus with key enter/exit and enter it again with key 18(crouch)

 

thread 'COACH':COACH_11wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_11 if 00EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0 jf @COACH_11 Model.Load(#BUS)Model.Load(#WMYBMX):COACH_18wait 0 if and  Model.Available(#BUS)  Model.Available(#WMYBMX)jf @COACH_18 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 0 jf @COACH_49 [email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_235 :COACH_49if  [email protected] == 1 jf @COACH_98 [email protected] = Car.Create(#BUS, 442.4507, -1774.0104, 5.3573)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_235 :COACH_98wait 0 [email protected] = Car.Create(#BUS, 453.6612, -1701.9597, 10.7233)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_235 :COACH_235wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_344 if and  not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 350.0 350.0 50.0 flag 0 jf @COACH_344 if   not Actor.InCar($PLAYER_ACTOR, [email protected])jf @COACH_289 if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 jf @COACH_235 Car.SetMaxSpeed([email protected], 0.0)05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)jump @COACH_289 :COACH_289wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_344 if   not Car.Wrecked([email protected])jf @COACH_344 if   Actor.InCar($PLAYER_ACTOR, [email protected])jf @COACH_235 if 00E1:   player 0 pressed_key 15 jf @COACH_289 Player.CanMove($PLAYER_CHAR) = FalseCar.SetMaxSpeed([email protected], 0.0)wait 750 Player.CanMove($PLAYER_CHAR) = True0633: AS_actor $PLAYER_ACTOR exit_car wait 3000 Car.SetMaxSpeed([email protected], 30.0)Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 jump @COACH_235 :COACH_344Car.RemoveReferences([email protected])jump @COACH_11

 

 

 

 

Share this post


Link to post
Share on other sites
Gta Fishhead

 

Ok so, this is what I have done:

 

 

 

should it be a cleo script?

do you know about cleo?

 

Don't spawn the car immediately by gameload.

Beginn your script allways with a Loop in defaulft state including a check to activate the mod action.

 

:COACH_11wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_11 if 00EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0 jf @COACH_11 

 

 

Using models requires 5 steps by applying with models and their definition in its variable name

 

1. first step to load the model

 

0247: request_model #INFERNUSModel.Load(#BUS)

 

2. second step to prove if the model is loaded in an extra "load-model-check-Loop"

 

:Load_Model_Check0001: wait  0 ms00D6: if0248:   model #INFERNUS available004D: jump_if_false @Load_Model_Checkif and Model.Available(#BUS) Model.Available(#WMYBMX)jf @COACH_18 

 

 

3. The model can be created as soon as the model file is loaded and define it with a variable name

 

00A5: [email protected] = create_car #INFERNUS at 2487.5  -1660.5  13.350175: set_car [email protected] z_angle_to [email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)

 

 

4. release the loaded model file if it not needed anymore

 

0249: release_model #INFERNUSModel.Destroy(#BUS)

 

 

5. Release the defined item from script when the script has done its work

The script can then go to the status quo by jumping back into the first Loop

 

01C3: remove_references_to_car [email protected]  // Like turning a car into any random carCar.RemoveReferences([email protected])

 

Releasing a spawned car by using 01C3: remove_references_to_car deletes the instance of the car for our script

but its still available in the game but can not used anymore in our script.

 

An other way to release the car is to delete it complete:

 

00A6: destroy_car [email protected]

 

 

 

opcode 0209: [email protected] = random_int_in_ranges 0 2 choose a random integer value

in this case 0, 1 or 2 and submit the value to variable [email protected]

 

then you can check if the values is 0, 1 or 2

 

[email protected] == 0jf @COACH_49 

 

and use it to select where the code should jump to

 

 

 

 

the script below can choose one of three spawn locations because of opcode 0209:

but you must be in the range of the main check: near_point 410.0786 -1722.0

you can leave the bus with key enter/exit and enter it again with key 18(crouch)

 

thread 'COACH':COACH_11wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_11 if 00EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0 jf @COACH_11 Model.Load(#BUS)Model.Load(#WMYBMX):COACH_18wait 0 if and  Model.Available(#BUS)  Model.Available(#WMYBMX)jf @COACH_18 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 0 jf @COACH_49 [email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_235 :COACH_49if  [email protected] == 1 jf @COACH_98 [email protected] = Car.Create(#BUS, 442.4507, -1774.0104, 5.3573)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_235 :COACH_98wait 0 [email protected] = Car.Create(#BUS, 453.6612, -1701.9597, 10.7233)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_235 :COACH_235wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_344 if and  not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 350.0 350.0 50.0 flag 0 jf @COACH_344 if   not Actor.InCar($PLAYER_ACTOR, [email protected])jf @COACH_289 if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 jf @COACH_235 Car.SetMaxSpeed([email protected], 0.0)05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)jump @COACH_289 :COACH_289wait 0 if   Player.Defined($PLAYER_CHAR)jf @COACH_344 if   not Car.Wrecked([email protected])jf @COACH_344 if   Actor.InCar($PLAYER_ACTOR, [email protected])jf @COACH_235 if 00E1:   player 0 pressed_key 15 jf @COACH_289 Player.CanMove($PLAYER_CHAR) = FalseCar.SetMaxSpeed([email protected], 0.0)wait 750 Player.CanMove($PLAYER_CHAR) = True0633: AS_actor $PLAYER_ACTOR exit_car wait 3000 Car.SetMaxSpeed([email protected], 30.0)Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 jump @COACH_235 :COACH_344Car.RemoveReferences([email protected])jump @COACH_11

 

Yes it is a Cleo script, and I'll try it, thanks ZAZ biggrin.gifbiggrin.gif

 

I'm going to add some new bus stations, I will report if there is something wrong, thanks again smile.gifsmile.gif

 

 

(few hours later...)

I'm not sure what to use, I want for the bus to randomly spawn around the city, and I got about 14 stops, and when it creates on let's say stop no. 6, I want it to go trough stops no.7. 8. 9... and to stop at every station. I don't know how to do that!?!?

Edited by Gta Fishhead

Share this post


Link to post
Share on other sites
ZAZ

 

Yes it is a Cleo script, and I'll try it, thanks ZAZ biggrin.gif  biggrin.gif

 

I'm going to add some new bus stations, I will report if there is something wrong, thanks again smile.gif  smile.gif

 

 

(few hours later...)

I'm not sure what to use, I want for the bus to randomly spawn around the city, and I got about 14 stops, and when it creates on let's say stop no. 6, I want it to go trough stops no.7. 8. 9... and to stop at every station. I don't know how to do that!?!?

random choosing is not the solution

remember what I wrote: Don't spawn the car immediately by gameload.

Beginn your script allways with a Loop in defaulft state including a check to activate the mod action.

use the checks for if_player_near_point to activate bus spawning

write the chcks in a chain

 

 

 pseudo code :COACH_11wait 0if Player.Defined($PLAYER_CHAR)jf @COACH_11ifplayer near point <busstation1> radius 100. 100.jf @next1jump @spawnbus1:next1ifplayer near point <busstation2> radius 100. 100.jf @next2jump @spawnbus2:next2ifplayer near point <busstation3> radius 100. 100.jf @next3jump @spawnbus3:next3ifplayer near point <busstation4> radius 100. 100.jf @next4jump @spawnbus4:next4ifplayer near point <busstation5> radius 100. 100.jf @COACH_11jump @spawnbus5:spawnbus1create bus at <busstation1>jump @Loop1:spawnbus2create bus at <busstation2>jump @Loop1:spawnbus3create bus at <busstation3>jump @Loop1:spawnbus4create bus at <busstation4>jump @Loop1:spawnbus5create bus at <busstation5>jump @Loop1:Loop1wait 0if Player.Defined($PLAYER_CHAR)jf @cleanupifkey pressedjf @Loop1enter busjump @Loop2:Loop2wait 0if Player.Defined($PLAYER_CHAR)jf @cleanupifkey pressedjf @Loop2leave busjump @Loop2:cleanupremove reference to busjump @COACH_11

 

Share this post


Link to post
Share on other sites
Gta Fishhead

Yes it is a Cleo script, and I'll try it, thanks ZAZ biggrin.gif  biggrin.gif

 

I'm going to add some new bus stations, I will report if there is something wrong, thanks again smile.gif  smile.gif

 

 

(few hours later...)

I'm not sure what to use, I want for the bus to randomly spawn around the city, and I got about 14 stops, and when it creates on let's say stop no. 6, I want it to go trough stops no.7. 8. 9... and to stop at every station. I don't know how to do that!?!?

random choosing is not the solution

remember what I wrote: Don't spawn the car immediately by gameload.

Beginn your script allways with a Loop in defaulft state including a check to activate the mod action.

use the checks for if_player_near_point to activate bus spawning

write the chcks in a chain

 

 

 pseudo code :COACH_11wait 0if Player.Defined($PLAYER_CHAR)jf @COACH_11ifplayer near point <busstation1> radius 100. 100.jf @next1jump @spawnbus1:next1ifplayer near point <busstation2> radius 100. 100.jf @next2jump @spawnbus2:next2ifplayer near point <busstation3> radius 100. 100.jf @next3jump @spawnbus3:next3ifplayer near point <busstation4> radius 100. 100.jf @next4jump @spawnbus4:next4ifplayer near point <busstation5> radius 100. 100.jf @COACH_11jump @spawnbus5:spawnbus1create bus at <busstation1>jump @Loop1:spawnbus2create bus at <busstation2>jump @Loop1:spawnbus3create bus at <busstation3>jump @Loop1:spawnbus4create bus at <busstation4>jump @Loop1:spawnbus5create bus at <busstation5>jump @Loop1:Loop1wait 0if Player.Defined($PLAYER_CHAR)jf @cleanupifkey pressedjf @Loop1enter busjump @Loop2:Loop2wait 0if Player.Defined($PLAYER_CHAR)jf @cleanupifkey pressedjf @Loop2leave busjump @Loop2:cleanupremove reference to busjump @COACH_11

 

I'll try.

Share this post


Link to post
Share on other sites
Gta Fishhead
I'm not sure what to use, I want for the bus to randomly spawn around the city, and I got about 14 stops, and when it creates on let's say stop no. 6, I want it to go trough stops no.7. 8. 9... and to stop at every station. I don't know how to do that!?!?

random choosing is not the solution

remember what I wrote: Don't spawn the car immediately by gameload.

Beginn your script allways with a Loop in defaulft state including a check to activate the mod action.

use the checks for if_player_near_point to activate bus spawning

write the chcks in a chain

 

 

This is so far.

After a while of writing I came up with this:

 

(I didn't set all the points where it should go after creating a bus, and I want to know should I add points where should the bus stop for every created bus, or, is there something else?

 

 

thread 'COACH' :COACH_11wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_11 Model.Load(#BUS)Model.Load(#WMYBMX)jump @COACH_47 :COACH_47wait 0 if and  Model.Available(#BUS)  Model.Available(#WMYBMX)else_jump @COACH_11 jump @COACH_78 :COACH_7800EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0 else_jump @COACH_119 jump @COACH_704 :COACH_119if 00EC:   actor $PLAYER_ACTOR 0 near_point 1036.472 -1832.056 radius 80.0 80.0 else_jump @COACH_164 jump @COACH_784 :COACH_164if 00EC:   actor $PLAYER_ACTOR 0 near_point 1128.926 -1410.899 radius 80.0 80.0 else_jump @COACH_209 jump @COACH_864 :COACH_209if 00EC:   actor $PLAYER_ACTOR 0 near_point 1524.559 -1666.833 radius 80.0 80.0 else_jump @COACH_254 jump @COACH_948 :COACH_254if 00EC:   actor $PLAYER_ACTOR 0 near_point 1750.569 -1826.071 radius 80.0 80.0 else_jump @COACH_299 jump @COACH_1028 :COACH_299if 00EC:   actor $PLAYER_ACTOR 0 near_point 1983.263 -2171.554 radius 80.0 80.0 else_jump @COACH_344 jump @COACH_1112 :COACH_344if 00EC:   actor $PLAYER_ACTOR 0 near_point 2321.078 -2261.391 radius 80.0 80.0 else_jump @COACH_389 jump @COACH_1192 :COACH_389if 00EC:   actor $PLAYER_ACTOR 0 near_point 2856.122 -1776.667 radius 80.0 80.0 else_jump @COACH_434 jump @COACH_1276 :COACH_434if 00EC:   actor $PLAYER_ACTOR 0 near_point 2895.015 -1167.742 radius 80.0 80.0 else_jump @COACH_479 jump @COACH_1356 :COACH_479if 00EC:   actor $PLAYER_ACTOR 0 near_point 2263.311 -1140.45 radius 80.0 80.0 else_jump @COACH_524 jump @COACH_1440 :COACH_524if 00EC:   actor $PLAYER_ACTOR 0 near_point 2038.346 -1130.795 radius 80.0 80.0 else_jump @COACH_569 jump @COACH_1520 :COACH_569if 00EC:   actor $PLAYER_ACTOR 0 near_point 1653.8 -1155.731 radius 80.0 80.0 else_jump @COACH_614 jump @COACH_1604 :COACH_614if 00EC:   actor $PLAYER_ACTOR 0 near_point 1128.959 -940.2629 radius 80.0 80.0 else_jump @COACH_659 jump @COACH_1684 :COACH_659if 00EC:   actor $PLAYER_ACTOR 0 near_point 831.9307 -1315.162 radius 80.0 80.0 else_jump @COACH_11 jump @COACH_1768 :[email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :[email protected] = Car.Create(#BUS, 1036.472, -1832.056, 13.7275)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :COACH_864wait 0 [email protected] = Car.Create(#BUS, 1128.926, -1410.899, 13.6131)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :[email protected] = Car.Create(#BUS, 1524.559, -1666.833, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_704 :COACH_1028wait 0 [email protected] = Car.Create(#BUS, 1750.569, -1826.071, 13.3791)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :[email protected] = Car.Create(#BUS, 1983.263, -2171.554, 13.5406)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :COACH_1192wait 0 [email protected] = Car.Create(#BUS, 2321.078, -2261.391, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :[email protected] = Car.Create(#BUS, 2856.122, -1776.667, 11.0469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :COACH_1356wait 0 [email protected] = Car.Create(#BUS, 2895.015, -1167.742, 11.0543)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :[email protected] = Car.Create(#BUS, 2263.311, -1140.45, 26.9883)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :COACH_1520wait 0 [email protected] = Car.Create(#BUS, 2038.346, -1130.795, 24.4189)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :[email protected] = Car.Create(#BUS, 1653.8, -1155.731, 23.9881)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :COACH_1684wait 0 [email protected] = Car.Create(#BUS, 1128.959, -940.2629, 42.9002)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :COACH_1768wait 0 [email protected] = Car.Create(#BUS, 831.9307, -1315.162, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_1852 :COACH_1852wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2180 if and  not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 350.0 350.0 50.0 flag 0 else_jump @COACH_2180 if   not Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_2038 if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 else_jump @COACH_704 Car.SetMaxSpeed([email protected], 0.0)05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)jump @COACH_2038 :COACH_2038wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2180 if   not Car.Wrecked([email protected])else_jump @COACH_2180 if   Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_704 if 00E1:   player 0 pressed_key 15 else_jump @COACH_2038 Player.CanMove($PLAYER_CHAR) = FalseCar.SetMaxSpeed([email protected], 0.0)wait 750 Player.CanMove($PLAYER_CHAR) = True0633: AS_actor $PLAYER_ACTOR exit_car wait 3000 Car.SetMaxSpeed([email protected], 30.0)Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 jump @COACH_704 :COACH_2180Car.RemoveReferences([email protected])jump @COACH_11 

 

 

Anything I should add, and I would like to set when I'm near the point, I don't want for the bus to create the same time, I want to spawn from time to time, anything I should do?

Share this post


Link to post
Share on other sites
ZAZ

 

 

Anything I should add,

 

the actor refernce must also be reomoved in the cleanup part

 

:COACH_2180Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])jump @COACH_11

 

 

If you want other coords for the destination in the drive_to code depending on the busstation

then submit coords as variables

 

 

:COACH_7800EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0else_jump @[email protected] = [email protected] = [email protected] = 13.7275jump @COACH_704Car.DriveTo([email protected], [email protected], [email protected], [email protected])

 

 

you can do the same for the bus spawn and then you need only one bus spawn part and put the model load also in the spawn part

 

[email protected] = [email protected] = [email protected] = [email protected] = 270.0:COACH_704Model.Load(#BUS)Model.Load(#WMYBMX)jump @COACH_47:COACH_706wait 0if and Model.Available(#BUS) Model.Available(#WMYBMX)else_jump @COACH_11jump @[email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseatCar.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000jump @COACH_1852

 

 

 

 

and I would like to set when I'm near the point, I don't want for the bus to create the same time, I want to spawn from time to time, anything I should do?

ah, therefor you had the random code

this could be a way to do

 

 

0209: [email protected] = random_int_in_ranges 0 2if  [email protected] == 1 jf @COACH_704// this let the code pass the check only if the engine choose 1

 

 

other way could be to check for gametime

 

00BF: [email protected] = current_time_hours, [email protected] = current_time_minutesif  or [email protected] == 8 [email protected] == 20   jf @COACH_704// this let the code pass the check //only between 8 and 9 o'clock //and between 20 and 21 o'clock

 

 

 

summary

 

thread 'COACH':COACH_11wait 0if Player.Defined($PLAYER_CHAR)else_jump @COACH_1100EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0else_jump @COACH_1190209: [email protected] = random_int_in_ranges 0 2if  [email protected] == 1 jf @COACH_11900BF: [email protected] = current_time_hours, [email protected] = current_time_minutesif  or [email protected] == 8 [email protected] == 20   jf @[email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.7275jump @COACH_704:COACH_119if00EC:   actor $PLAYER_ACTOR 0 near_point 1036.472 -1832.056 radius 80.0 80.0else_jump @COACH_110209: [email protected] = random_int_in_ranges 0 2if  [email protected] == 2 jf @COACH_1100BF: [email protected] = current_time_hours, [email protected] = current_time_minutesif  or [email protected] == 9 [email protected] == 16   jf @[email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.7275jump @COACH_704:COACH_704Model.Load(#BUS)Model.Load(#WMYBMX)jump @COACH_47:COACH_706wait 0if and Model.Available(#BUS) Model.Available(#WMYBMX)else_jump @[email protected] = Car.Create(#BUS, [email protected], [email protected], [email protected])Car.Angle([email protected]) = [email protected]: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseatCar.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000jump @COACH_1852

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
Gta Fishhead

 

ah, therefor you had the random code

this could be a way to do

 

 

Oh man, I had this bug before, where I'm near the point the bus creates over and over, in a very short time,it becomes crowded with buses, a nightmare..... cry.gif

And I can't enter a bus,...again sad.gif

 

And I'm not sure did I set the random int ranges right?

 

 

thread 'COACH' :COACH_11wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_11 Model.Load(#BUS)Model.Load(#WMYBMX)jump @COACH_47 :COACH_47wait 0 if and  Model.Available(#BUS)  Model.Available(#WMYBMX)else_jump @COACH_11 jump @COACH_78 :COACH_7800EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0 else_jump @COACH_119 jump @COACH_704 :COACH_119if 00EC:   actor $PLAYER_ACTOR 0 near_point 1036.472 -1832.056 radius 80.0 80.0 else_jump @COACH_164 jump @COACH_815 :COACH_164if 00EC:   actor $PLAYER_ACTOR 0 near_point 1128.926 -1410.899 radius 80.0 80.0 else_jump @COACH_209 jump @COACH_926 :COACH_209if 00EC:   actor $PLAYER_ACTOR 0 near_point 1524.559 -1666.833 radius 80.0 80.0 else_jump @COACH_254 jump @COACH_1037 :COACH_254if 00EC:   actor $PLAYER_ACTOR 0 near_point 1750.569 -1826.071 radius 80.0 80.0 else_jump @COACH_299 jump @COACH_1148 :COACH_299if 00EC:   actor $PLAYER_ACTOR 0 near_point 1983.263 -2171.554 radius 80.0 80.0 else_jump @COACH_344 jump @COACH_1259 :COACH_344if 00EC:   actor $PLAYER_ACTOR 0 near_point 2321.078 -2261.391 radius 80.0 80.0 else_jump @COACH_389 jump @COACH_1370 :COACH_389if 00EC:   actor $PLAYER_ACTOR 0 near_point 2856.122 -1776.667 radius 80.0 80.0 else_jump @COACH_434 jump @COACH_1481 :COACH_434if 00EC:   actor $PLAYER_ACTOR 0 near_point 2895.015 -1167.742 radius 80.0 80.0 else_jump @COACH_479 jump @COACH_1592 :COACH_479if 00EC:   actor $PLAYER_ACTOR 0 near_point 2263.311 -1140.45 radius 80.0 80.0 else_jump @COACH_524 jump @COACH_1703 :COACH_524if 00EC:   actor $PLAYER_ACTOR 0 near_point 2038.346 -1130.795 radius 80.0 80.0 else_jump @COACH_569 jump @COACH_1814 :COACH_569if 00EC:   actor $PLAYER_ACTOR 0 near_point 1653.8 -1155.731 radius 80.0 80.0 else_jump @COACH_614 jump @COACH_1925 :COACH_614if 00EC:   actor $PLAYER_ACTOR 0 near_point 1128.959 -940.2629 radius 80.0 80.0 else_jump @COACH_659 jump @COACH_2036 :COACH_659if 00EC:   actor $PLAYER_ACTOR 0 near_point 831.9307 -1315.162 radius 80.0 80.0 else_jump @COACH_11 jump @COACH_2147 :COACH_704wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_815wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 1036.472, -1832.056, 13.7275)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_926wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 1128.926, -1410.899, 13.6131)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1037wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 1524.559, -1666.833, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1148wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 1750.569, -1826.071, 13.3791)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1259wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 1983.263, -2171.554, 13.5406)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1370wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 2321.078, -2261.391, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1481wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 2856.122, -1776.667, 11.0469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1592wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 2895.015, -1167.742, 11.0543)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1703wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 2263.311, -1140.45, 26.9883)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1814wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 2038.346, -1130.795, 24.4189)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1925wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 1653.8, -1155.731, 23.9881)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_2036wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 1128.959, -940.2629, 42.9002)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_2147wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2586 [email protected] = Car.Create(#BUS, 831.9307, -1315.162, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_2258wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2586 if and  not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 350.0 350.0 50.0 flag 0 else_jump @COACH_2586 if   not Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_2444 if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 else_jump @COACH_704 Car.SetMaxSpeed([email protected], 0.0)05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)jump @COACH_2444 :COACH_2444wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2586 if   not Car.Wrecked([email protected])else_jump @COACH_2586 if   Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_704 if 00E1:   player 0 pressed_key 15 else_jump @COACH_2444 Player.CanMove($PLAYER_CHAR) = FalseCar.SetMaxSpeed([email protected], 0.0)wait 750 Player.CanMove($PLAYER_CHAR) = True0633: AS_actor $PLAYER_ACTOR exit_car wait 3000 Car.SetMaxSpeed([email protected], 30.0)Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 jump @COACH_704 :COACH_2586Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])jump @COACH_11 

 

 

Help!!

Edited by Gta Fishhead

Share this post


Link to post
Share on other sites
ZAZ

you have wrong jump labels

 

here:

 

00D6: if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 004D: jump_if_false @COACH_729

 

 

and here:

 

00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @COACH_729

 

 

and here:

 

0001: wait 3000 ms 00AD: set_car [email protected] max_speed_to 30.0 00AF: set_car [email protected] driver_behaviour_to 1 00AE: set_car [email protected] traffic_behaviour_to 1 0002: jump @COACH_729

 

 

it should be so:

 

:COACH_22830001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @COACH_2611 00D6: if and8119:   not car [email protected] wrecked 0205:   actor $PLAYER_ACTOR near_car [email protected] radius 350.0 350.0 50.0 flag 0 004D: jump_if_false @COACH_2611 00D6: if 80DB:   not actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @COACH_2469 00D6: if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 004D: jump_if_false @COACH_2283 00AD: set_car [email protected] max_speed_to 0.0 05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms 0001: wait 10000 ms 00AD: set_car [email protected] max_speed_to 30.0 00A7: car [email protected] drive_to 1036.472 -1832.056 13.7275 0002: jump @COACH_2469 :COACH_24690001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @COACH_2611 00D6: if 8119:   not car [email protected] wrecked 004D: jump_if_false @COACH_2611 00D6: if 00DB:   actor $PLAYER_ACTOR in_car [email protected] 004D: jump_if_false @COACH_2283 00D6: if 00E1:   player 0 pressed_key 15 004D: jump_if_false @COACH_2469 01B4: set_player $PLAYER_CHAR can_move 0 00AD: set_car [email protected] max_speed_to 0.0 0001: wait 750 ms 01B4: set_player $PLAYER_CHAR can_move 1 0633: AS_actor $PLAYER_ACTOR exit_car 0001: wait 3000 ms 00AD: set_car [email protected] max_speed_to 30.0 00AF: set_car [email protected] driver_behaviour_to 1 00AE: set_car [email protected] traffic_behaviour_to 1 0002: jump @COACH_2283

 

Share this post


Link to post
Share on other sites
Gta Fishhead

 

you have wrong jump labels

 

 

OK, I'm about to fix that, hehe biggrin.gif

 

(little bit later)

 

All right, now it works fine, I think it is done about 79%

Without your help ZAZ, it couldn't be done.

But please stick around, I might need just a little bit more help, I'll set all the stations the bus is going to go trough, and yes, I'll report if something is wrong lol.gif

Edited by Gta Fishhead

Share this post


Link to post
Share on other sites
Gta Fishhead

OK, I'm trying to set the stops for the bus, I came up with this:

 

:COACH_2258wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2779 if and  not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 350.0 350.0 50.0 flag 0 else_jump @COACH_2779 if   not Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_2630 if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 else_jump @COACH_2258 Car.SetMaxSpeed([email protected], 0.0)05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)01B0:   car [email protected] sphere 0 in_sphere 1036.472 -1832.056 13.7275 radius 2.0 2.0 4.0 stopped wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1128.926, -1410.899, 13.6131)01B0:   car [email protected] sphere 0 in_sphere 1128.926 -1410.899 13.6131 radius 2.0 2.0 4.0 stopped wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1524.559, -1666.833, 13.5469)01B0:   car [email protected] sphere 0 in_sphere 1524.559 -1666.833 13.5469 radius 2.0 2.0 4.0 stopped wait 10000 jump @COACH_2630 

 

 

 

I believe this is not way to go, should I do like this:

 

Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)wait 10000 jump @COACH_2630:COACH_2630Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1524.559, -1666.833, 13.5469)wait 10000 jump @COACH_2720

 

 

And I want for the bus to STOP on every station, to wait for about 10 seconds, and to move to next station, but I can't find an opcode for it, I only know this one:

 

01B0:   car [email protected] sphere 0 in_sphere 1128.926 -1410.899 13.6131 radius 2.0 2.0 4.0 stopped 

 

What should I do? confused.gifconfused.gif

Share this post


Link to post
Share on other sites
Gta Fishhead

Ofcourse, this is not finished, but it looks like this right now:

 

thread 'COACH' :COACH_11wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_11 Model.Load(#BUS)Model.Load(#WMYBMX)jump @COACH_47 :COACH_47wait 0 if and  Model.Available(#BUS)  Model.Available(#WMYBMX)else_jump @COACH_11 jump @COACH_78 :COACH_7800EC:   actor $PLAYER_ACTOR 0 near_point 410.0786 -1722.011 radius 80.0 80.0 else_jump @COACH_119 jump @COACH_704 :COACH_119if 00EC:   actor $PLAYER_ACTOR 0 near_point 1036.472 -1832.056 radius 80.0 80.0 else_jump @COACH_164 jump @COACH_815 :COACH_164if 00EC:   actor $PLAYER_ACTOR 0 near_point 1128.926 -1410.899 radius 80.0 80.0 else_jump @COACH_209 jump @COACH_926 :COACH_209if 00EC:   actor $PLAYER_ACTOR 0 near_point 1524.559 -1666.833 radius 80.0 80.0 else_jump @COACH_254 jump @COACH_1037 :COACH_254if 00EC:   actor $PLAYER_ACTOR 0 near_point 1750.569 -1826.071 radius 80.0 80.0 else_jump @COACH_299 jump @COACH_1148 :COACH_299if 00EC:   actor $PLAYER_ACTOR 0 near_point 1983.263 -2171.554 radius 80.0 80.0 else_jump @COACH_344 jump @COACH_1259 :COACH_344if 00EC:   actor $PLAYER_ACTOR 0 near_point 2321.078 -2261.391 radius 80.0 80.0 else_jump @COACH_389 jump @COACH_1370 :COACH_389if 00EC:   actor $PLAYER_ACTOR 0 near_point 2856.122 -1776.667 radius 80.0 80.0 else_jump @COACH_434 jump @COACH_1481 :COACH_434if 00EC:   actor $PLAYER_ACTOR 0 near_point 2895.015 -1167.742 radius 80.0 80.0 else_jump @COACH_479 jump @COACH_1592 :COACH_479if 00EC:   actor $PLAYER_ACTOR 0 near_point 2263.311 -1140.45 radius 80.0 80.0 else_jump @COACH_524 jump @COACH_1703 :COACH_524if 00EC:   actor $PLAYER_ACTOR 0 near_point 2038.346 -1130.795 radius 80.0 80.0 else_jump @COACH_569 jump @COACH_1814 :COACH_569if 00EC:   actor $PLAYER_ACTOR 0 near_point 1653.8 -1155.731 radius 80.0 80.0 else_jump @COACH_614 jump @COACH_1925 :COACH_614if 00EC:   actor $PLAYER_ACTOR 0 near_point 1128.959 -940.2629 radius 80.0 80.0 else_jump @COACH_659 jump @COACH_2036 :COACH_659if 00EC:   actor $PLAYER_ACTOR 0 near_point 831.9307 -1315.162 radius 80.0 80.0 else_jump @COACH_11 jump @COACH_2147 :COACH_704wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 410.0786, -1722.011, 8.878)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_815wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 1036.472, -1832.056, 13.7275)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_926wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 1128.926, -1410.899, 13.6131)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1037wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 1524.559, -1666.833, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1148wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 1750.569, -1826.071, 13.3791)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1259wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 1983.263, -2171.554, 13.5406)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1370wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 2321.078, -2261.391, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1481wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 2856.122, -1776.667, 11.0469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1592wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 2895.015, -1167.742, 11.0543)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1703wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 2263.311, -1140.45, 26.9883)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1814wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 2038.346, -1130.795, 24.4189)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_1925wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 1653.8, -1155.731, 23.9881)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_2036wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 1128.959, -940.2629, 42.9002)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_2147wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 1 else_jump @COACH_2779 [email protected] = Car.Create(#BUS, 831.9307, -1315.162, 13.5469)Car.Angle([email protected]) = 270.00129: [email protected] = create_actor_pedtype 23 model #WMYBMX in_car [email protected] driverseat Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 Model.Destroy(#BUS)Model.Destroy(#WMYBMX)wait 1000 jump @COACH_2258 :COACH_2258wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2779 if and  not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 350.0 350.0 50.0 flag 0 else_jump @COACH_2779 if   not Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_2630 if and0205:   actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 10.0 flag 0 00E1:   player 0 pressed_key 18 else_jump @COACH_2258 Car.SetMaxSpeed([email protected], 0.0)05CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1036.472, -1832.056, 13.7275)01B0:   car [email protected] sphere 0 in_sphere 1036.472 -1832.056 13.7275 radius 2.0 2.0 4.0 stopped wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1128.926, -1410.899, 13.6131)01B0:   car [email protected] sphere 0 in_sphere 1128.926 -1410.899 13.6131 radius 2.0 2.0 4.0 stopped wait 10000 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1524.559, -1666.833, 13.5469)01B0:   car [email protected] sphere 0 in_sphere 1524.559 -1666.833 13.5469 radius 2.0 2.0 4.0 stopped wait 10000 jump @COACH_2630 :COACH_2630wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2779 if   not Car.Wrecked([email protected])else_jump @COACH_2779 if   Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_2258 if 00E1:   player 0 pressed_key 15 else_jump @COACH_2630 Player.CanMove($PLAYER_CHAR) = FalseCar.SetMaxSpeed([email protected], 0.0)wait 750 Player.CanMove($PLAYER_CHAR) = True0633: AS_actor $PLAYER_ACTOR exit_car wait 3000 Car.SetMaxSpeed([email protected], 30.0)Car.SetDriverBehaviour([email protected], FollowRoad)Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 jump @COACH_704 :COACH_2779Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])jump @COACH_11 

 

I'm not able to make the right bus stops for the bus to go trough angry.gif .

Again HELP!!

Share this post


Link to post
Share on other sites
ZAZ
Ofcourse, this is not finished, but it looks like this right now:

 

I'm not able to make the right bus stops for the bus to go trough angry.gif .

Again HELP!!

read Car Drive Tutorial

use access checks, subscripts and jumptables

Share this post


Link to post
Share on other sites
Gta Fishhead
Ofcourse, this is not finished, but it looks like this right now:

 

I'm not able to make the right bus stops for the bus to go trough angry.gif .

Again HELP!!

read Car Drive Tutorial

use access checks, subscripts and jumptables

I'm about to read it, thanks biggrin.gif

Share this post


Link to post
Share on other sites
Gta Fishhead

read Car Drive Tutorial

use access checks, subscripts and jumptables

OK, I have read that tutorial, but I didn't find what I was looking for.

What that is, I'll explain now:

 

:COACH_2444if 01AD:   car [email protected] sphere 0 near_point 1036.472 -1832.056 radius 2.0 2.0 else_jump @COACH_2444 Car.SetMaxSpeed([email protected], 0.0)wait 7000 jump @COACH_2524 :COACH_2524wait 0 if 01AE:   car [email protected] sphere 0 near_point 1036.472 -1832.056 radius 2.0 2.0 stopped else_jump @COACH_2444 Car.SetMaxSpeed([email protected], 30.0)Car.DriveTo([email protected], 1128.926, -1410.899, 13.6131)jump @COACH_2603 :COACH_2603wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @COACH_2752 if   not Car.Wrecked([email protected])else_jump @COACH_2752 if   Actor.InCar($PLAYER_ACTOR, [email protected])else_jump @COACH_2258 if 00E1:   player 0 pressed_key 15 else_jump @COACH_2603 Player.CanMove($PLAYER_CHAR) = FalseCar.SetMaxSpeed([email protected], 0.0)wait 750 Player.CanMove($PLAYER_CHAR) = True0633: AS_actor $PLAYER_ACTOR exit_car wait 3000 Car.SetMaxSpeed([email protected], 30.0)Car.SetDriverBehaviour([email protected], FollowRoad)Car.SetDriverBehaviour([email protected], FollowRoad)00AE: set_car [email protected] traffic_behaviour_to 1 jump @COACH_704 :COACH_2752Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])jump @COACH_11 

 

Allright, this is the last part of the script, I have modified the first 2 sections, and, I believe , when I want for the bus to stop at the station I use this:

 

Car.SetMaxSpeed([email protected], 0.0)

 

And then the game crashes, I tried adding this line:

 

01AE:   car [email protected] sphere 0 near_point 1036.472 -1832.056 radius 2.0 2.0 stopped 

 

but again, nothing.... I also added some checks, and that didn't work eather...

I am very confused man right now!!

Share this post


Link to post
Share on other sites
ZAZ

 

OK, I have read that tutorial, but I didn't find what I was looking for.

 

you can not find there a solution for your bus script

you should learn to write a complex cardrive script

try to understand the Airport circle script

get rid from your bus script and write test scripts which let a car drive a route by passing checkpoints to get the coords for the next destination

and consider what I wrote:

 

In praxis to write a car drive script with a longer specific route needs a more complex script,

which checks if the car reached the destination to can submit the new destination.

Because you can not check the same destination coords which you want to submit when the car reached it,

you must use access checks

 

Share this post


Link to post
Share on other sites
Gta Fishhead

 

you should learn to write a complex cardrive script

try to understand the Airport circle script

 

OK, I guess I need to understand a lot of things, so I'm asking you, is there another tutorial I should read?

 

Maybe soon I'll came up with the finished script,......maybe.

Share this post


Link to post
Share on other sites
ZAZ

 

you should learn to write a complex cardrive script

try to understand the Airport circle script

 

OK, I guess I need to understand a lot of things, so I'm asking you, is there another tutorial I should read?

Yes, the whole CLEO Script Tutorial and Dutchys Mission Coding for Dummies is also useful.

Important is to get much experience. You should know what you can do with gosub and jumptables.

 

Maybe soon I'll came up with the finished script,......maybe.

You will need minimum 3 months

Share this post


Link to post
Share on other sites
Gta Fishhead

You will need minimum 3 months

Thanks for that!!!! mercie_blink.gifmercie_blink.gif

Share this post


Link to post
Share on other sites
s02282

sorry for interruption... actually i have created a bus route mod long time ago(nearly the same as what you wanna do, but it is in LV instead), i just wanna give you an alternative reference, you can download the file here: The Deuce bus route mod[/url]http://www.gtainside.com/en/download.php?do=download&id=17381 , I hope it helps...

Share this post


Link to post
Share on other sites
Gta Fishhead

 

sorry for interruption... actually i have created a bus route mod long time ago(nearly the same as what you wanna do, but it is in LV instead), i just wanna give you an alternative reference, you can download the file here: The Deuce bus route mod[/url]http://www.gtainside.com/en/download.php?do=download&id=17381  , I hope it helps...

Hey man, I downloaded that mod a week ago, it is great biggrin.gifbiggrin.gif , and yeah, I have changed the coordinates, for Los Santos, I still have a few bugs

, so could you help me with it, it is fully operating, but when I changed a script, at some stations the information of "you could wait the bus at this station..." it repeates over and over again, I thought it's about jump values, but I checked that...

I can board on many stations, and to drive all the way around, without bugs, but at some stations I can't board on....

 

 

And, I didn't release the script, dont worry... smile.gif

 

And I tried to put a script on line, but it is too biiiiiiiiggggg, so it doesn't accept.

I really want to show it to you, but even if I copy the part of it it can' accept it..... suicidal.gif

Edited by Gta Fishhead

Share this post


Link to post
Share on other sites
Gta Fishhead

The script:

 

//-------------MAIN---------------thread 'BUS' wait 15000 03E5: show_text_box 'DEUCE' 0209: [email protected] = random_int_in_ranges 0 5000 :BUS_37wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 653.6099 -1756.7673 radius 20.0 20.0 else_jump @BUS_143 [email protected] = 707.0204 [email protected] = -1389.3361 [email protected] = 180.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_143wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 824.3757 -1789.6517 radius 20.0 20.0 else_jump @BUS_249 [email protected] = 653.6099 [email protected] = -1756.7673 [email protected] = 300.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_249wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 984.4473 -1807.4735 radius 20.0 20.0 else_jump @BUS_355 [email protected] = 824.3757 [email protected] = -1789.6517 [email protected] = 0.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_355wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 1127.2611 -1411.5946 radius 20.0 20.0 else_jump @BUS_461 [email protected] = 984.4473 [email protected] = -1807.4735 [email protected] = 0.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_461wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 1481.1509 -1738.0487 radius 20.0 20.0 else_jump @BUS_567 [email protected] = 1127.2611 [email protected] = -1411.5946 [email protected] = 0.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_567wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 1746.5406 -1825.9158 radius 20.0 20.0 else_jump @BUS_673 [email protected] = 1481.1509 [email protected] = -1738.0487 [email protected] = 0.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_673wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 1956.0354 -2123.2776 radius 20.0 20.0 else_jump @BUS_779 [email protected] = 1746.5406 [email protected] = -1825.9158 [email protected] = 333.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_779wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2030.8307 -2172.4258 radius 20.0 20.0 else_jump @BUS_885 [email protected] = 1956.0354 [email protected] = -2123.2776 [email protected] = 0.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_885wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2485.3655 -2176.1711 radius 20.0 20.0 else_jump @BUS_991 [email protected] = 2030.8307 [email protected] = -2172.4258 [email protected] = 0.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_991wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2842.9294 -2067.2126 radius 20.0 20.0 else_jump @BUS_1097 [email protected] = 2485.3655 [email protected] = -2176.1711 [email protected] = 0.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1097wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2857.4463 -1771.8214 radius 20.0 20.0 else_jump @BUS_1203 [email protected] = 2842.9294 [email protected] = -2067.2126 [email protected] = 356.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1203wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2931.1506 -1469.6289 radius 20.0 20.0 else_jump @BUS_1309 [email protected] = 2857.4463 [email protected] = -1771.8214 [email protected] = 90.0 03E5: show_text_box 'BUS_T1' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1309wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2895.9099 -1171.0854 radius 20.0 20.0 else_jump @BUS_1415 [email protected] = 2931.1506 [email protected] = -1469.6289 [email protected] = 90.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1415wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2465.9990 -1144.8367 radius 20.0 20.0 else_jump @BUS_1521 [email protected] = 2895.9099 [email protected] = -1171.0854 [email protected] = 0.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1521wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2270.7729 -1141.3669 radius 20.0 20.0 else_jump @BUS_1627 [email protected] = 2465.9990 [email protected] = -1144.8367 [email protected] = 307.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1627wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 2002.1309 -1130.0703 radius 20.0 20.0 else_jump @BUS_1733 [email protected] = 2270.7729 [email protected] = -1141.3669 [email protected] = 180.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1733wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 1658.5483 -1155.0594 radius 20.0 20.0 else_jump @BUS_1839 [email protected] = 2002.1309 [email protected] = -1130.0703 [email protected] = 180.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1839wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 1462.8992 -1028.1584 radius 20.0 20.0 else_jump @BUS_1945 [email protected] = 1658.5483 [email protected] = -1155.0594 [email protected] = 180.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_1945wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 1132.3770 -939.4685 radius 20.0 20.0 else_jump @BUS_2051 [email protected] = 1462.8992 [email protected] = -1028.1584 [email protected] = 180.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_2051wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 791.6666 -1270.5913 radius 20.0 20.0 else_jump @BUS_2157 [email protected] = 1132.3770 [email protected] = -939.4685 [email protected] = 180.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_2157wait 0 if 00EC:   actor $PLAYER_ACTOR 0 near_point 707.0204 -1389.3361 radius 20.0 20.0 else_jump @BUS_37 [email protected] = 791.6666 [email protected] = [email protected] = 180.0 03E5: show_text_box 'BUS_T2' wait 3000 03E5: show_text_box 'ON_BUS' jump @BUS_2263 :BUS_2263wait 0 0209: [email protected] = random_int_in_ranges 0 2 if  [email protected] == 0 else_jump @BUS_2316 jump @BUS_2301 :[email protected] = 431 jump @BUS_2324 :[email protected] = 437 :BUS_2324Model.Load([email protected])Model.Load(#MALE01)038B: load_requested_models jump @BUS_2342 :BUS_2342wait 0 if and  Model.Available([email protected])  Model.Available(#MALE01)else_jump @BUS_2342 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 wait [email protected] [email protected] = Car.Create([email protected], [email protected], [email protected], 10.5)Car.Angle([email protected]) = [email protected]: set_car [email protected] primary_color_to 1 secondary_color_to 1 0129: [email protected] = create_actor_pedtype 4 model #MALE01 in_car [email protected] driverseat Model.Destroy([email protected])Model.Destroy(#MALE01)0209: [email protected] = random_int_in_ranges 25000 40000 0209: [email protected] = random_int_in_ranges 5000 10000 wait [email protected] jump @BUS_2493 :BUS_2493if  [email protected] == -1389.3361 else_jump @BUS_2521 jump @BUS_49148 :BUS_2521if  [email protected] == -1756.7673 else_jump @BUS_2549 jump @BUS_5692 :BUS_2549if  [email protected] == -1789.6517 else_jump @BUS_2577 jump @BUS_7694 :BUS_2577if  [email protected] == -1807.4735 else_jump @BUS_2605 jump @BUS_9696 :BUS_2605if  [email protected] == -1411.5946 else_jump @BUS_2633 jump @BUS_11698 :BUS_2633if  [email protected] == -1738.0487 else_jump @BUS_2661 jump @BUS_13700 :BUS_2661if  [email protected] == -1825.9158 else_jump @BUS_2689 jump @BUS_15702 :BUS_2689if  [email protected] == -2123.2776 else_jump @BUS_2717 jump @BUS_17795 :BUS_2717if  [email protected] == -2172.4258 else_jump @BUS_2745 jump @BUS_19888 :BUS_2745if  [email protected] == -2176.1711 else_jump @BUS_2773 jump @BUS_21981 :BUS_2773if  [email protected] == -2067.2126 else_jump @BUS_2801 jump @BUS_23892 :BUS_2801if  [email protected] == -1771.8214 else_jump @BUS_2829 jump @BUS_25894 :BUS_2829if  [email protected] == -1469.6289 else_jump @BUS_2857 jump @BUS_28351 :BUS_2857if  [email protected] == -1171.0854 else_jump @BUS_2885 jump @BUS_31494 :BUS_2885if  [email protected] == -1144.8367 else_jump @BUS_2913 jump @BUS_33587 :BUS_2913if  [email protected] == -1141.3669 else_jump @BUS_2941 jump @BUS_35680 :BUS_2941if  [email protected] == -1130.0703 else_jump @BUS_2969 jump @BUS_37773 :BUS_2969if  [email protected] == -1155.0594 else_jump @BUS_2997 jump @BUS_39866 :BUS_2997if  [email protected] == -1028.1584 else_jump @BUS_3025 jump @BUS_41959 :BUS_3025if  [email protected] == -939.4685 else_jump @BUS_3053 jump @BUS_44052 :BUS_3053if  [email protected] == -1270.5913 else_jump @BUS_2493 jump @BUS_46145 :BUS_3081wait 2000 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used heregosub @BUS_49589 (rotation of doors...you know)if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49928 wait [email protected] (rotation of doors...you know)wait [email protected] 02D4: car [email protected] turn_off_engine 05CD: AS_actor [email protected] exit_car [email protected] gosub @BUS_49495 (rotation of doors...you know):BUS_45780AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_4578 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49655 jump @BUS_5692 :BUS_5692wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 653.6099 -1756.7673 13.5043 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 653.6099 -1756.7673 radius 3.0 3.0 else_jump @BUS_5692 wait 2000 (rotation of doors...you know):BUS_66610AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_6661 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49668 jump @BUS_7694 :BUS_7694wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 824.3757 -1789.6517 13.8969 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 824.3757 -1789.6517 radius 3.0 3.0 else_jump @BUS_7694 wait 2000 (rotation of doors...you know):BUS_86630AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_8663 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49681 jump @BUS_9696 :BUS_9696wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected])02C2: car [email protected] drive_to 984.4473 -1807.4735 14.2472 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 984.4473 -1807.4735 radius 3.0 3.0 else_jump @BUS_9696 wait 2000 (rotation of doors...you know):BUS_106650AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_10665 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49694 jump @BUS_11698:BUS_11698wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected])02C2: car [email protected] drive_to 1127.2611 -1411.5946 13.6295 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 1127.2611 -1411.5946 radius 3.0 3.0 else_jump @BUS_11698 wait 2000 (rotation of doors...you know):BUS_126670AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_12667 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49707 jump @BUS_13700:BUS_13700wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 1481.1509 -1738.0487 13.5643 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 1481.1509 -1738.0487 radius 3.0 3.0 else_jump @BUS_13700 wait 2000 (rotation of doors...you know):BUS_146690AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_14669 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49720 jump @BUS_15702  :BUS_15702wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected])02C2: car [email protected] drive_to 1746.5406 -1825.9158 13.5558 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 1746.5406 -1825.9158 radius 3.0 3.0 else_jump @BUS_15702 wait 2000 (rotation of doors...you know):BUS_166710AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_16671 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49733 jump @BUS_17795 :BUS_17795wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 1956.0354 -2123.2776 13.5473 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 1956.0354 -2123.2776 radius 3.0 3.0 else_jump @BUS_17795 wait 2000 (rotation of doors...you know):BUS_187640AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_18764 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49746 jump @BUS_19888  :BUS_19888wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected])02C2: car [email protected] drive_to 2030.8307 -2172.4258 13.5645 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2030.8307 -2172.4258 radius 3.0 3.0 else_jump @BUS_19888 wait 2000 (rotation of doors...you know):BUS_208570AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_20857 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49759 jump @BUS_21981 :BUS_21981wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 2485.3655 -2176.1711 13.6589 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2485.3655 -2176.1711 radius 3.0 3.0 else_jump @BUS_21981 wait 2000 (rotation of doors...you know):BUS_229500AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_22950 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49772 jump @BUS_23892 :BUS_23892wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 2842.9294 -2067.2126 11.1155 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2842.9294 -2067.2126 radius 3.0 3.0 else_jump @BUS_23892 wait 2000 (rotation of doors...you know):BUS_248610AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_24861 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49785 jump @BUS_25894:BUS_25894wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 2857.4463 -1771.8214 11.0611 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2857.4463 -1771.8214 radius 3.0 3.0 else_jump @BUS_25894 wait 2000 (rotation of doors...you know):BUS_268630AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_26863 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49798 jump @BUS_28351 :BUS_28351wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected])02C2: car [email protected] drive_to 2931.1506 -1469.6289 11.0527 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2931.1506 -1469.6289 radius 3.0 3.0 else_jump @BUS_28351 wait 2000 (rotation of doors...you know)if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49928 wait [email protected] (rotation of doors...you know)wait [email protected] 02D4: car [email protected] turn_off_engine 05CD: AS_actor [email protected] exit_car [email protected] gosub @BUS_49542 (rotation of doors...you know) :BUS_299250AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_29925 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49811 jump @BUS_31494 :BUS_31494wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 2895.9099 -1171.0854 11.0894 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2895.9099 -1171.0854 radius 3.0 3.0 else_jump @BUS_31494 wait 2000 (rotation of doors...you know):BUS_324630AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_32463 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49824 jump @BUS_33587 :BUS_33587wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 2465.9990 -1144.8367 35.9764 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2465.9990 -1144.8367 radius 3.0 3.0 else_jump @BUS_33587 wait 2000 (rotation of doors...you know):BUS_345560AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_34556 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49837 jump @BUS_35680 :BUS_35680wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 2270.7729 -1141.3669 26.9507 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2270.7729 -1141.3669 radius 3.0 3.0 else_jump @BUS_35680 wait 2000 (rotation of doors...you know):BUS_366490AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_36649 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49850 jump @BUS_37773 :BUS_37773wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 2002.1309 -1130.0703 25.4510 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 2002.1309 -1130.0703 radius 3.0 3.0 else_jump @BUS_37773 wait 2000 (rotation of doors...you know):BUS_387420AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_38742 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49863 jump @BUS_39866 :BUS_39866wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 1658.5483 -1155.0594 23.9252 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 1658.5483 -1155.0594 radius 3.0 3.0 else_jump @BUS_39866 wait 2000 (rotation of doors...you know):BUS_408350AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_40835 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49876 jump @BUS_41959 :BUS_41959wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 1462.8992 -1028.1584 23.8387 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 1462.8992 -1028.1584 radius 3.0 3.0 else_jump @BUS_41959 wait 2000 (rotation of doors...you know):BUS_429280AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_42928 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49889 jump @BUS_44052 :BUS_44052wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 1132.3770 -939.4685 42.9039 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 1132.3770 -939.4685 radius 3.0 3.0 else_jump @BUS_44052 wait 2000 (rotation of doors...you know):BUS_450210AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_45021 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49902 jump @BUS_46145 :BUS_46145wait 0 0004: [email protected] = [email protected]  // Note: the incorrect math opcode was used hereCar.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected]) 02C2: car [email protected] drive_to 791.6666 -1270.5913 13.5787 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 791.6666 -1270.5913 radius 3.0 3.0 else_jump @BUS_46145 wait 2000 (rotation of doors...you know):BUS_471140AA0: gosub_if_false @BUS_49239 if  0 >= [email protected] else_jump @BUS_47114 (rotation of doors...you know)wait 2000 gosub @BUS_49346 gosub @BUS_49439 if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49915 jump @BUS_49148 :BUS_49148wait 0 Car.SetMaxSpeed([email protected], 15.0)Car.SetToPsychoDriver([email protected])02C2: car [email protected] drive_to 707.0204 -1389.3361 13.6727 gosub @BUS_49589 if 01AD:   car [email protected] sphere 0 near_point 707.0204 -1389.3361 radius 3.0 3.0 else_jump @BUS_49148 jump @BUS_3081 :BUS_49239gosub @BUS_49589 [email protected] += -30 gosub @BUS_49262 return :BUS_49262wait 1 if and  Actor.InCar($PLAYER_ACTOR, [email protected])8202:   not actor $PLAYER_ACTOR near_car [email protected] radius 10.0 10.0 flag 0 80E1:   not player 0 pressed_key 11 0AA0: gosub_if_false @BUS_49313 return :BUS_4931305CA: AS_actor $PLAYER_ACTOR enter_car [email protected] passenger_seat -1 -1 ms 08A6: set_car [email protected] componentA 3 rotation_to 1.0 [email protected] = 1 return :BUS_49346if   Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49392 if   not [email protected] == 0 0AA0: gosub_if_false @BUS_49421 gosub @BUS_49401 return :[email protected] = 0 return :BUS_49401if  [email protected] == 2 0AA0: gosub_if_false @BUS_49430 return :[email protected] = 2 return :[email protected] = 1 return :BUS_49439wait 0 if   not [email protected] == 1 0AA0: gosub_if_false @BUS_49463 return :BUS_4946303E5: show_text_box 'BUSFARE' Player.Money($PLAYER_CHAR) += [email protected] = 2 wait 1000 return :BUS_4949505D3: AS_actor [email protected] goto_point 653.6099 -1756.7673 13.5043 mode 4 -1 ms // versionA wait [email protected] 05CB: AS_actor [email protected] enter_car [email protected] as_driver 20000 ms wait 20000 return :BUS_4954205D3: AS_actor [email protected] goto_point 707.0204 -1389.3361 13.6727 mode 4 -1 ms // versionA wait [email protected] 05CB: AS_actor [email protected] enter_car [email protected] as_driver 20000 ms wait 20000 return :BUS_49589if and0202:   actor $PLAYER_ACTOR near_car [email protected] radius 250.0 250.0 flag 0   not Car.Wrecked([email protected])else_jump @BUS_49643 if   not Actor.Dead([email protected])else_jump @BUS_49928 return :BUS_49643Car.Destroy([email protected])jump @BUS_37 :BUS_4965503E5: show_text_box 'EXC' return :BUS_4966803E5: show_text_box 'LUX' return :BUS_4968103E5: show_text_box 'CRH' return :BUS_4969403E5: show_text_box 'CAE' return :BUS_4970703E5: show_text_box 'CIR' return :BUS_4972003E5: show_text_box 'BAR' return :BUS_4973303E5: show_text_box 'MER' return :BUS_4974603E5: show_text_box 'FRE' return :BUS_4975903E5: show_text_box 'LAP' return :BUS_4977203E5: show_text_box 'LAD' return :BUS_4978503E5: show_text_box 'DROP' return :BUS_4979803E5: show_text_box 'TER_1' return :BUS_4981103E5: show_text_box 'LVP' return :BUS_4982403E5: show_text_box 'BGS' return :BUS_4983703E5: show_text_box 'MEA' return :BUS_4985003E5: show_text_box 'MIR' return :BUS_4986303E5: show_text_box 'TRE' return :BUS_4987603E5: show_text_box 'BAL' return :BUS_4988903E5: show_text_box 'FLM' return :BUS_4990203E5: show_text_box 'IMP' return :BUS_4991503E5: show_text_box 'TER_2' return :BUS_4992805CD: AS_actor $PLAYER_ACTOR exit_car [email protected] return if   not Actor.InCar($PLAYER_ACTOR, [email protected])0AA0: gosub_if_false @BUS_49928 Car.RemoveReferences([email protected])jump @BUS_37 

 

 

With deleting some parts that doesn't matter...

Share this post


Link to post
Share on other sites
s02282
sorry for interruption... actually i have created a bus route mod long time ago(nearly the same as what you wanna do, but it is in LV instead), i just wanna give you an alternative reference, you can download the file here: The Deuce bus route mod[/url]http://www.gtainside.com/en/download.php?do=download&id=17381   , I hope it helps...

Hey man, I downloaded that mod a week ago, it is great biggrin.gifbiggrin.gif , and yeah, I have changed the coordinates, for Los Santos, I still have a few bugs

, so could you help me with it, it is fully operating, but when I changed a script, at some stations the information of "you could wait the bus at this station..." it repeates over and over again, I thought it's about jump values, but I checked that...

I can board on many stations, and to drive all the way around, without bugs, but at some stations I can't board on....

 

 

And, I didn't release the script, dont worry... smile.gif

 

And I tried to put a script on line, but it is too biiiiiiiiggggg, so it doesn't accept.

I really want to show it to you, but even if I copy the part of it it can' accept it..... suicidal.gif

About the 'error' at some stations with "you could wait the bus at this station..." repeating over and over again, can you tell me which stop/station with that problem(show me the coordination)?

About the aboard problem at some stops/stations, is there any obstacles/ bus stops blocking or too close to the bus's entrance?

By the way, you have my permission, release it as you wanted

I also wanna try your route in SA, let me know the dl link when there is one =]

Share this post


Link to post
Share on other sites
Gta Fishhead
And I tried to put a script on line, but it is too biiiiiiiiggggg, so it doesn't accept.

I really want to show it to you, but even if I copy the part of it it can' accept it..... suicidal.gif

About the 'error' at some stations with "you could wait the bus at this station..." repeating over and over again, can you tell me which stop/station with that problem(show me the coordination)?

About the aboard problem at some stops/stations, is there any obstacles/ bus stops blocking or too close to the bus's entrance?

By the way, you have my permission, release it as you wanted

I also wanna try your route in SA, let me know the dl link when there is one =]

2842.9294 -2067.2126 11.1155

 

2857.4463 -1771.8214 11.0611

 

2931.1506 -1469.6289 11.0527

 

2895.9099 -1171.0854 11.0894

 

Well these are the stops,

I'll add this mod to Gta Garage section CLEO scripts, today or tomorrow...

very soon so you could see it.

Thanks for allowing me to release it...... biggrin.gif

Share this post


Link to post
Share on other sites
Gta Fishhead

This is the download link: http://www.gtagarage.com/mods/show.php?id=9093

 

Take a look and tell me what you think...

 

Well, I think the problem probably is at some bus stops being too far from each other, I need to test this , what do you think about it??? confused.gif

Edited by Gta Fishhead

Share this post


Link to post
Share on other sites
WreckageGTA

Cool mod dude! I love it! smile.gif

 

I wish to make a mod like that. But I can't blush.gif

Share this post


Link to post
Share on other sites
s02282

I have the following comments:

1.

in the mod, every time the bus stops, it rushes onto the pedestrian path, the place you wait the bus can be different to the place the bus stops...

2.

when the bus is created, angle is not set correctly...

3.

i figured the problem of repeating showing notices....the place where bus generated is too far from CJ(the place of the bus stop), you can see there is a limitation you have set (250 meters), once the bus is created further than 250 meters to CJ, it is released/deleted immediately, which loops back to the front of the program...

4.

On some streets, the bus goes along the other side of traffic, that occurs along some paths(especially wide roads more than 2 lanes) when you loops the drive-to command, you may avoid the loop on that part of the route and add more points to guide the route(not always capable to solve the problem)

Share this post


Link to post
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.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.