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

Sign in to follow this  
vlads

Turret on car

Recommended Posts

vlads

Hello everyone! I'm making a mod that puts your gang member to the top of patriot as a gunner which can be done with this opcode 0464: put_actor [email protected] into_turret_on_car [email protected] at_car_offset 0.0 0.0 1.3 position 0 shooting_angle_limit 360.0 with_weapon 0. But i want my gang member to his already equiped gun instead of assigning a new one that which this opcode req.

 

Does anyone can help me with any ideas about this? thanks in advance...

Share this post


Link to post
Share on other sites
ZAZ

give the actor first a weapon as usual(in  case if he don't have any), then put him on turret and insert the weapon number also in opcode 0464, at the end, last parameter

 

if the actor already have a weapon, not given from your script, it needs to get the weapon number first, to can submit for opcode 0464

 

and next time post your script

Share this post


Link to post
Share on other sites
vlads

Oh thanks for the respond, sorry i forgot to put my script my bad. Anyway here's my script:

 

{$CLEO .cs}

0000:   "Gunner"


:NONAME_2
wait 0
if
   Player.Defined($PLAYER_CHAR)
jf @NONAME_2
Model.Load(#M4)
038B: load_requested_models

:WEAP
wait 0
if
   Model.Available(#M4)
jf @WEAP

if
00DD:   actor $PLAYER_ACTOR driving_car_with_model #PATRIOT
jf @NONAME_2
[email protected] = Actor.CurrentCar($PLAYER_ACTOR)
092B: [email protected] = group $PLAYER_GROUP member 3
// for now it only works to gang member 3 so its easier for me to test the script before enhancing it
if
056D:   actor [email protected] defined
jf @NONAME_2
if
056E:   car [email protected] defined
jf @NONAME_2
0464: put_actor [email protected] into_turret_on_car [email protected] at_car_offset 0.0 0.0 1.3 position 0 shooting_angle_limit 360.0 with_weapon 31
0638: AS_actor [email protected] stay_put 1
099F: AS_actor [email protected] ignore_weapon_range 1
07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to  

jump @NONAME_2                  

 

As you can see the weapon is assigned and the actor with its own gun will be equipped with m4 replacing its own gun once the actor is in the turret.

 

So how's my script? How am i going to get the any actors weapon number first?

 

Share this post


Link to post
Share on other sites
ZAZ
0470: 7@ = actor 1@ current_weapon
0464: put_actor 1@ into_turret_on_car 5@ at_car_offset 0.0 0.0 1.3 position 0 shooting_angle_limit 360.0 with_weapon 7@

 

Share this post


Link to post
Share on other sites
vlads

It works! thanks men here's the script

 

Quote

{$CLEO .cs}

0000:   "Gunner"

:NONAME_2
wait 0
if
   Player.Defined($PLAYER_CHAR)
jf @NONAME_2


if
00DD:   actor $PLAYER_ACTOR driving_car_with_model #PATRIOT
jf @NONAME_2
[email protected] = Actor.CurrentCar($PLAYER_ACTOR)
0470: [email protected] = actor [email protected] current_weapon
092B: [email protected] = group $PLAYER_GROUP member 3
if
056D:   actor [email protected] defined
jf @NONAME_2
if
056E:   car [email protected] defined
jf @NONAME_2
0464: put_actor [email protected] into_turret_on_car [email protected] at_car_offset 0.0 0.0 1.3 position 0 shooting_angle_limit 360.0 with_weapon [email protected]  
0638: AS_actor [email protected] stay_put 1
099F: AS_actor [email protected] ignore_weapon_range 1
07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to  

jump @NONAME_2                             

 

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.

Sign in to follow this  

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