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

Actor Not Performing animation


Omega_Is_Here
 Share

Recommended Posts

Omega_Is_Here

Hello !

 

I'm still a beginner noob at cleo...

 

I'm working on a mod to be able to buy drugs from dealers but i'm facing 2 problems...

 

The first one is that the dealer doesn't do his animation (DEALER_DEAL) After cj pays

 

Actor [email protected] is not performing the DEALER_DEAL animation

 

The second one gets complicated

 

So normally when cj replies with a positive response to the dealer, he tells the dealer to go away

 

How do i replace that with my mod?

 

What i mean is if i press y i don't want what happens normally i want my mod to take place...

 

Any help would be appreciated !

 

Please provide detailed and clear answers!

 

:SMOKE_1

0001: wait 0 ms
00D6: if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @SMOKE_1
0001: wait 0 ms
00D6: if
80DF: not actor $PLAYER_ACTOR driving
004D: jump_if_false @SMOKE_1
0001: wait 0 ms
00D6: if
03EE: player $PLAYER_CHAR controllable
004D: jump_if_false @SMOKE_1
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected]
0001: wait 0 ms
00D6: if
8039: not [email protected] == -1
004D: jump_if_false @SMOKE_1
0001: wait 0 ms
00D6: if or
02F2: actor [email protected] model == #BMYDRUG
02F2: actor [email protected] model == #WMYDRUG
02F2: actor [email protected] model == #HMYDRUG
02F2: actor [email protected] model == #BIKDRUG
004D: jump_if_false @SMOKE_1
0001: wait 0 ms
00D6: if
00F2: actor [email protected] near_actor $PLAYER_ACTOR radius 1.5 1.5 sphere 0
004D: jump_if_false @SMOKE_1
0001: wait 0 ms
00D6: if
0AB0: key_pressed 69
004D: jump_if_false @SMOKE_1
0002: jump @SMOKE_2
:SMOKE_2
04ED: load_animation "GANGS"
04ED: load_animation "DEALER"
04ED: load_animation "SMOKING"
0247: load_model 1212
038B: load_requested_models
029B: [email protected] = init_object 1212 at 0.0 0.0 0.0
0382: set_object [email protected] collision_detection 0
0001: wait 0 ms
00D6: if
04EE: animation "GANGS" loaded
004D: jump_if_false @SMOKE_2
0001: wait 0 ms
00D6: if
04EE: animation "DEALER" loaded
004D: jump_if_false @SMOKE_2
05C1: AS_actor $PLAYER_ACTOR speak_from_audio_table 194
0812: AS_actor $PLAYER_ACTOR perform_animation "SHOP_PAY" IFP "DEALER" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 4500
0001: wait 500 ms
070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.03 0.030 0.02 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 0
0001: wait 4000 ms
0108: destroy_object [email protected]
0249: release_model 1212
0647: AS_actor [email protected] clear_look_task
0109: player $PLAYER_CHAR money = -20
05C1: AS_actor [email protected] speak_from_audio_table 84
0812: AS_actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 3200
0812: AS_actor $PLAYER_ACTOR perform_animation "DRUGS_BUY" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 3200
0001: wait 3200 ms
0687: clear_actor [email protected] task

That's it for now

Edited by BiPolarBear
Link to comment
Share on other sites

I had the same problem for the animation try this opcode instead maybe.

0605: actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 1.0 loop 1 lockX 0 lockY 0 lockF 0 time -1 
Edited by EAZYJ
Link to comment
Share on other sites

Omega_Is_Here

 

I had the same problem for the animation try this opcode instead maybe.

0605: actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 1.0 loop 1 lockX 0 lockY 0 lockF 0 time -1 

Thanks for the reply

Sadly did not work

Link to comment
Share on other sites

Omega_Is_Here

You should delete the

 

if

not [email protected] == -1

_____________________

 

it does not belong there.

Beleive it or not the game crashes if i delete it

It's not the problem :-/

Link to comment
Share on other sites

Create a marker above actor to indicate and make shure that the script found and keeps the dealer ped

later, you can remover it, if script works fine

{$CLEO .cs}thread 'DEALER':SMOKE_10001: wait 0 ms if 0256:   player $PLAYER_CHAR defined jf @SMOKE_1 if  and0AB0:   key_pressed 69// E key80DF:   not actor $PLAYER_ACTOR driving jf @SMOKE_1  04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 2.0 0.0if   0AE1:   [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 8.0 find_next 0 pass_deads 1 // CLEO 4 opcodejf @SMOKE_1if    8118:   not actor [email protected] dead jf @cleanup  //if or//02F2:   actor [email protected] model == #BMYDRUG //02F2:   actor [email protected] model == #WMYDRUG //02F2:   actor [email protected] model == #HMYDRUG //02F2:   actor [email protected] model == #BIKDRUG //jf @cleanupif00F2:   actor [email protected] near_actor $PLAYER_ACTOR radius 1.5 1.5 sphere 0jf @cleanup0187: [email protected] = create_marker_above_actor [email protected]:SMOKE_20001: wait 0 ms if 0256:   player $PLAYER_CHAR defined jf @cleanupif8118:  NOT  actor [email protected] deadjf @cleanupif80F2:  not actor [email protected] near_actor $PLAYER_ACTOR radius 10.5 10.5 sphere 0jf @SMOKE_2 :cleanup0164: disable_marker [email protected]: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian wait 100jump @SMOKE_1

Btw. deltaCJ was wrong, but i used a different code for the script above and also i used opcode 0AE1: directly as condition

Edited by ZAZ
  • Like 1
Link to comment
Share on other sites

Omega_Is_Here

Create a marker above actor to indicate and make shure that the script found and keeps the dealer ped

later, you can remover it, if script works fine

Even after placing a marker above the dealer, nothing happens...

I think i know why.

In main.scm external script //-------------External script 19 (DEALER)--------------- is preventing dealer form doing dealer_deal animation

It's beyond my coding skills and i don't know what to do at such situation

Anyways, here's the script if you like to try it out ingame yourself (WITH MARKER)

{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'SMOKE' :SMOKE_10001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @SMOKE_1 0001: wait 0 ms 00D6: if 80DF:   not actor $PLAYER_ACTOR driving 004D: jump_if_false @SMOKE_1 0001: wait 0 ms  00D6: if 03EE:   player $PLAYER_CHAR controllable 004D: jump_if_false @SMOKE_1 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected] 0001: wait 0 ms 00D6: if 8039:   not  [email protected] == -1 004D: jump_if_false @SMOKE_1 00D6: if or02F2:   actor [email protected] model == #BMYDRUG 02F2:   actor [email protected] model == #WMYDRUG 02F2:   actor [email protected] model == #HMYDRUG 02F2:   actor [email protected] model == #BIKDRUG 004D: jump_if_false @SMOKE_10001: wait 0 ms00D6: if00F2:   actor [email protected] near_actor $PLAYER_ACTOR radius 1.5 1.5 sphere 0004D: jump_if_false @SMOKE_10001: wait 0 ms 00D6: if 0AB0:   key_pressed 69 // E 004D: jump_if_false @SMOKE_10187: $marker = create_marker_above_actor [email protected] 0002: jump @SMOKE_2 :SMOKE_204ED: load_animation "GANGS"04ED: load_animation "DEALER" 04ED: load_animation  "SMOKING"0247: load_model 1212038B: load_requested_models0001: wait 0 ms 00D6: if 04EE:   animation "GANGS" loaded 004D: jump_if_false @SMOKE_20001: wait 0 ms 00D6: if 04EE:   animation "DEALER" loaded 004D: jump_if_false @SMOKE_2 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 003BF: set_player $PLAYER_CHAR ignored_by_everyone 1029B: [email protected] = init_object 1212 at 0.0 0.0 0.00382: set_object [email protected] collision_detection 0 05C1: AS_actor $PLAYER_ACTOR speak_from_audio_table 194 0812: AS_actor $PLAYER_ACTOR perform_animation "SHOP_PAY" IFP "DEALER" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 45000001: wait 500 ms070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.03 0.030 0.02 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 00001: wait 4000 ms0108: destroy_object [email protected] 0249: release_model 12120647: AS_actor [email protected] clear_look_task0109: player $PLAYER_CHAR money = -2005C1: AS_actor [email protected] speak_from_audio_table 84 0812: AS_actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 32000812: AS_actor $PLAYER_ACTOR perform_animation "DRUGS_BUY" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 32000001: wait 3200 ms0687: clear_actor [email protected] task0002: jump @SMOKE_1
Edited by BiPolarBear
Link to comment
Share on other sites

Yes the extern script, we can terminate it by 0459: end_thread_named 'DEALER'

I tried some codes

 

0459: end_thread_named 'DEALER'0792: disembark_instantly_actor [email protected]: set_actor [email protected] decision_maker_to 320A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTOR0A1D: AS_actor $PLAYER_ACTOR rotate_to_and_look_at_actor [email protected]
but the actor walked always away and then he made the animation

so, it's important to run the animation earlier instead after your 4000 ms wait time

 

 

05C1: AS_actor $PLAYER_ACTOR speak_from_audio_table 194 0812: AS_actor $PLAYER_ACTOR perform_animation "SHOP_PAY" IFP "DEALER" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -10001: wait 500 ms070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.03 0.030 0.02 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 00812: AS_actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -10001: wait 4000 ms
if it's not enough, you can lock the actor

and you can bring the actor_rotate code more times

 

the script below, what i got so far, check it out

 

{$CLEO .cs}thread 'DEALMOD':SMOKE_1wait 0 if 0256:   player $PLAYER_CHAR defined jf @SMOKE_1 if  and0AB0:   key_pressed 69// E key80DF:   not actor $PLAYER_ACTOR driving jf @SMOKE_1  04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 2.0 0.0if   0AE1:   [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 8.0 find_next 0 pass_deads 1 // CLEO 4 opcodejf @SMOKE_1if    8118:   not actor [email protected] dead jf @cleanup_1  if or02F2:   actor [email protected] model == #BMYDRUG 02F2:   actor [email protected] model == #WMYDRUG 02F2:   actor [email protected] model == #HMYDRUG 02F2:   actor [email protected] model == #BIKDRUG jf @cleanup_1if00F2:   actor [email protected] near_actor $PLAYER_ACTOR radius 1.5 1.5 sphere 0jf @cleanup_10459: end_thread_named 'DEALER'0792: disembark_instantly_actor [email protected]: set_actor [email protected] decision_maker_to 3204D7: set_actor [email protected] locked 10A1D: AS_actor [email protected] rotate_to_and_look_at_actor $PLAYER_ACTOR0A1D: AS_actor $PLAYER_ACTOR rotate_to_and_look_at_actor [email protected]: [email protected] = create_marker_above_actor [email protected]: load_animation "GANGS"04ED: load_animation "DEALER" 0247: load_model 1212038B: load_requested_models029B: [email protected] = init_object 1212 at 0.0 0.0 0.00382: set_object [email protected] collision_detection 0 :SMOKE_2wait 0 if and04EE:   animation "GANGS" loaded04EE:   animation "DEALER" loaded jf @SMOKE_205C1: AS_actor $PLAYER_ACTOR speak_from_audio_table 194 0812: AS_actor $PLAYER_ACTOR perform_animation "SHOP_PAY" IFP "DEALER" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -10001: wait 500 ms070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.03 0.030 0.02 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 00812: AS_actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -10001: wait 4000 ms0108: destroy_object [email protected] 0249: release_model 1212if 0256:   player $PLAYER_CHAR defined jf @cleanup_2if8118:  NOT  actor [email protected] deadjf @cleanup_2//0647: AS_actor [email protected] clear_look_task0109: player $PLAYER_CHAR money = -2005C1: AS_actor [email protected] speak_from_audio_table 84 //0812: AS_actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -10812: AS_actor $PLAYER_ACTOR perform_animation "DRUGS_BUY" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -10001: wait 5000 msif8118:  NOT  actor [email protected] deadjf @cleanup_20687: clear_actor [email protected] task:cleanup_204EF: release_animation "GANGS"04EF: release_animation "DEALER"04D7: set_actor [email protected] locked 0 :cleanup_10164: disable_marker [email protected]: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian wait 100jump @SMOKE_1
Link to comment
Share on other sites

Omega_Is_Here

Yes the extern script, we can terminate it by 0459: end_thread_named 'DEALER'

I tried some codes

but the actor walked always away and then he made the animation

so, it's important to run the animation earlier instead after your 4000 ms wait time

if it's not enough, you can lock the actor

and you can bring the actor_rotate code more times

Finally !

After many trials and errors, the dealer_deal animation worked

Locking the actor, lowering 4000 ms didn't stop the dealer from moving, but ending the dealer thread early did

I ended the dealer thread before the dealer's animation (dealer_deal)

The dealer was forced to do the animation instead of walking away :)

But after the script ends, the dealer walks away like a normal ped instead of selling drugs again

But that's because the dealer thread has ended maybe ?

What it looks like now (Working)

:SMOKE_10001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @SMOKE_1 0001: wait 0 ms 00D6: if 80DF:   not actor $PLAYER_ACTOR driving 004D: jump_if_false @SMOKE_1 0001: wait 0 ms  00D6: if 03EE:   player $PLAYER_CHAR controllable 004D: jump_if_false @SMOKE_1 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected] 0001: wait 0 ms 00D6: if 8039:   not  [email protected] == -1 004D: jump_if_false @SMOKE_1 00D6: if or02F2:   actor [email protected] model == #BMYDRUG 02F2:   actor [email protected] model == #WMYDRUG 02F2:   actor [email protected] model == #HMYDRUG 02F2:   actor [email protected] model == #BIKDRUG 004D: jump_if_false @SMOKE_10001: wait 0 ms00D6: if00F3:   actor $PLAYER_ACTOR near_actor [email protected] radius 2.0 2.0 sphere 0 on_foot004D: jump_if_false @SMOKE_1    0001: wait 0 ms 00D6: if 0AB0:   key_pressed 69 004D: jump_if_false @SMOKE_10002: jump @SMOKE_2 :SMOKE_2029B: [email protected] = init_object 3044 at 0.0 0.0 0.0 029B: [email protected] = init_object 3045 at 0.0 0.0 0.0  069A: attach_object [email protected] to_object [email protected] with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.004ED: load_animation "GANGS"04ED: load_animation "DEALER" 04ED: load_animation "SMOKING"0247: load_model 12120247: load_model 30440247: load_model 3045038B: load_requested_models0001: wait 0 ms 00D6: if 04EE:   animation "GANGS" loaded 004D: jump_if_false @SMOKE_20001: wait 0 ms 00D6: if 04EE:   animation "DEALER" loaded 004D: jump_if_false @SMOKE_20459: end_thread_named 'DEALER' 0A1D: AS_actor $PLAYER_ACTOR rotate_to_and_look_at_actor [email protected]: wait 0 ms0247: load_model 1212038B: load_requested_models029B: [email protected] = init_object 1212 at 0.0 0.0 0.0   //Money0382: set_object [email protected] collision_detection 0067E: put_camera_on_actor $PLAYER_ACTOR offset 0.5 -1.0 1.1 target_actor [email protected] tilt 0.0 switchstyle 201B9: set_actor $PLAYER_ACTOR armed_weapon_to 003BF: set_player $PLAYER_CHAR ignored_by_everyone 1029B: [email protected] = init_object 1212 at 0.0 0.0 0.0   // Money0382: set_object [email protected] collision_detection 0    //Money05C1: AS_actor $PLAYER_ACTOR speak_from_audio_table 194 0812: AS_actor $PLAYER_ACTOR perform_animation "SHOP_PAY" IFP "DEALER" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -10001: wait 1000 ms070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.03 0.030 -0.02 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 00001: wait 3500 ms0108: destroy_object [email protected] 0249: release_model 12120647: AS_actor [email protected] clear_look_task0109: player $PLAYER_CHAR money = -2005C1: AS_actor [email protected] speak_from_audio_table 84 0812: AS_actor [email protected] perform_animation "DEALER_DEAL" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 32000812: AS_actor $PLAYER_ACTOR perform_animation "DRUGS_BUY" IFP "DEALER" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 32000001: wait 1500 ms070A: AS_actor [email protected] attach_to_object [email protected] offset 0.04 0.1 0.05 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 00001: wait 1200 ms0108: destroy_object [email protected]: destroy_object [email protected]: wait 500 ms02EB: restore_camera_with_jumpcutjump @smoke_1

Also, is it possible to make my mod to happen if the player presses Y to the dealer?

If i change the key press from 69//E (Which it is right now) To 89//Y, The script does happen but cj also replies negatively like he normally does...

Do i have to change something in the external script dealer in main.scm?

If so how do i do that?

Or do i have to end the external script dealer and rewrite the mod from scratch?

And thanks for everything ZAZ

Edited by BiPolarBear
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.