Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,778 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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

    2. Red Dead Redemption

    3. 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. Forum Support

    2. Site Suggestions

Sign in to follow this  
vitoordutra

Actor won't move/follow player on SAMP

Recommended Posts

vitoordutra

Hi, I'm making a cleo to spawn an actor and follow a player, but when I spawn the actor it doesn't move. Can anyone help?

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP 0000: NOP :NONAME_4wait 0 if 0AB0:   key_pressed 123 else_jump @NONAME_4 jump @NONAME_30 :NONAME_30wait 0 Model.Load(#WMYVA2)04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 4.0 0.0 038B: load_requested_models 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group [email protected] = Actor.Create(Gang2, #WMYVA2, [email protected], [email protected], [email protected])0631: put_actor [email protected] in_group $PLAYER_GROUP Actor.Health([email protected]) = 500Actor.SetImmunities([email protected], 1, 1, 1, 1, 1)07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to wait 800 jump @NONAME_147 :NONAME_147wait 0 if 0AB0:   key_pressed 122 else_jump @NONAME_173 jump @NONAME_201 :NONAME_173wait 500 if    Actor.Dead([email protected])else_jump @NONAME_147 jump @NONAME_201 :NONAME_201wait 500 Actor.DestroyInstantly([email protected])wait 700 jump @NONAME_4 

Share this post


Link to post
Share on other sites
Sanmodder
Posted (edited)

 

Hi, I'm making a cleo to spawn an actor and follow a player, but when I spawn the actor it doesn't move. Can anyone help?

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP 0000: NOP :NONAME_4wait 0 if 0AB0:   key_pressed 123 else_jump @NONAME_4 jump @NONAME_30 :NONAME_30wait 0 Model.Load(#WMYVA2)04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 4.0 0.0 038B: load_requested_models 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group [email protected] = Actor.Create(Gang2, #WMYVA2, [email protected], [email protected], [email protected])0631: put_actor [email protected] in_group $PLAYER_GROUP Actor.Health([email protected]) = 500Actor.SetImmunities([email protected], 1, 1, 1, 1, 1)07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to wait 800 jump @NONAME_147 :NONAME_147wait 0 if 0AB0:   key_pressed 122 else_jump @NONAME_173 jump @NONAME_201 :NONAME_173wait 500 if    Actor.Dead([email protected])else_jump @NONAME_147 jump @NONAME_201 :NONAME_201wait 500 Actor.DestroyInstantly([email protected])wait 700 jump @NONAME_4 

I've fixed your script

{$CLEO .cs}                                                                                                                                                                                                                                                                               0000: NOP                                                                                                                                                                                                                                                                                 :start                                                                                                                                       repeat                                                                                                                                       repeat                                                                                                                                       wait 0                                                                                                                                       until if player.Defined(0)                                                                                                                   until if 0AB0:   key_pressed 123                                                                                                             07F6: get_group $PLAYER_GROUP number_of_leaders_to [email protected] number_of_members_to [email protected]                                                              if [email protected] == 7                                                                                                                                  then 0acd: show_text_box "~r~~h~error max guard" time 100                                                                                        goto @start                                                                                                                             end                                                                                                                                          Model.Load(#WMYVA2)                                                                                                                          Model.Load(#MP5LNG)                                                                                                                          Model.Load(#AK47)                                                                                                                            Model.Load(#MICRO_UZI)                                                                                                                       038B: load_requested_models                                                                                                                  while true                                                                                                                                       wait 0                                                                                                                                       if and                                                                                                                                          model.Available(#WMYVA2)                                                                                                                     Model.Available(#MP5LNG)                                                                                                                     Model.Available(#AK47)                                                                                                                       Model.Available(#MICRO_UZI)                                                                                                                  then break                                                                                                                                end                                                                                                                                      end                                                                                                                                          0209: [email protected] = random_int_in_ranges 286331153 -1717986919 //marker color hack                                                                   0209: [email protected] = random_int_in_ranges 28 30 //weapons select                                                                                      0208: [email protected] = random_float_in_ranges -6.2 6.2 //offset x                                                                                       0208: [email protected] = random_float_in_ranges -6.2 6.2 //offset y                                                                                       04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 0.0                                                              [email protected] = Actor.Create(Gang2, #WMYVA2, [email protected], [email protected], [email protected])                                                                                               FOR [email protected] = 0 TO 25 STEP 1 //create effect smoke                                                                                                   04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.0 0.0                                                                     095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 1.0 0.0 1.0 1.0 size 50.1 last_factor 0.1                                    END                                                                                                                                          Actor.Health([email protected]) = 1000                                                                                                                     Actor.SetImmunities([email protected], 0, 1, 1, 1, 1)                                                                                                      07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to                                                                         actor.WeaponAccuracy([email protected]) = 98                                                                                                               Actor.GiveWeaponAndAmmo([email protected], [email protected], 1E17)                                                                                                       [email protected] = marker.CreateAboveActor([email protected])                                                                                                            Marker.SetColor([email protected], [email protected])                                                                                                                     07AF: $PLAYER_GROUP = player $PLAYER_CHAR group                                                                                              0631: put_actor [email protected] in_group $PLAYER_GROUP                                                                                                   06F0: set_group $PLAYER_GROUP distance_limit_to 9999.0                                                                                                                                                                                                                                    while true                                                                                                                                       wait 0                                                                                                                                       if 0AB0:   key_pressed 122                                                                                                                   then break                                                                                                                                       else if Actor.Dead([email protected])                                                                                                                      then break                                                                                                                                       else if actor.Dead($PLAYER_ACTOR)                                                                                                            then break                                                                                                                                   end                                                                                                                                      end                                                                                                                                      end                                                                                                                                      end                                                                                                                                          Actor.DestroyInstantly([email protected])                                                                                                                  marker.Disable([email protected])                                                                                                                           model.Destroy(#WMYVA2)                                                                                                                       goto @start                                                                                                                                  
Edited by Sanmodder

Share this post


Link to post
Share on other sites
vitoordutra

 

 

Hi, I'm making a cleo to spawn an actor and follow a player, but when I spawn the actor it doesn't move. Can anyone help?

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP 0000: NOP :NONAME_4wait 0 if 0AB0:   key_pressed 123 else_jump @NONAME_4 jump @NONAME_30 :NONAME_30wait 0 Model.Load(#WMYVA2)04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 4.0 0.0 038B: load_requested_models 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group [email protected] = Actor.Create(Gang2, #WMYVA2, [email protected], [email protected], [email protected])0631: put_actor [email protected] in_group $PLAYER_GROUP Actor.Health([email protected]) = 500Actor.SetImmunities([email protected], 1, 1, 1, 1, 1)07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to wait 800 jump @NONAME_147 :NONAME_147wait 0 if 0AB0:   key_pressed 122 else_jump @NONAME_173 jump @NONAME_201 :NONAME_173wait 500 if    Actor.Dead([email protected])else_jump @NONAME_147 jump @NONAME_201 :NONAME_201wait 500 Actor.DestroyInstantly([email protected])wait 700 jump @NONAME_4 

I've fixed your script

{$CLEO .cs}                                                                                                                                                                                                                                                                               0000: NOP                                                                                                                                                                                                                                                                                 :start                                                                                                                                       repeat                                                                                                                                       repeat                                                                                                                                       wait 0                                                                                                                                       until if player.Defined(0)                                                                                                                   until if 0AB0:   key_pressed 123                                                                                                             07F6: get_group $PLAYER_GROUP number_of_leaders_to [email protected] number_of_members_to [email protected]                                                              if [email protected] == 7                                                                                                                                  then 0acd: show_text_box "~r~~h~error max guard" time 100                                                                                        goto @start                                                                                                                             end                                                                                                                                          Model.Load(#WMYVA2)                                                                                                                          Model.Load(#MP5LNG)                                                                                                                          Model.Load(#AK47)                                                                                                                            Model.Load(#MICRO_UZI)                                                                                                                       038B: load_requested_models                                                                                                                  while true                                                                                                                                       wait 0                                                                                                                                       if and                                                                                                                                          model.Available(#WMYVA2)                                                                                                                     Model.Available(#MP5LNG)                                                                                                                     Model.Available(#AK47)                                                                                                                       Model.Available(#MICRO_UZI)                                                                                                                  then break                                                                                                                                end                                                                                                                                      end                                                                                                                                          0209: [email protected] = random_int_in_ranges 286331153 -1717986919 //marker color hack                                                                   0209: [email protected] = random_int_in_ranges 28 30 //weapons select                                                                                      0208: [email protected] = random_float_in_ranges -6.2 6.2 //offset x                                                                                       0208: [email protected] = random_float_in_ranges -6.2 6.2 //offset y                                                                                       04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 0.0                                                              [email protected] = Actor.Create(Gang2, #WMYVA2, [email protected], [email protected], [email protected])                                                                                               FOR [email protected] = 0 TO 25 STEP 1 //create effect smoke                                                                                                   04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.0 0.0                                                                     095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 0.0 RGBA 1.0 0.0 1.0 1.0 size 50.1 last_factor 0.1                                    END                                                                                                                                          Actor.Health([email protected]) = 1000                                                                                                                     Actor.SetImmunities([email protected], 0, 1, 1, 1, 1)                                                                                                      07DD: set_actor [email protected] attack_rate 100 // previously known as temper_to                                                                         actor.WeaponAccuracy([email protected]) = 98                                                                                                               Actor.GiveWeaponAndAmmo([email protected], [email protected], 1E17)                                                                                                       [email protected] = marker.CreateAboveActor([email protected])                                                                                                            Marker.SetColor([email protected], [email protected])                                                                                                                     07AF: $PLAYER_GROUP = player $PLAYER_CHAR group                                                                                              0631: put_actor [email protected] in_group $PLAYER_GROUP                                                                                                   06F0: set_group $PLAYER_GROUP distance_limit_to 9999.0                                                                                                                                                                                                                                    while true                                                                                                                                       wait 0                                                                                                                                       if 0AB0:   key_pressed 122                                                                                                                   then break                                                                                                                                       else if Actor.Dead([email protected])                                                                                                                      then break                                                                                                                                       else if actor.Dead($PLAYER_ACTOR)                                                                                                            then break                                                                                                                                   end                                                                                                                                      end                                                                                                                                      end                                                                                                                                      end                                                                                                                                          Actor.DestroyInstantly([email protected])                                                                                                                  marker.Disable([email protected])                                                                                                                           model.Destroy(#WMYVA2)                                                                                                                       goto @start                                                                                                                                  

Thanks! But... actor is not moving on SAMP. Does it work on SAMP? Can I make something to work on multiplayer?

Share this post


Link to post
Share on other sites
Sanmodder

and creates an actor?
there is no player of the ogf group in the samp
fix these opcodes
0850: AS_actor 95 @ follow_actor $ PLAYER_ACTOR
07A3: AS_actor $ 10516 (12 @, 8i) run_to_and_follow_actor $ PLAYER_ACTOR wait_radius_between 5.0 and 10.0
I do not play in samp, I do not know

Share this post


Link to post
Share on other sites
vitoordutra

and creates an actor?

there is no player of the ogf group in the samp

fix these opcodes

0850: AS_actor 95 @ follow_actor $ PLAYER_ACTOR

07A3: AS_actor $ 10516 (12 @, 8i) run_to_and_follow_actor $ PLAYER_ACTOR wait_radius_between 5.0 and 10.0

I do not play in samp, I do not know

This code should make the actor follow the player? Not the group?

Share this post


Link to post
Share on other sites
Sanmodder

 

and creates an actor?

there is no player of the ogf group in the samp

fix these opcodes

0850: AS_actor 95 @ follow_actor $ PLAYER_ACTOR

07A3: AS_actor $ 10516 (12 @, 8i) run_to_and_follow_actor $ PLAYER_ACTOR wait_radius_between 5.0 and 10.0

I do not play in samp, I do not know

This code should make the actor follow the player? Not the group?

 

Yes

but

it works on all actors but they do not get in the vehicle

Share this post


Link to post
Share on other sites
vitoordutra

 

 

and creates an actor?

there is no player of the ogf group in the samp

fix these opcodes

0850: AS_actor 95 @ follow_actor $ PLAYER_ACTOR

07A3: AS_actor $ 10516 (12 @, 8i) run_to_and_follow_actor $ PLAYER_ACTOR wait_radius_between 5.0 and 10.0

I do not play in samp, I do not know

This code should make the actor follow the player? Not the group?

 

Yes

but

it works on all actors but they do not get in the vehicle

 

Ok, thanks. I'm noob at coding cleo haha... where should I put this code?

Share this post


Link to post
Share on other sites
Sanmodder

replace these opcodes
07AF: $ PLAYER_GROUP = player $ PLAYER_CHAR group
0631: put_actor 18 @ in_group $ PLAYER_GROUP
06F0: set_group $ PLAYER_GROUP distance_limit_to 9999.0
on this
0850: AS_actor 18 @ follow_actor $ PLAYER_ACTOR
07A3: AS_actor 18 @ run_to_and_follow_actor $ PLAYER_ACTOR wait_radius_between 5.0 and 10.0

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

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