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

how to assine a ped to shoot a group of enemies


noorhamdoon
 Share

Recommended Posts

 

{$CLEO}0000:repeat   wait 0until 0256:   player $PLAYER_CHAR defined  04BB: select_interior 00860: link_actor $PLAYER_ACTOR to_interior 000A1: put_actor $PLAYER_ACTOR at 2492.7896 -1680.8168 14.33770247: request_model #ARMY0247: request_model #M4038B: load_requested_models 009A: [email protected] = create_actor 4 #ARMY at 2492.7896 -1678.8168 13.3377 01B2: give_actor [email protected] weapon 31 ammo 9999 // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to 100 009A: [email protected] = create_actor 4 #ARMY at 2491.769 -1670.3779 13.3359 009A: [email protected] = create_actor 4 #ARMY at 2496.6809 -1669.9619 13.3359009A: [email protected] = create_actor 4 #ARMY at 2485.6003 -1670.7181 13.3359wait 10000575: set_actor [email protected] pinned_position 10575: set_actor [email protected] pinned_position 10575: set_actor [email protected] pinned_position 105E2: AS_actor [email protected] kill_actor [email protected]   wait 0until 0118:   actor [email protected] dead 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 05E2: AS_actor [email protected] kill_actor [email protected] repeat   wait 0until 0118:   actor [email protected] dead 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 05E2: AS_actor [email protected] kill_actor [email protected] repeat   wait 0until  0118:   actor [email protected] dead 0249: release_model #ARMY0249: release_model #M401C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 0A93: end_custom_thread

 

 

 

 

 

 

Edited by JACK JONES
Link to comment
Share on other sites

Michael-Knight1

 

please can any body tell me how to assine a ped to kill a groop of enemies not only one enemy ?

i use as_actor [email protected] kill actor [email protected]

but this make him kill [email protected] and stop shotting .

how to make [email protected] kill [email protected],[email protected],[email protected] ..etc ?

Create decision maker

 

060A: create_decision_maker_type 0 store_to [email protected] // decision\allowed\m_.ped files

 

then create the group

 

07AF: $PLAYER_GROUP = player $PLAYER_CHAR group

 

and make player as leader and put other actor in group

 

0630: put_actor $PLAYER_ACTOR in_group $PLAYER_GROUP as_leader 06EE:   actor $UNKNOWN in_group $PLAYER_GROUP 

 

now he will fight with you like groove street members .

Link to comment
Share on other sites

please can any body tell me how to assine a ped to kill a groop of enemies not only one enemy ?

i use as_actor [email protected] kill actor [email protected]

but this make him kill [email protected] and stop shotting .

how to make [email protected] kill [email protected],[email protected],[email protected] ..etc ?

Read this

http://gtag.gtagaming.com/forums/index.php?showtopic=277

Would be helpful

 

@MK

Hm, 06EE is a conditional opcode

Link to comment
Share on other sites

I made a little script to demonstrate this in a mission-like scenario:

 

CONSTON = 1OFF = 0JUMP_CUT = 2PEDTYPE_MISSION1 = 24PEDTYPE_MISSION2 = 25PED_HATE = 4EVENT_ACQUAINTANCE_PED_HATE = 36TASK_COMPLEX_KILL_PED_ON_FOOT = 1000WEAPONTYPE_PISTOL = 22AMMO_MAX = 99999player = $PLAYER_CHARscplayer = $PLAYER_ACTOREND{$CLEO .s}{$VERSION 3.0.1000}     // WARNING: params in natural order (SCR+OPCODES)!016A: do_fade 0 time 001B4: set_player_control player to OFF// Makes all MISSION1 chars hate MISSION2 chars0746: set_relationship PED_HATE of_ped_type PEDTYPE_MISSION1 to_ped_type PEDTYPE_MISSION2// Create a decision maker, it's used to set characters responses to certain events060A: load_char_decision_maker 0 store_to [email protected]// Clears any current responses in the event of seeing a hated character0708: clear_char_decision_maker_event_response [email protected] event EVENT_ACQUAINTANCE_PED_HATE// Sets the decision to kill any hated peds it sees on foot0709: add_char_decision_maker_event_response [email protected] event EVENT_ACQUAINTANCE_PED_HATE task TASK_COMPLEX_KILL_PED_ON_FOOT respect 0.0 hate 100.0 like 0.0 dislike 0.0 in_car 0 on_foot 1// Now we can create as many peds as we want and assign them as either PEDTYPE_MISSION1 (attackers) or PEDTYPE_MISSION2 (victims)// You can use 0746 again to make MISSION2 peds hate MISSION1 peds and use the same decision maker, etc.// Setup the initial scene015F: set_fixed_camera_position 2512.7 -1667.32 16.9132 rotation 0.0 0.0 0.00160: point_camera_at_point 2511.78 -1667.71 16.5952 switchstyle JUMP_CUT0247: request_model #WMYCR0247: request_model #COLT45038B: load_all_models_now009A: create_char PEDTYPE_MISSION1 model #WMYCR at 2508.5276 -1671.77 12.3806 store_to [email protected]: create_char PEDTYPE_MISSION2 model #MALE01 at 2471.2864 -1681.6908 12.4396 store_to [email protected]    // (MALE01 needs no loading)0173: set_char_heading [email protected] to 90.0// This is a 9mm pistol... you know what to do with it01B2: give_weapon_to_char [email protected] weapon WEAPONTYPE_PISTOL ammo AMMO_MAX01B9: set_current_char_weapon [email protected] to WEAPONTYPE_PISTOL060B: set_char_decision_maker [email protected] to [email protected]      // WMYCR will kill any ped he hates when they're in range (0648 SHOULD affect this)0850: task_follow_footsteps [email protected] char [email protected]      // MALE01 will attempt to walk up to WMYCR016A: do_fade 1 time 500WHILE 016B:   is_screen_fading   0001: wait [email protected] = 0      // we'll use this as a 'stage' counterWHILE TRUE   0001: wait 0      // Once the victim dies, break the loop   IF 0118:   is_char_dead [email protected]   THEN BREAK   END      // Hang on, what if the attacker suddenly has a heart atack and dies? Always prepare for the worst...   IF 0118:   is_char_dead [email protected]   THEN BREAK   END      // Are we still in the first stage?   IF [email protected] == 0   THEN       // If the victim and attacker aint dead, we can test if the victim was attacked yet...       IF 051A:   has_char_been_damaged_by_char [email protected] char [email protected]       THEN           // the attacker shot him, he should probably stop trying to approach him now...           0687: clear_char_tasks [email protected]                      // advance stage forwards...           [email protected] += 1       END   ENDEND// Print a message declaring the victims death. Of course, in case the victim didn't die, don't print this...IF 0118:   is_char_dead [email protected]   00BA: print_big 'DEAD' time 4000 style 3ENDWAIT 40000A0E: clear_this_print_big_now 3// Clean up...01C2: mark_char_as_no_longer_needed [email protected]: mark_char_as_no_longer_needed [email protected]: mark_model_as_no_longer_needed #WMYCR0249: mark_model_as_no_longer_needed #COLT4502EB: restore_camera_jumpcut01B4: set_player_control player to ON03AF: switch_streaming ON0A93: terminate_this_custom_script      // use 004E if this is not a CLEO SCRIPT

 

Link to comment
Share on other sites

Michael-Knight1

Take this small script , i hope that help you if don't understand anything confused.gif

 

{$CLEO}const_char = $PLAYER_CHAR_Cped =$PLAYER_ACTOR _Group = $PLAYER_GROUP_Decis = $DECISION_MARKER_keyp1 = 0x5D   // Key Z_repeat = $DECISION_COPY _loadM = #VBMYBOXend // const0247: load_model _loadM 038B: load_requested_models while True    repeat    0001: wait 0 ms     until 0256:   player _char defined    if    0AB0:  key_pressed 0x5D // Key Z    then    060A: create_decision_maker_type 0 store_to _Decis // decision\allowed\m_.ped files    07E5: copy_decision_maker _Decis to _repeat           if      80DF:   not actor _Cped driving     then      04C4: store_coords_to [email protected] [email protected] [email protected] from_actor _Cped with_offset 2.0 2.0 0.0       009A: [email protected] = create_actor_pedtype 4 model _loadM at [email protected] [email protected] [email protected]      060B: set_actor [email protected] decision_maker_to _repeat       07AF: _Group = player _char group       0630: put_actor _Cped in_group _Group as_leader       0631: put_actor [email protected] in_group _Group     end // if         end // ifend // while

 

Link to comment
Share on other sites

Ahmed, I already gave a clear and correct answer. Your answer is neither, and you already answered, why are you answering again?

Link to comment
Share on other sites

 

Also you make a const of a const (_loadM = #VBMYBOX).

Ah, but that should be cool, I normally do consts for values that I want to modify easily (example: the value of a delay for something)

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.