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. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    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

SigiloHQ

(Dogfight mod) Run this array mod and tell me what is wrong

Recommended Posts

SigiloHQ

When I do something with arrays my mods have errors, I dont know why, ok, I never did change my style of array scripting but ¿Is wrong my mode?

My code have normal opcodes only, then you will not have any problem while compiling.

This mod should spawn some hostile hydras around player for a dogfight round.

here:

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread 'SGLHQ_CA'
0002: jump @SGLHQ_CA_114 

:SGLHQ_CA_68
00BC: show_text_highpriority GXT 'NOHAY' time 5000 flag 1 // You aren't in a plane
0002: jump @SGLHQ_CA_114 

:SGLHQ_CA_91
0217: show_text_styled GXT 'M_FAIL' time 5000 style 1 // versionB  // ~r~MISSION FAILED!

:SGLHQ_CA_107
0002: jump @SGLHQ_CA_114 

:SGLHQ_CA_114
0001: wait 0 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @SGLHQ_CA_68 
00D6: if and
0AB0:   key_pressed 89 
86B9:   not cutscene_data_loaded 
84A7:   not actor $PLAYER_ACTOR driving_boat 
847A:   not actor $PLAYER_ACTOR driving_bike 
84A9:   not actor $PLAYER_ACTOR driving_heli 
04C8:   actor $PLAYER_ACTOR driving_flying_vehicle 
004D: jump_if_false @SGLHQ_CA_68 
0247: load_model #ARMY 
0247: load_model #HYDRA 
038B: load_requested_models 

:SGLHQ_CA_183
0001: wait 0 ms 
00D6: if and
0248:   model #HYDRA available 
0248:   model #ARMY available 
004D: jump_if_false @SGLHQ_CA_183 
03C0: [email protected] = actor $PLAYER_ACTOR car 
0004: $4 = 0 
0004: $5($4,10i) = 0 
0004: $23 = 0 
0004: $28($23,10i) = 0 
0004: $38 = 0 
0004: $41($38,10i) = 0 
0004: $MUERTOS = 0 
0004: $PILOTOS($MUERTOS,10i) = 0 
0004: $53 = 0 
0002: jump @SGLHQ_CA_323 

:SGLHQ_CA_302
0008: $4 += 1 
0008: $38 += 1 
0008: $23 += 1 

:SGLHQ_CA_323
0001: wait 0 ms 
00D6: if 
8028:   not  $4 >= 10 
004D: jump_if_false @SGLHQ_CA_578 
0208: [email protected] = random_float_in_ranges -300.0 300.0 
0208: [email protected] = random_float_in_ranges -300.0 300.0 
0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset [email protected] [email protected] 800.0 
0172: [email protected] = actor $PLAYER_ACTOR Z_angle 
00A5: $5($4,10i) = create_car #HYDRA at [email protected] [email protected] [email protected] 
0129: $41($38,10i) = create_actor_pedtype 23 model #ARMY in_car $5($4,10i) driverseat 
0186: $28($23,10i) = create_marker_above_car $5($4,10i) 
0175: set_car $5($4,10i) Z_angle_to [email protected] 
03A2: set_car $5($4,10i) action 3 
04BA: set_car $5($4,10i) speed_to 500.0 
0742: set_plane $5($4,10i) unknown_trajectory 1.5 
0745: set_hydra $5($4,10i) thrust_to_horizontal 
07F8: car $5($4,10i) follow_car [email protected] radius 20.0 
08A2: set_hydra $5($4,10i) attack_with_rockets_car_of_player $PLAYER_CHAR radius 30.0 
018B: set_marker $28($23,10i) radar_mode 2 
0002: jump @SGLHQ_CA_302 

:SGLHQ_CA_578
0249: release_model #ARMY 
0249: release_model #HYDRA 

:SGLHQ_CA_588
0050: gosub @SGLHQ_CA_602 
0002: jump @SGLHQ_CA_653 

:SGLHQ_CA_602
0004: $4 = 0 
0004: $38 = 0 
0004: $23 = 0 
0004: $MUERTOS = 0 
0051: return 

:SGLHQ_CA_632
0008: $4 += 1 
0008: $38 += 1 
0008: $23 += 1 

:SGLHQ_CA_653
0001: wait 0 ms 
00D6: if 
8028:   not  $53 >= 10 
004D: jump_if_false @SGLHQ_CA_833 
00D6: if and
8119:   not car [email protected] wrecked 
00DB:   actor $PLAYER_ACTOR in_car [email protected] 
8117:   not player $PLAYER_CHAR wasted 
004D: jump_if_false @SGLHQ_CA_870 
00D6: if 
8028:   not  $4 >= 10 
004D: jump_if_false @SGLHQ_CA_588 
00D6: if and
0038:   $PILOTOS($MUERTOS,10i) == 1 
8185:   not car $5($4,10i) health >= 290 
004D: jump_if_false @SGLHQ_CA_632 
068B: set_car $5($4,10i) all_disembark 
01C2: remove_references_to_actor $41($38,10i) // Like turning an actor into a random pedestrian 
01C3: remove_references_to_car $5($4,10i) 
0164: disable_marker $28($23,10i) 
00BC: show_text_highpriority GXT 'FANTA' time 3000 flag 1 
0004: $PILOTOS($MUERTOS,10i) = 1 
0008: $53 += 1 
0002: jump @SGLHQ_CA_632 

:SGLHQ_CA_833
0394: play_music 2 
0109: player $PLAYER_CHAR money = 500000 
0217: show_text_styled GXT 'M_PASS' time 5000 style 1 // versionB  // MISSION PASSED!~n~~w~$~1~
0002: jump @SGLHQ_CA_107 

:SGLHQ_CA_870
0050: gosub @SGLHQ_CA_602 
01C3: remove_references_to_car [email protected] 
0002: jump @SGLHQ_CA_910 

:SGLHQ_CA_889
0008: $4 += 1 
0008: $38 += 1 
0008: $23 += 1 

:SGLHQ_CA_910
0001: wait 0 ms 
00D6: if 
8028:   not  $4 >= 10 
004D: jump_if_false @SGLHQ_CA_91 
00D6: if or
056E:   car $5($4,10i) defined 
056D:   actor $41($38,10i) defined 
004D: jump_if_false @SGLHQ_CA_889 
009B: destroy_actor $41($38,10i) 
0164: disable_marker $28($23,10i) 
00A6: destroy_car $5($4,10i) 
0002: jump @SGLHQ_CA_889

 

Edited by SigiloHQ
Ortography, code fix.

Share this post


Link to post
Share on other sites
Sanmodder

1 global variables are used in main.scm
  2 help
change these variables to these

const
   _234 = 7 @
   _4 = 8 @
   _5 = 9 @
   _23 = 10 @
   _28 = 11 @
   _38 = 12 @
   _41 = 13 @
   _6123 = 14 @
   _6124 = 15 @
   _53 = 16 @
end

3
and you did something like that

var
<array name>: array <size> of <type>
end

var
$ FloatArray: array 10 of Float
end

Share this post


Link to post
Share on other sites
SigiloHQ
On 7/25/2018 at 4:10 PM, Sanmodder said:

1 global variables are used in main.scm
  2 help
change these variables to these

const
   _234 = 7 @
   _4 = 8 @
   _5 = 9 @
   _23 = 10 @
   _28 = 11 @
   _38 = 12 @
   _41 = 13 @
   _6123 = 14 @
   _6124 = 15 @
   _53 = 16 @
end

3
and you did something like that

var
<array name>: array <size> of <type>
end

var
$ FloatArray: array 10 of Float
end

Ok, but if I try replacing global vars for local vars it crashes, I dont know why, ¿Am I using so much vars for local limits?

Share this post


Link to post
Share on other sites
ZAZ

Show the new script 

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.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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