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

actor's health


sci4me
 Share

Recommended Posts

spaceeinstein

Please be more descriptive about what you want. Assuming it's coding-related, please do a search next time.

 

0223: set_actor $actor health_to 500

Link to comment
Share on other sites

THANKS... If an actor has a weapon, where do i put the code? ex.:

 


 

$BUD1 = Actor.Create(Gang2, #BMYBOUN, 891.9232, 2117.818, 10.8203)

Actor.Angle($BUD1) = 90.3137

01B2: give_actor $BUD1 weapon 31 ammo 900 // Load the weapon model before using this

Actor.HasWeapon($BUD1, 31)

0223: set_actor $actor health_to 2000

 

this is part of a big script with many actors.

Link to comment
Share on other sites

To give the actor or the player a weapon requires also to load first the model file

But to give it then really into his hands needs to insert a special weapon number which is not documented in any game file.

To find the right weapon number look in Sannybuilder HELP: SCM Documentation >> GTA SA >> Weapon numbers

 

Weapon given to actors are not created in same sense like the other models,

so it dont it to release them from script like other items

 

:Actor_103A4: name_thread 'Actor':Actor_20001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @Actor_2if00FF:   actor $PLAYER_ACTOR  1 (in-sphere)near_point_on_foot 2491.5  -1667.5  13.35 radius  1.0  1.0  1.0004D: jump_if_false @Actor_20247: request_model 1200247: request_model #AK47:Load_models_check0001: wait  0 ms00D6: if  and0248:   model 120 available0248:   model #AK47 available004D: jump_if_false @Load_models_check009A: [email protected] = create_actor  24 120 at  2486.5  -1664.5  13.450173: set_actor [email protected] z_angle_to  180.001B2: give_actor [email protected] weapon  30 ammo  99999  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  1000223: set_actor [email protected] health_to  100005E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model 120:Loop_10001: wait  0 msif8118:   NOT   actor [email protected] dead004D: jump_if_false @Cleanup_1if0104:   actor $PLAYER_ACTOR near_actor [email protected] radius  80.0  80.0  10.0 sphere  0004D: jump_if_false @Cleanup_10002: jump @Loop_1:Cleanup_101C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @Actor_2

 

Link to comment
Share on other sites

Peppo_o'Paccio

And if you want the actor immune to the headshots you must insert

 

0446: set_actor [email protected] immune_to_headshots 0

 

because if the actor has got maximum health, an headshot can kill him.

If you write immune_to_headshots 0 the actor is immune to headshots, if you write immune_to_headshots 1 he isn't immune.

Link to comment
Share on other sites

If you write immune_to_headshots 0 the actor is immune to headshots, if you write immune_to_headshots 1 he isn't immune.

 

the other way around....

 

0=false

1=true

 

 

0446: set_actor [email protected] immune_to_headshots 0

> false > one shot and...... it's over

 

0446: set_actor [email protected] immune_to_headshots 1

> true > bam....it's a highlander

Link to comment
Share on other sites

Actually he's right. For me 0 has always been immune. That's how it was when coding X-Files II
Link to comment
Share on other sites

Well after playing around with a quickly written scipt I gotta say... WTF!?!?!!?

 

my actor is immune to headshots when I use 0446 always.... doesn't matter hether I set the parameter to 0 or 1 notify.gif

 

Never noticed this because I never considered writing a code including an opcode which is 'useless' (why shoul I write a script to disable the immunity of a actor if its already standart???)

 

Does anybody else has that issue? or is it just CLEO 4?

 

gotta try it with 3 again

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.