Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

Coding a plane?


psy145
 Share

Recommended Posts

is it possible to code a at-400 or a jet to circle around the LV runway? (it only has to go slow but not to slow, and just send me the code in message and tell me where to put it, i can code but im only a beginner)

Link to comment
Share on other sites

some pseudocode:

 

 

 

create planecreate actor to fly planeradiusx=100radiusy=200height=50;Set plane height hereposx=100;Set X coordinate of Airport hereposy=100;Set Y coordinate of Airport here:Loopwait 10a+=0.001x=sin(a)*radiusxy=cos(a)*radiusyfinalx = posx + xfinaly = posy + yset plane position finalx,finaly,heightset plane z angle aset plane propeller to workjump Loop

 

 

 

 

There are easier ways of doing this probably: but this just came to my mind

 

//Edit: Or do you mean "drive around on the ground" ?

Link to comment
Share on other sites

some pseudocode:

 

 

 

create planecreate actor to fly planeradiusx=100radiusy=200height=50;Set plane height hereposx=100;Set X coordinate of Airport hereposy=100;Set Y coordinate of Airport here:Loopwait 10a+=0.001x=sin(a)*radiusxy=cos(a)*radiusyfinalx = posx + xfinaly = posy + yset plane position finalx,finaly,heightset plane z angle aset plane propeller to workjump Loop

 

 

 

 

There are easier ways of doing this probably: but this just came to my mind

 

//Edit: Or do you mean "drive around on the ground" ?

yeh i ment for it to be driving on the ground around the LV runway or it starts at the end of the runway and it takes off

Link to comment
Share on other sites

Go to the airport and look for a starting plane

If you fast enough to cheat a hydra you can follow

after a while the planes reference will be removed ([email protected] = time setting) or if player not near plane radius 500.0

the planes uses the carrec-paths of the airplane liners

 

 

 

{$VERSION 3.1.0027}{$CLEO .cs}:PLANEZ0thread 'PLANEZ':PLANEINIT_298wait 000D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @PLANEINIT_29800D6: if  00038:   $ONMISSION ==  0  // integer values004D: jump_if_false @PLANEINIT_298 :[email protected] = 1473.33 // integer values [email protected] = -2600.0 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.082200D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_320jump @PLANEZ1 :PLANEINIT_320    [email protected] = 1577.298 // integer values [email protected] = -2493.749 // integer [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.082200D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_341jump @PLANEZ1 :[email protected] = 1577.298 // integer values [email protected] = -2493.749 // integer [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.082200D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_363jump @PLANEZ1 :PLANEINIT_363              [email protected] = 1479.46 // integer values [email protected] = 1641.41 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 10.358100D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_385jump @PLANEZ1 :[email protected] = 1479.46 // integer values [email protected] = 1641.41 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 10.358100D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_407jump @PLANEZ1 :[email protected] = -1586.67 // integer values [email protected] = -93.33 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.6904 00D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_429jump @PLANEZ1 :[email protected] = -1626.0 // integer values [email protected] = -137.3 // integer [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.690400D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_298:PLANEZ1wait 0 Model.Load(#AT400)Model.Load(#WMYPLT)038B: load_requested_models :PLANEZ1_38wait 0 if and  Model.Available(#AT400)  Model.Available(#WMYPLT) else_jump @PLANEZ1_380395: clear_area 1 at [email protected] [email protected] [email protected] range 40.0 [email protected] = Car.Create(#AT400, [email protected], [email protected], [email protected])Car.Angle([email protected]) = [email protected]: [email protected] = random_int 0 3 06ED: set_car [email protected] paintjob [email protected]: [email protected] = create_actor_pedtype 4 model #WMYPLT in_car [email protected] driverseat01C8: [email protected] = create_actor 4 #WMYPLT in_car [email protected] passenger_seat 0Model.Destroy(#WMYPLT)Model.Destroy(#AT400)07C0: load_path [email protected] :PLANEZ1_139wait 0 if 07C1:   path [email protected] available else_jump @PLANEZ1_139 if   not Car.Wrecked([email protected])else_jump @PLANEZ1_324 05EB: assign_vehicle [email protected] to_path [email protected]@ = 0 // integer values :PLANEZ1_195wait 500 if  not Car.Wrecked([email protected])else_jump @PLANEZ1_324 if  [email protected] > 10000 // integer values else_jump @PLANEZ1_195if 060E:  [email protected] else_jump @PLANEZ1_32408E6: set_plane [email protected] landing_gear  [email protected] =  0:PLANEZZ_305B    wait 000D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @PLANEZ1_324if   not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 500.0 500.0 500.0 flag 0else_jump @PLANEZ1_324if001D:  [email protected] > [email protected] // integer values else_jump @PLANEZZ_305B if 060E:  [email protected] else_jump @PLANEZ1_32408E6: set_plane [email protected] landing_gear  0wait 2000:PLANEZ1_324Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])06C5: release_car [email protected] from_path0873: release_path [email protected]@ =  0:PLANEZ1_325wait 0if [email protected] > 10000else_jump @PLANEZ1_3250395: clear_area 1 at [email protected] [email protected] [email protected] range 40.0jump @PLANEINIT_298

 

Link to comment
Share on other sites

Go to the airport and look for a starting plane

If you fast enough to cheat a hydra you can follow

after a while the planes reference will be removed ([email protected] = time setting) or if player not near plane radius 500.0

the planes uses the carrec-paths of the airplane liners

 

 

 

{$VERSION 3.1.0027}{$CLEO .cs}:PLANEZ0thread 'PLANEZ':PLANEINIT_298wait 000D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @PLANEINIT_29800D6: if  00038:   $ONMISSION ==  0  // integer values004D: jump_if_false @PLANEINIT_298 :[email protected] = 1473.33 // integer values [email protected] = -2600.0 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.082200D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_320jump @PLANEZ1 :PLANEINIT_320    [email protected] = 1577.298 // integer values [email protected] = -2493.749 // integer [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.082200D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_341jump @PLANEZ1 :[email protected] = 1577.298 // integer values [email protected] = -2493.749 // integer [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.082200D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_363jump @PLANEZ1 :PLANEINIT_363              [email protected] = 1479.46 // integer values [email protected] = 1641.41 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 10.358100D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_385jump @PLANEZ1 :[email protected] = 1479.46 // integer values [email protected] = 1641.41 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 10.358100D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_407jump @PLANEZ1 :[email protected] = -1586.67 // integer values [email protected] = -93.33 // integer values            [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.6904 00D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_429jump @PLANEZ1 :[email protected] = -1626.0 // integer values [email protected] = -137.3 // integer [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 13.690400D6: if  000FE:   actor $PLAYER_ACTOR  0 ()near_point [email protected] [email protected] [email protected] radius  150.5  150.5  50.5004D: jump_if_false @PLANEINIT_298:PLANEZ1wait 0 Model.Load(#AT400)Model.Load(#WMYPLT)038B: load_requested_models :PLANEZ1_38wait 0 if and  Model.Available(#AT400)  Model.Available(#WMYPLT) else_jump @PLANEZ1_380395: clear_area 1 at [email protected] [email protected] [email protected] range 40.0 [email protected] = Car.Create(#AT400, [email protected], [email protected], [email protected])Car.Angle([email protected]) = [email protected]: [email protected] = random_int 0 3 06ED: set_car [email protected] paintjob [email protected]: [email protected] = create_actor_pedtype 4 model #WMYPLT in_car [email protected] driverseat01C8: [email protected] = create_actor 4 #WMYPLT in_car [email protected] passenger_seat 0Model.Destroy(#WMYPLT)Model.Destroy(#AT400)07C0: load_path [email protected] :PLANEZ1_139wait 0 if 07C1:   path [email protected] available else_jump @PLANEZ1_139 if   not Car.Wrecked([email protected])else_jump @PLANEZ1_324 05EB: assign_vehicle [email protected] to_path [email protected]@ = 0 // integer values :PLANEZ1_195wait 500 if  not Car.Wrecked([email protected])else_jump @PLANEZ1_324 if  [email protected] > 10000 // integer values else_jump @PLANEZ1_195if 060E:  [email protected] else_jump @PLANEZ1_32408E6: set_plane [email protected] landing_gear  [email protected] =  0:PLANEZZ_305B    wait 000D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @PLANEZ1_324if   not Car.Wrecked([email protected])0205:   actor $PLAYER_ACTOR near_car [email protected] radius 500.0 500.0 500.0 flag 0else_jump @PLANEZ1_324if001D:  [email protected] > [email protected] // integer values else_jump @PLANEZZ_305B if 060E:  [email protected] else_jump @PLANEZ1_32408E6: set_plane [email protected] landing_gear  0wait 2000:PLANEZ1_324Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])06C5: release_car [email protected] from_path0873: release_path [email protected]@ =  0:PLANEZ1_325wait 0if [email protected] > 10000else_jump @PLANEZ1_3250395: clear_area 1 at [email protected] [email protected] [email protected] range 40.0jump @PLANEINIT_298

 

so will this make a plane go around the LV airport? and where do i put the code?

Link to comment
Share on other sites

 

and where do i put the code?

Install sannybuilder and CLEO3

http://sannybuilder.com/

CLEO3 is inside Sannybuilder files or as extra download at

http://cleo.sannybuilder.com/

 

start sannybuilder

open a new empty page

copy and paste the posted script in there

save it with any name

press button "compile and copy"

start game

load savegame

search on any airport runway

 

 

Link to comment
Share on other sites

and where do i put the code?

Install sannybuilder and CLEO3

http://sannybuilder.com/

CLEO3 is inside Sannybuilder files or as extra download at

http://cleo.sannybuilder.com/

 

start sannybuilder

open a new empty page

copy and paste the posted script in there

save it with any name

press button "compile and copy"

start game

load savegame

search on any airport runway

can you make a normal script for it?

Link to comment
Share on other sites

and where do i put the code?

Install sannybuilder and CLEO3

http://sannybuilder.com/

CLEO3 is inside Sannybuilder files or as extra download at

http://cleo.sannybuilder.com/

 

start sannybuilder

open a new empty page

copy and paste the posted script in there

save it with any name

press button "compile and copy"

start game

load savegame

search on any airport runway

can you make a normal script for it?

i did what u said it didnt show up in game

Link to comment
Share on other sites

Its really easy to use it as normal thread for main.scm

delete:

{$VERSION 3.1.0027}

{$CLEO .cs}

 

and add it into your main, then add the

create_thread @PLANEZ0

in the MAIN thread

 

To write it in BW code is to much work

 

 

 

Are you shure that CLEO3 works right in your game ?

Do it with this script. You must get then the message "OK" after game loading

 

{$VERSION 3.1.0027}{$CLEO .cs}:DEMOTESTTEXT03A4: name_thread "DEMO"wait 1000:DEMOTESTTEXT_1wait 0ifPlayer.Defined($PLAYER_CHAR)Jf @DEMOTESTTEXT_1if816B:   NOT   fadingJf @DEMOTESTTEXT_1wait 2000if $ONMISSION == 0Jf @DEMOTESTTEXT_1if  and09E7: $PLAYER_CHAR//not_frozen (if)  Player.Controllable($PLAYER_CHAR)Jf @DEMOTESTTEXT_100BA: text_styled 'FEM_OK'  1000 ms  10A93: end_custom_thread

 

Link to comment
Share on other sites

 

Its really easy to use it as normal thread for main.scm

delete:

{$VERSION 3.1.0027}

{$CLEO .cs}

 

and add it into your main, then add the

create_thread @PLANEZ0

in the MAIN thread

 

To write it in BW code is to much work

 

 

 

Are you shure that CLEO3 works right in your game ?

Do it with this script. You must get then the message "OK" after game loading

 

{$VERSION 3.1.0027}{$CLEO .cs}:DEMOTESTTEXT03A4: name_thread "DEMO"wait 1000:DEMOTESTTEXT_1wait 0ifPlayer.Defined($PLAYER_CHAR)Jf @DEMOTESTTEXT_1if816B:   NOT   fadingJf @DEMOTESTTEXT_1wait 2000if $ONMISSION == 0Jf @DEMOTESTTEXT_1if  and09E7: $PLAYER_CHAR//not_frozen (if)  Player.Controllable($PLAYER_CHAR)Jf @DEMOTESTTEXT_100BA: text_styled 'FEM_OK'  1000 ms  10A93: end_custom_thread

 

yeh i dont want it for cleo only a normal main.scm and cleo just keeps crashing my game

Edited by psy145
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

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