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

    3. Suggestions

i need your help.


LazytownSpo666
 Share

Recommended Posts

LazytownSpo666

Here is my question:

 

How am i going to code for the helicopter (like Raindance) to spawn at 4 and higher stars?

 

Reason: i need that code for my very first CLEO mod "*Helicopter Name* Spawns at 4 and Higher Stars".

What app he is using: Sanny Builder

Link to comment
Share on other sites

3 hours ago, LazytownSpo666 said:

Here is my question:

 

How am i going to code for the helicopter (like Raindance) to spawn at 4 and higher stars?

 

Reason: i need that code for my very first CLEO mod "*Helicopter Name* Spawns at 4 and Higher Stars".

What app he is using: Sanny Builder

You're gonna need opcodes:

096A: enable_flying_helis 0 //  to disable non script helicopters
0727: set_heli [email protected] behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0

The rest is pretty much in scm tutorials.

Link to comment
Share on other sites

LazytownSpo666
9 hours ago, Jack said:

You're gonna need opcodes:

096A: enable_flying_helis 0 //  to disable non script helicopters
0727: set_heli [email protected] behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0

The rest is pretty much in scm tutorials.

of course, but how am i going to get the full script code?

Link to comment
Share on other sites

5 hours ago, LazytownSpo666 said:

of course, but how am i going to get the full script code?

I build the code but it would be better if I post it later so you can understand how it works.
Lets start with the code concept:
- check if a helicopter and a pilot model IDs are loaded,
- choose which variables will contain their handle (for example [email protected] and [email protected]),
- check if a wanted stars are above 3,
- to avoid constant spawn of the helicopter check if a variable already contains its handle,
- if a variable is empty create the helicopter (pilot and copilots are optional),
- after the helicopter is spawned start checking the game events:
    - is helicopter severely damaged (if it is let the code to forget about it and repeat the operation)?
    - is helicopter pilot wounded (in that case heli would start crashing down and then step from the above)?
    - are wanted stars still above 3 (if not heli will fly away and disappear)?


Opcodes I used:

096A: enable_flying_helis 0

0247: load_model HELI_MODEL
0247: load_model PILOT_MODEL
038B: load_requested_models

0248:   model PILOT_MODEL available
0248:   model HELI_MODEL available

04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 100.0
00A5: HELI = create_car HELI_MODEL at posX posY posZ
0129: PILOT = create_actor_pedtype PEDTYPE_CIVMALE model PILOT_MODEL in_car HELI driverseat 
0825: set_helicopter HELI instant_rotor_start 
0727: set_heli HELI behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0

0564: heli HELI simulate_crash_landing

04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 100.0 100.0 100.0
04A2: set_heli HELI fly_to posX posY posZ altitude_between 0.0 and 200.0

01C2: remove_references_to_actor PILOT
01C3: remove_references_to_car HELI

009B: destroy_actor PILOT
00A6: destroy_car HELI

That's my concept. Of course you can always create your own. 

And here's the tutorial.

Edited by Jack
Link to comment
Share on other sites

LazytownSpo666
On 1/13/2022 at 2:59 PM, Jack said:

I build the code but it would be better if I post it later so you can understand how it works.
Lets start with the code concept:
- check if a helicopter and a pilot model IDs are loaded,
- choose which variables will contain their handle (for example [email protected] and [email protected]),
- check if a wanted stars are above 3,
- to avoid constant spawn of the helicopter check if a variable already contains its handle,
- if a variable is empty create the helicopter (pilot and copilots are optional),
- after the helicopter is spawned start checking the game events:
    - is helicopter severely damaged (if it is let the code to forget about it and repeat the operation)?
    - is helicopter pilot wounded (in that case heli would start crashing down and then step from the above)?
    - are wanted stars still above 3 (if not heli will fly away and disappear)?


Opcodes I used:

096A: enable_flying_helis 0

0247: load_model HELI_MODEL
0247: load_model PILOT_MODEL
038B: load_requested_models

0248:   model PILOT_MODEL available
0248:   model HELI_MODEL available

04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 100.0
00A5: HELI = create_car HELI_MODEL at posX posY posZ
0129: PILOT = create_actor_pedtype PEDTYPE_CIVMALE model PILOT_MODEL in_car HELI driverseat 
0825: set_helicopter HELI instant_rotor_start 
0727: set_heli HELI behavior_to_police_heli_and_follow_actor $PLAYER_ACTOR follow_car -1 radius 20.0

0564: heli HELI simulate_crash_landing

04C4: store_coords_to posX posY posZ from_actor $PLAYER_ACTOR with_offset 100.0 100.0 100.0
04A2: set_heli HELI fly_to posX posY posZ altitude_between 0.0 and 200.0

01C2: remove_references_to_actor PILOT
01C3: remove_references_to_car HELI

009B: destroy_actor PILOT
00A6: destroy_car HELI

That's my concept. Of course you can always create your own. 

And here's the tutorial.

of course. i'll try to code that. and this issue will be closed after i'm releasing this mod.

 

EDIT: nvm

Edited by LazytownSpo666
Link to comment
Share on other sites

LazytownSpo666

you know what, screw it, let him create that script instead.

 

vehicle model: RAINDANC

pilot, copilot, and guard model: ARMY

extra features: shooting a player every 0.25 seconds and guard rappeling from heli.

guard weapons: M4, Colt 45, and MP5.

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.