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

midou35000

Need Help With A Script

Recommended Posts

midou35000

Hi,


So yeah i need help please does anyone know what is the Opcode to make a ped do an animation (not CJ!!) because i need this upcode and i couldnt find the opcode for it there is only one opcode i found in sanny builder:


605: actor $PLAYER_ACTOR perform_animation_sequence "picstnd_in" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 500


but this one is for CJ i want one for the peds only so i tried this:


0605: actor $ACTOR perform_animation_sequence "picstnd_in" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 500


here i just changed the ($PLAYER_ACTOR) to ($ACTOR) but it didnt work so anyone could help me plz i`d be so glad if you guys help me.


Thank you for your time.


Share this post


Link to post
Share on other sites
In45do

The script must known which ped is scripted. Like for example :

009A: [email protected] = create_actor_pedtype 4 model #MALE01 at 0.0 0.0 0.00605: actor [email protected] perform_animation_sequence "idle_armed" IFP "PED" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 0 time -1

Further more learn this tutorial about animation codes. :^:

Share this post


Link to post
Share on other sites
midou35000

Hi,

Thank you for the reply but i did what you told me and still not working (oh by the way this is a script that makes peds cose to you do this three animation when you are on the selected cars)

{$CLEO .cs}
03A4: name_thread "ANIME"
:ANIME_00
04ED: load_animation "SNAP"
wait 0 ms
00D6: if
04EE: animation "SNAP" loaded
004D: jump_if_false @ANIME_00
:ANIME_01
wait 0 ms
if and
0256: player $PLAYER_CHAR defined
00DD: actor $PLAYER_ACTOR driving_car_with_model #TURISMO
00DD: actor $PLAYER_ACTOR driving_car_with_model #PHOENIX
00DD: actor $PLAYER_ACTOR driving_car_with_model #SUPERGT
00DD: actor $PLAYER_ACTOR driving_car_with_model #NRG500
004D: jump_if_false @ANIME_01
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 3.0 -0.3
0172: [email protected] = actor $PLAYER_ACTOR Z_angle
000B: [email protected] += 180.0
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL01 at [email protected] [email protected] [email protected]
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL03 at [email protected] [email protected] [email protected]
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL02 at [email protected] [email protected] [email protected]
:ANIME_04
wait 0 ms
0605: actor [email protected] perform_animation_sequence "picstnd_in" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
0605: actor [email protected] perform_animation_sequence "picstnd_out" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
0605: actor [email protected] perform_animation_sequence "picstnd_take" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
:ANIME_03
wait 0 ms
if and
00DD: not actor $PLAYER_ACTOR driving_car_with_model #TURISMO
00DD: not actor $PLAYER_ACTOR driving_car_with_model #PHOENIX
00DD: not actor $PLAYER_ACTOR driving_car_with_model #SUPERGT
00DD: not actor $PLAYER_ACTOR driving_car_with_model #NRG500
04EF: release_animation "SNAP"
jump @ANIME_01

Share this post


Link to post
Share on other sites
Blood Tiger

Try this

 

:ANIME_00

04ED: load_animation "SNAP"
wait 0 ms
00D6: if
04EE: animation "SNAP" loaded
004D: jump_if_false @ANIME_00
:ANIME_01
wait 0 ms
if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @ANIME_01
if or
00DD: actor $PLAYER_ACTOR driving_car_with_model #TURISMO
00DD: actor $PLAYER_ACTOR driving_car_with_model #PHOENIX
00DD: actor $PLAYER_ACTOR driving_car_with_model #SUPERGT
00DD: actor $PLAYER_ACTOR driving_car_with_model #NRG500
004D: jump_if_false @ANIME_01
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 3.0 -0.3
0172: [email protected] = actor $PLAYER_ACTOR Z_angle
000B: [email protected] += 180.0
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL01 at [email protected] [email protected] [email protected]
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL03 at [email protected] [email protected] [email protected]
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL02 at [email protected] [email protected] [email protected]
:ANIME_04
wait 0 ms
0605: actor [email protected] perform_animation_sequence "picstnd_in" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
0605: actor [email protected] perform_animation_sequence "picstnd_out" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
0605: actor [email protected] perform_animation_sequence "picstnd_take" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
:ANIME_03
wait 0 ms
if and
80DD: not actor $PLAYER_ACTOR driving_car_with_model #TURISMO
80DD: not actor $PLAYER_ACTOR driving_car_with_model #PHOENIX
80DD: not actor $PLAYER_ACTOR driving_car_with_model #SUPERGT
80DD: not actor $PLAYER_ACTOR driving_car_with_model #NRG500
004D: jump_if_false @ANIME_00
04EF: release_animation "SNAP"
jump @ANIME_01
Edited by Muxan

Share this post


Link to post
Share on other sites
midou35000

 

Try this

 

:ANIME_00

04ED: load_animation "SNAP"
wait 0 ms
00D6: if
04EE: animation "SNAP" loaded
004D: jump_if_false @ANIME_00
:ANIME_01
wait 0 ms
if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @ANIME_01
if or
00DD: actor $PLAYER_ACTOR driving_car_with_model #TURISMO
00DD: actor $PLAYER_ACTOR driving_car_with_model #PHOENIX
00DD: actor $PLAYER_ACTOR driving_car_with_model #SUPERGT
00DD: actor $PLAYER_ACTOR driving_car_with_model #NRG500
004D: jump_if_false @ANIME_01
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 3.0 -0.3
0172: [email protected] = actor $PLAYER_ACTOR Z_angle
000B: [email protected] += 180.0
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL01 at [email protected] [email protected] [email protected]
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL03 at [email protected] [email protected] [email protected]
009A: [email protected] = create_actor_pedtype 4 model #SPECIAL02 at [email protected] [email protected] [email protected]
:ANIME_04
wait 0 ms
0605: actor [email protected] perform_animation_sequence "picstnd_in" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
0605: actor [email protected] perform_animation_sequence "picstnd_out" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
0605: actor [email protected] perform_animation_sequence "picstnd_take" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000
:ANIME_03
wait 0 ms
if and
80DD: not actor $PLAYER_ACTOR driving_car_with_model #TURISMO
80DD: not actor $PLAYER_ACTOR driving_car_with_model #PHOENIX
80DD: not actor $PLAYER_ACTOR driving_car_with_model #SUPERGT
80DD: not actor $PLAYER_ACTOR driving_car_with_model #NRG500
004D: jump_if_false @ANIME_00
04EF: release_animation "SNAP"
jump @ANIME_01

 

Hey but its the same as mine dude?

Share this post


Link to post
Share on other sites
Jaybog

 

Try this

:ANIME_00

04ED: load_animation "SNAP"

wait 0 ms

00D6: if

04EE: animation "SNAP" loaded

004D: jump_if_false @ANIME_00

 

:ANIME_01

wait 0 ms

if

0256: player $PLAYER_CHAR defined

004D: jump_if_false @ANIME_01

if or

00DD: actor $PLAYER_ACTOR driving_car_with_model #TURISMO

00DD: actor $PLAYER_ACTOR driving_car_with_model #PHOENIX

00DD: actor $PLAYER_ACTOR driving_car_with_model #SUPERGT

00DD: actor $PLAYER_ACTOR driving_car_with_model #NRG500

004D: jump_if_false @ANIME_01

04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 3.0 -0.3

0172: [email protected] = actor $PLAYER_ACTOR Z_angle

000B: [email protected] += 180.0

009A: [email protected] = create_actor_pedtype 4 model #SPECIAL01 at [email protected] [email protected] [email protected]

009A: [email protected] = create_actor_pedtype 4 model #SPECIAL03 at [email protected] [email protected] [email protected]

009A: [email protected] = create_actor_pedtype 4 model #SPECIAL02 at [email protected] [email protected] [email protected]

:ANIME_04

wait 0 ms

0605: actor [email protected] perform_animation_sequence "picstnd_in" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000

0605: actor [email protected] perform_animation_sequence "picstnd_out" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000

0605: actor [email protected] perform_animation_sequence "picstnd_take" IFP_file "SNAP" 4.0 loop 0 0 0 0 time 5000

 

:ANIME_03

wait 0 ms

if and

80DD: not actor $PLAYER_ACTOR driving_car_with_model #TURISMO

80DD: not actor $PLAYER_ACTOR driving_car_with_model #PHOENIX

80DD: not actor $PLAYER_ACTOR driving_car_with_model #SUPERGT

80DD: not actor $PLAYER_ACTOR driving_car_with_model #NRG500

004D: jump_if_false @ANIME_00

04EF: release_animation "SNAP"

jump @ANIME_01

 

Hey but its the same as mine dude?

 

no, it's not the same

Share this post


Link to post
Share on other sites
midou35000

Yes It IS

Share this post


Link to post
Share on other sites
ZAZ

no, it's not

maybe the script still don't work but Muxan fixed a failure in one of your conditional checks

Edited by ZAZ

Share this post


Link to post
Share on other sites
midou35000

no, it's not

maybe the script still don't work but Muxan fixed a failure in one of your conditional checks

ZAZ can you help me with it?

 

Oh yeah he fixed "if and" to "if or"

 

Thank you muxan but the scriptstill dont work

Share this post


Link to post
Share on other sites
ZAZ

Your script is so far away from working

 

If you wanna learn how to do, then learn scripting by writing small and simple scripts, click the link in my sig, called CLEO Script Tutorial, read the lessons an try the example scripts, especially the lessons about Special Actors as well about animations

 

btw. the ifp file you need to do the animations "picstnd_in" "picstnd_out" "picstnd_take" is called CAMERA.ifp
so need to load animation "CAMERA"

04ED: load_animation "CAMERA"

and insert that name in opcode 0605:

0605: actor [email protected] perform_animation_sequence "picstnd_in" IFP_file "CAMERA" 4.0 loop 0 0 0 0 time 5000

If you just wanna have the working script, then post in request topic

Share this post


Link to post
Share on other sites
midou35000

Your script is so far away from working

 

If you wanna learn how to do, then learn scripting by writing small and simple scripts, click the link in my sig, called CLEO Script Tutorial, read the lessons an try the example scripts, especially the lessons about Special Actors as well about animations

 

btw. the ifp file you need to do the animations "picstnd_in" "picstnd_out" "picstnd_take" is called CAMERA.ifp

so need to load animation "CAMERA"

04ED: load_animation "CAMERA"

and insert that name in opcode 0605:

0605: actor [email protected] perform_animation_sequence "picstnd_in" IFP_file "CAMERA" 4.0 loop 0 0 0 0 time 5000

If you just wanna have the working script, then post in request topic

Hi ZAZ,

Actually i learned scripting from your tutorial in sanny builder forums and am still a loser in gta scripting,

BTW i have added a file called SNAP.ifp to ta3.img thats why i made its name in opcode 0605.

And i dont want to get the script i want to learn how to do it.

Edited by midou35000

Share this post


Link to post
Share on other sites
ZAZ

so write first a simple script to spawn an actor by key_press infront of Player and post it

Share this post


Link to post
Share on other sites
midou35000

ZAZ how do i write the script like in sanny builder here?

Share this post


Link to post
Share on other sites
midou35000
There you go ZAZ


{$CLEO .cs}


name thread 'TEST ZAZ'


:TZAZ_01

wait 0 ms

if

0256: player $PLAYER_CHAR defined

jump_if_false @TZAZ_01

if

key_pressed 50

jump_if_false @TZAZ_01


:TZAZ_02

wait 0 ms

077E: get_active_interior_to [email protected]

023C: load_special_actor 'RIDER' as 1


:TZAZ_03

wait 0 ms

04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2

009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]

0223: set_actor [email protected] health_to 500

0860: link_actor [email protected] to_interior [email protected]

0296: unload_special_actor 1


:TZAZ_04

wait 0 ms

if

0118: not actor [email protected] dead

jump_if_false @TZAZ_04

jump @TZAZ_04


:TZAZ_05

01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian

jump @TZAZ_01

Share this post


Link to post
Share on other sites
ZAZ

not bad, but there's missing a load check

it needs to check first if the special actor model is loaded before you can create him

 

(it seems that something is wrong with the forums software, the messanger functions are not available at moment)

Share this post


Link to post
Share on other sites
midou35000

Sorry ZAZ i forgot that there you go:

:TZAZ_00
0001: wait 0 ms
00D6: if
823D: not special_actor 1 loaded
004D: jump_if_false @TZAZ_02
023C: load_special_actor 'RIDER' as 1
0002: jump @TZAZ_00

Share this post


Link to post
Share on other sites
ZAZ

the whole script, please

...and..OMG... i idn't saw it: Rider don't exist, it must be Ryder

please test your script before you post and if it crashs, then try to find your failure by yourself

Edited by ZAZ

Share this post


Link to post
Share on other sites
midou35000

 

the whole script, please

{$CLEO .cs}
name thread 'TEST ZAZ'
:TZAZ_01
wait 0 ms
if
0256: player $PLAYER_CHAR defined
jump_if_false @TZAZ_01
if
key_pressed 50
jump_if_false @TZAZ_01
:TZAZ_00
0001: wait 0 ms
00D6: if
823D: not special_actor 1 loaded
004D: jump_if_false @TZAZ_02
023C: load_special_actor 'RIDER' as 1
0002: jump @TZAZ_00
:TZAZ_02
wait 0 ms
077E: get_active_interior_to [email protected]
023C: load_special_actor 'RIDER' as 1
:TZAZ_03
wait 0 ms
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2
009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]
0223: set_actor [email protected] health_to 500
0860: link_actor [email protected] to_interior [email protected]
0296: unload_special_actor 1
:TZAZ_04
wait 0 ms
if
0118: not actor [email protected] dead
jump_if_false @TZAZ_04
jump @TZAZ_04
:TZAZ_05
01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian
jump @TZAZ_01

Share this post


Link to post
Share on other sites
ZAZ

Rider don't exist, it must be Ryder

please test your script before you post and if it crashs, then try to find your failure by yourself

Share this post


Link to post
Share on other sites
midou35000

Rider don't exist, it must be Ryder please test your script before you post and if it crashs, then try to find your failure by yourself

There you go i tested it and it spawn Tenpen:

{$CLEO .cs}
03A4: name thread 'TEST ZAZ'
:TZAZ_01
wait 0 ms
if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @TZAZ_01
if
0AB0: key_pressed 50
004D: jump_if_false @TZAZ_01
:TZAZ_00
0001: wait 0 ms
00D6: if
823D: not special_actor 1 loaded
004D: jump_if_false @TZAZ_02
023C: load_special_actor 'TENPEN' as 1
0002: jump @TZAZ_00
:TZAZ_02
wait 0 ms
077E: get_active_interior_to [email protected]
023C: load_special_actor 'TENPEN' as 1
:TZAZ_03
wait 0 ms
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2
009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]
0223: set_actor [email protected] health_to 500
0860: link_actor [email protected] to_interior [email protected]
0296: unload_special_actor 1
:TZAZ_04
wait 0 ms
if
0118: not actor [email protected] dead
004D: jump_if_false @TZAZ_04
jump @TZAZ_04

Share this post


Link to post
Share on other sites
ZAZ

now you forgot the cleanup and made a worst script end

test this script again, kill the actor and try to spawn him again

 

this loops for ever:

:TZAZ_04

wait 0 ms

if

0118: not actor [email protected] dead

004D: jump_if_false @TZAZ_04

jump @TZAZ_04

 

--------------------------------------------

 

the previous versions had the same failure

 

:TZAZ_04

wait 0 ms

if

0118: not actor [email protected] dead

jump_if_false @TZAZ_04 <---- this should jump to the cleanup, to TZAZ_05

jump @TZAZ_04

 

:TZAZ_05

01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian

jump @TZAZ_01

 

 

OMG, THE FORUMS SOFTWARE SREWS UP

Edited by ZAZ

Share this post


Link to post
Share on other sites
midou35000

now you forgot the cleanup and made a worst script end

test this script again, kill the actor and try to spawn him again

Ooops am sorry ZAZ thats a big Fail,

Now if you find a bug i will give you 10 $:

{$CLEO .cs}
03A4: name thread 'TEST ZAZ'
:TZAZ_01
wait 0 ms
if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @TZAZ_01
if
0AB0: key_pressed 50
004D: jump_if_false @TZAZ_01
:TZAZ_00
0001: wait 0 ms
00D6: if
823D: not special_actor 1 loaded
004D: jump_if_false @TZAZ_02
023C: load_special_actor 'TENPEN' as 1
0002: jump @TZAZ_00
:TZAZ_02
wait 0 ms
077E: get_active_interior_to [email protected]
023C: load_special_actor 'TENPEN' as 1
:TZAZ_03
wait 0 ms
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -2.0 2.0 0.2
009A: [email protected] = create_actor_pedtype 24 model #SPECIAL01 at [email protected] [email protected] [email protected]
0223: set_actor [email protected] health_to 500
0860: link_actor [email protected] to_interior [email protected]
0296: unload_special_actor 1
:TZAZ_04
wait 0 ms
if
0118: not actor [email protected] dead
004D: jump_if_false @TZAZ_04
jump @TZAZ_01

Share this post


Link to post
Share on other sites
ZAZ

OMG, THE FORUMS SOFTWARE SREWS UP

Share this post


Link to post
Share on other sites
midou35000

What?

Share this post


Link to post
Share on other sites
midou35000

ZAZ please dont ignore me keep going with me plz

Share this post


Link to post
Share on other sites
ZAZ

the forums software is buggy and have stolen the last lines of your post

 

same for my post

 

that makes impossible to post propper scripts

 

in addition was it very late in europe and i had to sleep

Edited by ZAZ

Share this post


Link to post
Share on other sites
midou35000

So can you now?

Share this post


Link to post
Share on other sites
ZAZ

So can you now?

ok, looks good now

please post your current script

in code tags please

Share this post


Link to post
Share on other sites
midou35000

ZAZ how do i post in code tags?

Share this post


Link to post
Share on other sites
ZAZ

tags are keywords in container

forums uses BBcode, keywords in square brackets: [keyword]text[/keyword]

 

you can see the keywords in square brackets, when you switch the messenger to source text mode

then you can type the keywords in container manual or by copy and paste

 

you can click to the icons when you switch to formated text, then the messenger opens a window to insert the text and put the text in keywords container automaticly

 

click to code format icon and paste the script

 

7cnRGYd.jpg

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.


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