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

[SA] ~ CLEO Script Tutorial ~


ZAZ
 Share

Recommended Posts

 

04C4: create_coordinate [email protected] [email protected] [email protected] from_actor [email protected] offset 0.0 0.0  1.2095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 1.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 3.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 5.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red

 

 

 

I still don't get it dontgetit.gif ! Can you make a example , a scrip can make all ped dead (like blow up all car cheat ) biggrin.gif plz

first tell me to which template belongs your question "when I wanna affect to some ped , I use some opcode like "0321: kill_actor [email protected]" , "0332: set_actor [email protected] bleeding 1" ,..."

and post your current script

Link to comment
Share on other sites

123iamking

 

 

04C4: create_coordinate [email protected] [email protected] [email protected] from_actor [email protected] offset 0.0 0.0  1.2095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 1.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 3.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red 095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 5.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red

 

 

 

I still don't get it dontgetit.gif ! Can you make a example , a scrip can make all ped dead (like blow up all car cheat ) biggrin.gif plz

first tell me to which template belongs your question "when I wanna affect to some ped , I use some opcode like "0321: kill_actor [email protected]" , "0332: set_actor [email protected] bleeding 1" ,..."

and post your current script

 

:await 0if Player.Defined($PLAYER_CHAR)jf @aif and0AB0: key_pressed 90AB0: key_pressed 76jf @await [email protected] = -104C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0//073F: get_actor_in_sphere [email protected] [email protected] [email protected] radius 50.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as [email protected]: get_actor_in_sphere [email protected] [email protected] [email protected] radius 50.0 handle_as [email protected] not [email protected] == -1jf @a04ED: load_animation "BSKTBALL" if80DF:   NOT actor $PLAYER_ACTOR drivingjf @c :bwait 0if04EE:   animation "BSKTBALL" loadedjf @b      0639: AS_actor $PLAYER_ACTOR rotate_to_actor [email protected]: actor $PLAYER_ACTOR perform_animation_sequence "BBALL_DEF_LOOP" IFP_file "BSKTBALL" 4.0 loop 0 0 0 0 time 2000 // [email protected] = Marker.CreateAboveActor([email protected]) wait 2000:cwait 0if0AB0: key_pressed 76jf @c083C: set_actor [email protected] velocity_in_direction_XYZ 0.0 0.0 25.0wait 2000:dwait 0 if0118:   actor [email protected] deadjf @cMarker.Disable([email protected])Actor.RemoveReferences([email protected])04EF: release_animation "BSKTBALL"jump @a 

 

 

 

this is my current mod , and instead of levitating ONE person , I wanna levitate ALL people I can see sly.gif

Edited by 123iamking
Link to comment
Share on other sites

 

this is my current mod , and instead of levitating ONE person , I wanna levitate ALL people I can see  sly.gif

It needs to shift the actors in arrays

 

{$CLEO .cs}:123iamking03A4: name_thread 'A':await 0ifPlayer.Defined($PLAYER_CHAR)jf @aif and0AB0: key_pressed 9//  tab key0AB0: key_pressed 76//  l keyjf @a0006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = -10006: [email protected] = 0:a_1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @l03F0: enable_text_draw 1045A: draw_text_1number 100.0 50.0 GXT 'NUMBER' number [email protected]  // ~1~if12 > [email protected] @a_304C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 08E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 50.0 handle_as [email protected]([email protected],16i)wait 50ifnot [email protected]([email protected],16i) == -1jf @[email protected]([email protected],16i) = Marker.CreateAboveActor([email protected]([email protected],16i))[email protected] += 1jump @a_1:[email protected] = 004ED: load_animation "BSKTBALL":bwait 0if04EE:   animation "BSKTBALL" loadedjf @b     0639: AS_actor $PLAYER_ACTOR rotate_to_actor [email protected]([email protected],16i)wait 10000605: actor $PLAYER_ACTOR perform_animation_sequence "BBALL_DEF_LOOP" IFP_file "BSKTBALL" 4.0 loop 0 0 0 0 time 2000 // versionA:cwait 0ifPlayer.Defined($PLAYER_CHAR)jf @j03F0: enable_text_draw 1045A: draw_text_1number 100.0 100.0 GXT 'NUMBER' number [email protected]  // ~1~if12 > [email protected] @fif   not [email protected]([email protected],16i) == -1 jf @eif8118: not actor [email protected]([email protected],16i) deadjf @d04C4: create_coordinate [email protected] [email protected] [email protected] from_actor [email protected]([email protected],16i) offset 0.0 0.0  1.2095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 1.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 3.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//red095C: create_smoke_at [email protected] [email protected] [email protected] velocity 0.0 0.0 5.0 RGBA 1.0 0.0  0.0  1.0 size 0.5 last_factor 0.1//redjump @e:dActor.RemoveReferences([email protected]([email protected],16i))Marker.Disable([email protected]([email protected],16i))[email protected]([email protected],16i) = -1:[email protected] += 1if0AB0: key_pressed 76//  l keyjf @cjump @h:[email protected] = 0jump @c:gwait 0ifPlayer.Defined($PLAYER_CHAR)jf @j03F0: enable_text_draw 1045A: draw_text_1number 100.0 150.0 GXT 'NUMBER' number [email protected]  // ~1~if12 > [email protected] @Jif   not [email protected]([email protected],16i) == -1 jf @hif8118: not actor [email protected]([email protected],16i) deadjf @hif8449: not  actor [email protected]([email protected],16i) in_a_carjf @h083C: set_actor [email protected]([email protected],16i) velocity_in_direction_XYZ 0.0 0.0 25.0wait 0083C: set_actor [email protected]([email protected],16i) velocity_in_direction_XYZ 0.0 0.0 25.0:[email protected] += 1jump @g:jwait 25004EF: release_animation "BSKTBALL":[email protected] = 0 :mwait 003F0: enable_text_draw 1045A: draw_text_1number 100.0 200.0 GXT 'NUMBER' number [email protected]  // ~1~ if 12 > [email protected] jf @aif   not [email protected]([email protected],16i) == -1 jf @n  Marker.Disable([email protected]([email protected],16i))Actor.RemoveReferences([email protected]([email protected],16i)) :[email protected] += 1 jump @m

 

Link to comment
Share on other sites

geiv.tomco

Hello! How can I get the handle of an actor who is attacking the player?

Link to comment
Share on other sites

Read dword from $PLAYER_ACTOR's CPed +0x764, and then convert it to handle (it's a struct). It should do the trick.

Link to comment
Share on other sites

geiv.tomco
Read dword from $PLAYER_ACTOR's CPed +0x764, and then convert it to handle (it's a struct). It should do the trick.

thanks smile.gif That worked smile.gif

Link to comment
Share on other sites

Attach_particle "" to actor bone

The supportive opcode 0883: changes the attachment of opcode 0669: from actor center to a bone

ceedj figured out the bone values and made a list

 

066A: [email protected] = attach_particle "flamethrower" to_actor $PLAYER_ACTOR with_offset 0.0  0.0  0.0 rotation 0.0  13.0  0.0 flag 1  0883: attach_particle [email protected] to_actor $PLAYER_ACTOR mode <?>Attach Particle To Actor Flag:0 - Root 11 - Root 22 - Spine 13 - Spine 24 - Neck5 - Head6 - Head 27 - Head 38 - Head 4 (2,3, 4 - eyes or brow maybe?)21 - Chest Area22 - Right Shoulder23 - Right Elbow24 - Right Wrist25 - Right Hand26 - Right Hand/Finger?31 - Chest Area32 - Left Shoulder33 - Left Elbow34 - Left Wrist35 - Left Hand36 - Left Hand/Finger?41 - Left Hip42 - Left Knee43 - Left Heel44 - Left Foot51 - Right Hip52 - Right Knee53 - Right Heel54 - Right Foot

 

 

opcode 066A: supports rotation parameter which allows to give the particle a direction

This requires an effect which moves in a direction like the "flamethrower"

Attached to bones show the particles moving in different direction

because the bones have different oriention of it's x,y,z-axis in relation to the actor center

Watch to the results by using the testscript below

The flamethrower moves allways to offset 13.0 of Y direction of the bone

The script starts with 0 - Root 1 and add 1 after key_press for the bone value till 60

 

 

{$CLEO .cs}:Flamethrower_at_Actor_bone03A4: name_thread 'FLAMEPB'[email protected] = 0:FLAMEPB_010001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @FLAMEPB_01if0AB0:   key_pressed 8//-----------------------press Backspace004D: jump_if_false @FLAMEPB_01066A: [email protected] = attach_particle "flamethrower" to_actor $PLAYER_ACTOR with_offset 0.0  0.0  0.0 rotation 0.0  13.0  0.0 flag 1  0883: attach_particle [email protected] to_actor $PLAYER_ACTOR mode [email protected]: make_particle [email protected] visible0001: wait  1000 ms:FLAMEPB_030001: wait  0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @FLAMEPB_0303F0: enable_text_draw 1045A: text_draw_1number  250.0  80.0 'NUMBER' [email protected]    // valueif0AB0:   key_pressed 8//-----------------------press Backspace004D: jump_if_false @FLAMEPB_030976: destroy_particle [email protected]  0001: wait  500 [email protected] += [email protected] > 60004D: jump_if_false @[email protected] = 00002: jump @FLAMEPB_01

 

Link to comment
Share on other sites

  • 3 weeks later...

This is really confusing, can somebody explain something to me?

 

What exactly are these things and how do people find out what they do? Is there a list somewhere? I'm sure im missing something!

 

(04E4: unknown_refresh_game_renderer_at 1126.3 -2037.1)

 

I mean how am I supposed to know what that does? Its not just that its everything!

Link to comment
Share on other sites

At first, it isn't unknown since ages. Update your sascm.ini from GTAG Opcode Database.

Link to comment
Share on other sites

pringston2010
Good job! thanks for tutorial need a tutorial for make a cleo teleport in spheres.

 

Hi , again... need a codding with me scm how to make with start my sa with the mpack in the screen view a text

Good job! thanks for tutorial need a tutorial for make a cleo teleport in spheres.

 

Hi , again... need a codding with me scm how to make with start my sa with the mpack in the screen view a text

Link to comment
Share on other sites

 

This is really confusing, can somebody explain something to me?

 

What exactly are these things and how do people find out what they do? Is there a list somewhere? I'm sure im missing something!

 

(04E4: unknown_refresh_game_renderer_at 1126.3 -2037.1)

 

I mean how am I supposed to know what that does? Its not just that its everything!

 

 

Good job! thanks for tutorial need a tutorial for make a cleo teleport in spheres.

Hi , again... need a codding with me scm how to make with start my sa with the mpack in the screen view a text

 

It's hard to understand for beginners because their are a lot of codes.

Newbies need praxis by writing tiny simple scripts.

They should read and understand the first chapter of this tutorial.

Also important is to learn for yourself how to find informations in forum topics, with Google, in main.scm, in Sannybuilder HELP, etc....

 

If you search for any code which you need for your idea

then think about when it happens in SA Story and

then look in main.scm for examples of opcodes or methods

 

Fourthermore can you find all opcodes in sascm.ini but in ini-format

sascm.ini is the file which use sannybuilder for (de)compilation,

to translate codes in codelines with description.

Find sascm.ini in Sannybuilder install dir\data\sa\sascm.ini

Find links for more opcode-databases at the end of this tutorial INDEX

 

 

jaky2008 @:

 

04E4: unknown_refresh_game_renderer_at 1126.3 -2037.1

 

supports the game rendering by player location change

the opcode description means, it's unknown because it's not really shure what it does

This opcode is used in the start codes of main.scm as well in scripts to teleport player into interior

Teleport into interior

 

 

pringston2010 @:

Dutchy3010 made a detailed descritiption of the text-opcodes in her generell mission coding tut

You can use GXT entries of american.gxt as well of any-custom.fxt in the script.

Read here about Create a FXT file to show your own text message

 

 

Edited by ZAZ
Link to comment
Share on other sites

pringston2010
This is really confusing, can somebody explain something to me?

 

What exactly are these things and how do people find out what they do? Is there a list somewhere? I'm sure im missing something!

 

(04E4: unknown_refresh_game_renderer_at 1126.3 -2037.1)

 

I mean how am I supposed to know what that does? Its not just that its everything!

 

 

Good job! thanks for tutorial need a tutorial for make a cleo teleport in spheres.

Hi , again... need a codding with me scm how to make with start my sa with the mpack in the screen view a text

 

It's hard to understand for beginners because their are a lot of codes.

Newbies need praxis by writing tiny simple scripts.

They should read and understand the first chapter of this tutorial.

Also important is to learn for yourself how to find informations in forum topics, with Google, in main.scm, in Sannybuilder HELP, etc....

 

If you search for any code which you need for your idea

then think about when it happens in SA Story and

then look in main.scm for examples of opcodes or methods

 

Fourthermore can you find all opcodes in sascm.ini but in ini-format

sascm.ini is the file which use sannybuilder for (de)compilation,

to translate codes in codelines with description.

Find sascm.ini in Sannybuilder install dir\data\sa\sascm.ini

Find links for more opcode-databases at the end of this tutorial INDEX

 

 

jaky2008 @:

 

04E4: unknown_refresh_game_renderer_at 1126.3 -2037.1

 

supports the game rendering by player location change

the opcode description means, it's unknown because it's not really shure what it does

This opcode is used in the start codes of main.scm as well in scripts to teleport player into interior

Teleport into interior

 

 

pringston2010 @:

Dutchy3010 made a detailed descritiption of the text-opcodes in her generell mission coding tut

You can use GXT entries of american.gxt as well of any-custom.fxt in the script.

Read here about Create a FXT file to show your own text message

Yes i view the topic of dutchi3010

 

and no comprend.

 

need a with gxt editor open and open me american.gxt and create entry.

 

and later edit this line

 

00BC: show_text_highpriority GXT 'MTIME3' time 3000 flag 1

 

With ej

 

00BC: show_text_highpriority GXT 'CARL_JONHSON' time 3000 flag 1

 

Need a entry in a gxt editor?

Link to comment
Share on other sites

 

This is really confusing, can somebody explain something to me?

 

What exactly are these things and how do people find out what they do? Is there a list somewhere? I'm sure im missing something!

 

(04E4: unknown_refresh_game_renderer_at 1126.3 -2037.1)

 

I mean how am I supposed to know what that does? Its not just that its everything!

 

 

Good job! thanks for tutorial need a tutorial for make a cleo teleport in spheres.

Hi , again... need a codding with me scm how to make with start my sa with the mpack in the screen view a text

 

It's hard to understand for beginners because their are a lot of codes.

Newbies need praxis by writing tiny simple scripts.

They should read and understand the first chapter of this tutorial.

Also important is to learn for yourself how to find informations in forum topics, with Google, in main.scm, in Sannybuilder HELP, etc....

 

If you search for any code which you need for your idea

then think about when it happens in SA Story and

then look in main.scm for examples of opcodes or methods

 

Fourthermore can you find all opcodes in sascm.ini but in ini-format

sascm.ini is the file which use sannybuilder for (de)compilation,

to translate codes in codelines with description.

Find sascm.ini in Sannybuilder install dir\data\sa\sascm.ini

Find links for more opcode-databases at the end of this tutorial INDEX

 

 

jaky2008 @:

 

04E4: unknown_refresh_game_renderer_at 1126.3 -2037.1

 

supports the game rendering by player location change

the opcode description means, it's unknown because it's not really shure what it does

This opcode is used in the start codes of main.scm as well in scripts to teleport player into interior

Teleport into interior

 

 

pringston2010 @:

Dutchy3010 made a detailed descritiption of the text-opcodes in her generell mission coding tut

You can use GXT entries of american.gxt as well of any-custom.fxt in the script.

Read here about Create a FXT file to show your own text message

Yes i view the topic of dutchi3010

 

and no comprend.

 

need a with gxt editor open and open me american.gxt and create entry.

 

and later edit this line

 

00BC: show_text_highpriority GXT 'MTIME3' time 3000 flag 1

 

With ej

 

00BC: show_text_highpriority GXT 'CARL_JONHSON' time 3000 flag 1

 

Need a entry in a gxt editor?

You should read and not overfly!

I also gave a link to "Create a FXT file" and i wrote that a gxt- entry can have max. 7 charackters.

 

Ok, i try it again.

 

GXT file

The scripts use gxt entries to show text

The american.gxt have several chapters and includes gxt entries as well as the text which should be shown.

The german.gxt have also chapters and includes the same gxt entries as well as german text to show

 

The gxt files are not textbased, it needs to decompile, hack or translate the content

Use a gxt editor to edit the content of gxt files

 

GXT Editor

download and install X GXT Editor made by xmen

then open american.gxt

It shows 2 windows

The first window shows the overview of the chapters. We call the chapters tables.

 

GXT Content

The first table is the main table which includes the general messages

The other tables are mission tables which include the mission messages

 

click on the main table to view the general gxt entries and the textmessages

sort the the content of the second window by names

use search funktion and search for VO_AF, select Option: Item's name

You should find this line:

 

VO_AF   ~z~Grove Street - Home.

 

Use the gxt entry VO_AF to show the textmessage "Grove Street - Home."

try the script below

 

{$CLEO .cs}:DEMOTEXT03A4: name_thread "DEMO":DEMOTEXT_1wait 0if0256:   player $PLAYER_CHAR defined 004D: jump_if_false @DEMOTEXT_100BA: text_styled 'VO_AF'  30000 ms  10A93: end_custom_thread

 

 

Mission Tables

Click on the table "CAT" to view the gxt entries and the textmessages of Catalina missions

At this time it needs to give the mission table name to show a text with this code: 054C: use_GXT_table 'CAT'

try the script below

 

{$CLEO .cs}:DEMOTEXT03A4: name_thread "DEMO":DEMOTEXT_1wait 0if0256:   player $PLAYER_CHAR defined 004D: jump_if_false @DEMOTEXT_1054C: use_GXT_table 'CAT'00BA: text_styled 'CATX_VK'  30000 ms  10A93: end_custom_thread

 

 

GXT -Textdocument: GTASA.text

Open GTASA.text to find gxt entries of a translated textfile, if you only want to show messages of gxt file

Find GTASA.text in Sannybuilder install directory, in subfolder help\GXT Strings

Sanny Builder 3\help\GXT Strings\GTASA.text

It's content looks like that:

 

 

[MAIN]

 

10LS  // Los Santos

10LS2  // Los Santos

10LS3  // Los Santos

10LS4  // Los Santos

10LS5  // Los Santos

10OG  // O.G.

10WEED  // Weed

10_R_20  // ~z~10 or 20

11DICE  // Dice

11DICE2  // Dice

11GGIFT  // Gods Gift

11GROV2  // Grove

[Table name]

 

GXT Entry // textmessage

 

 

 

FXT file

GXT means Gta Text, FXT means Fake Text

The FXT files are textbased and can be edited with simple texteditor(notepad.exe)

The FXT files requires the cleo library and the GXTHOOK.cleo in cleo folder to work.

It doesn't need to registrate a FXT file in any way

Cleo loads the content of a FXT file if it exist in Cleo\CLEO_TEXT folder

 

To create a fxt file needs to insert an entry name for the script and the real text to show, in a normal txt file

Then rename the file by chaning the extension from .txt into .fxt

Or create it directly with Sannybuilder and save it as .fxt , choose Any file (*.*) as extension

 

Entry name for the script and the real text to show must be done in this way:

<Entryname><space><text message>

only 1 space between Entryname and text message

Important:

only 1 space between words of the text message are allowed and NO space at the end

Maximum 7 symbols as entry name are allowed

 

Exemble:

Copy this line into a blanc page and save it as anyname.fxt

 

TXT_01 This is text of Cleo fxt file

 

Then use the script below to show the text

 

{$CLEO .cs}:DEMOTEXT03A4: name_thread "DEMO":DEMOTEXT_1wait 0if0256:   player $PLAYER_CHAR defined 004D: jump_if_false @DEMOTEXT_100BA: text_styled 'TXT_01'  30000 ms  10A93: end_custom_thread

 

 

 

Edited by ZAZ
Link to comment
Share on other sites

  • 2 weeks later...

how can I make $player_actor invisible? no, this is not a request, I'm asking because the opcode 0337: doesn't work with $player_actor, is only working for peds.

 

I only want to hide the $player_actor, I want to be able to move the mouse around the new ped, created next to the player.

 

something like;

 

{$CLEO}0000:while trueif and0AB0:  key_pressed 0x8 //backspace0AB0:  key_pressed 0x9 //tabthen   0ACA: show_text_box "ON"   Actor.LockInCurrentPosition($PLAYER_ACTOR) = True   0337: set_actor $PLAYER_ACTOR visibility 0       ////// this opcode doesn't work   #BMOST.Load      while not #BMOST.Available    wait 0   end    04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.9 0.0   009A: [email protected] = create_actor_pedtype 4 model #BMOST at [email protected] [email protected] [email protected]    0249: release_model #BMOST    wait 2000      while true   if and       0AB0:  key_pressed 0x8       0AB0:  key_pressed 0x9   then       009B: destroy_actor [email protected]        Actor.LockInCurrentPosition($PLAYER_ACTOR) = False       0337: set_actor $PLAYER_ACTOR visibility 1        break   end    wait 0   endendwait 0end

 

 

thanks for help!

Link to comment
Share on other sites

 

how can I make $player_actor invisible? no, this is not a request, I'm asking because the opcode 0337: doesn't work with $player_actor, is only working for peds.

 

I only want to hide the $player_actor, I want to be able to move the mouse around the new ped, created next to the player.

 

 

 

thanks for help!

yes, the unvisible opcode works for the player just partialy

with bodypart codes I can only make head and torso unvisible

just put player 5m above or below of the actor or of cam position and make his col to 0, so nobody can see him while cam mode

Link to comment
Share on other sites

 

**

Just use 09C7 and use an empty model.

Edited by BnB
Link to comment
Share on other sites

thanks for answer...

@Zaz

yes, I tried but the camera is always around $player_actor. So, doesn't looks as should be, and sometimes you look below the ground or too high above.

 

@BnB

I also thought in that, but sometimes I got a bug with that opcode. the player deforms confused.gif

 

 

Is there any way to put the camera on other actors? with mouse movement?

 

I did a script for camera movement, but it needs 5 variables, and I have no longer more variables. (in other script)

I don't know if this is the "better" way to do something like this, but this script is working... wink.gif

 

 

{$CLEO}0000:while trueif and0AB0:  key_pressed 0x8 // backspace0AB0:  key_pressed 0x9 // tabthen   0ACA: show_text_box "ON"   wait 1000   01B4: set_player $PLAYER_CHAR can_move 0    [email protected] = 360.0   [email protected] = 5.4   [email protected] = 1.85           while true   if   0AB0:  key_pressed 74   // J  - left   then       000B: [email protected] += 3.0       if       [email protected] > 360.0       then           [email protected] = 0.0       end   end   if   0AB0:  key_pressed 75   // K  - right   then       000B: [email protected] += -3.0       if       0.0 > [email protected]       then           [email protected] = 360.0       end   end   if   0AB0:  key_pressed 79   // O - zoom out   then       000B: [email protected] += 0.15       if       [email protected] > 7.0       then           [email protected] = 7.0       end   end   if   0AB0:  key_pressed 76   // L - zoom in   then       000B: [email protected] += -0.15       if       2.0 > [email protected]       then           [email protected] = 2.0       end   end   if   0AB0:  key_pressed 85  // U - up   then       000B: [email protected] += 0.1       if       [email protected] > 2.2       then           [email protected] = 2.2       end   end   if   0AB0:  key_pressed 73   // I - down   then       000B: [email protected] += -0.1       if       0.5 > [email protected]       then           [email protected] = 0.5       end   end   02F6: [email protected] = sine [email protected]   02F7: [email protected] = cosine [email protected]   0013: [email protected] *= [email protected]    0013: [email protected] *= [email protected]    067E: put_camera_on_actor $PLAYER_ACTOR with_offset [email protected] [email protected] [email protected] point_to_actor $PLAYER_ACTOR 0.0 mode 2    //067C: put_camera_on_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 0.7 rotation 0.0 3.0 0.75 0.0 2    if and   0AB0:  key_pressed 0x8   0AB0:  key_pressed 0x9   then       Camera.Restore()       Camera.Restore_WithJumpCut()       01B4: set_player $PLAYER_CHAR can_move 1        0ACA: show_text_box "OFF"       break   end    wait 0   end   wait 1000endwait 0end

 

 

controls:

J - left

K - right

O - zoom out

L - zoom in

U - up

I - down

 

thanks! icon14.gif

Edited by jayd00
Link to comment
Share on other sites

 

thanks for answer...

@Zaz

yes, I tried but the camera is always around $player_actor. So, doesn't looks as should be, and sometimes you look below the ground or too high above.

 

 

Why attaching cam to player?

You wrote about a second ped, attach cam to ped

 

I want to be able to move the mouse around the new ped, created next to the player.

check out my Free Moving Camera

it attach the cam to a ped using this cam code:

 

067C: put_camera_on_actor [email protected] with_offset 0.0 0.3 0.5 rotation 0.0 0.5 [email protected] 0.0 2first 3param(x,y,z)-camposition, second3param(x,y,z)camtarget, last 2param: angle, modex,y,z is in relation to actor center

 

and the user can move the ped

 

or just use your 067E: and insert the pedhandle

Link to comment
Share on other sites

hoo, I see now... nice trick. Thanks!

 

and what about to attach actor to actor?..

I did it, but I have a bug, the actor attached, is shaking while moving.

 

with this opcode;

 

069B: attach_object [email protected] to_actor $PLAYER_ACTOR with_offset -0.088 0.29 0.3 rotation 0.0 0.0 0.0 

 

there is no problem, but the attached object doesn't move with actor when him is running or crouching, because the object isn't attached to the bones.

 

but if I use this opcode;

 

070A: AS_actor [email protected] attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 1 

 

the object is attached to the bone, but the actor into turret is shaking, something like the actor attached is left behind a little bit.

 

I also tried with ryosuke function, to attach objects, but I got the same bug as the opcode 070A:

and I need to fix the shaking actor, becasue this $actor will be something like wings for my mod.

 

 

{$CLEO}0000:while trueif    Player.Defined(0) // $PLAYER_CHAR == 0then   if   044B:   actor $PLAYER_ACTOR on_foot    then       if and       00E1:   player 0 pressed_key 4 // action       00E1:   player 0 pressed_key 11 // conversation yes       then           if and           856D:   not actor [email protected] defined            83CA:   not object [email protected] exists            then               023C: load_special_actor 'CLAUDE' as 6 // models 290-299                0247: load_model 1582                038B: load_requested_models                               while true                if and               823D:   not special_actor 6 loaded                8248:   not model 1582 available                jf break                wait 0               end               0172: [email protected] = actor $PLAYER_ACTOR Z_angle               04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -18.6                009A: [email protected] = create_actor_pedtype 8 model #SPECIAL06 at [email protected] [email protected] [email protected]                02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1                0619: enable_actor [email protected] collision_detection 0                0489: set_actor [email protected] muted 1                0296: unload_special_actor 6                       0107: [email protected] = create_object 1582 at [email protected] [email protected] -25.0                0382: set_object [email protected] collision_detection 0                04D9: object [email protected] set_scripted_collision_check 0                08D2: object [email protected] scale_model 0.01                0177: set_object [email protected] Z_angle_to [email protected]                0249: release_model 1582                       0177: set_object [email protected] Z_angle_to [email protected]                04F4: put_actor [email protected] into_turret_on_object [email protected] offset_from_object_origin 0.0 0.0 -0.5 orientation 0 both_side_angle_limit 0.0 lock_weapon 1                wait 500           else               009B: destroy_actor [email protected]                0108: destroy_object [email protected]               wait 500           end       end       if and       056D:   actor [email protected] defined        03CA:   object [email protected] exists        then           0172: [email protected] = actor $PLAYER_ACTOR Z_angle           0AB1: call_scm_func @ATEST_ATTACH 6 AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 -1.0 0.0 on_bone 17           0177: set_object [email protected] Z_angle_to [email protected]        end       else       if       00DF:   actor $PLAYER_ACTOR driving        then           if and           056D:   actor [email protected] defined            03CA:   object [email protected] exists            then               009B: destroy_actor [email protected]                0108: destroy_object [email protected]           end           end           endelse   if and   056D:   actor [email protected] defined    03CA:   object [email protected] exists    then       009B: destroy_actor [email protected]        0108: destroy_object [email protected]   end    endwait 0end:ATEST_ATTACH0A9F: [email protected] = current_thread_pointer000A: [email protected] += 0x44 0A96: [email protected] = actor [email protected] struct0085: [email protected] = [email protected] // (int) 000A: [email protected] += 0x18 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AA7: call_function 0x734A40 num_params 1 pop 1 [email protected] [email protected] // _clumpGetFirstSkinAtomicHAnimHierarchy0012: [email protected] *= 0x4000A: [email protected] += 0x488 005A: [email protected] += [email protected] // (int) 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0000A: [email protected] += 0x140A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00A8D: [email protected] = read_memory 0x7C51E0 size 4 virtual_protect 1 00D6: if 0039: [email protected] == 0x0424548B jf @ATEST_ATTACH_10AA7: call_function 0x7C51E0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex0AA7: call_function 0x7C5160 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray0012: [email protected] *= 0x40005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDDD0 num_params 4 pop 4 [email protected] 1 [email protected] [email protected] @ATEST_ATTACH_2:ATEST_ATTACH_10AA7: call_function 0x7C51A0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex0AA7: call_function 0x7C5120 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray0012: [email protected] *= 0x40005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDD90 num_params 4 pop 4 [email protected] 1 [email protected] [email protected]:ATEST_ATTACH_20177: set_object [email protected] Z_angle_to 0.0 0A98: [email protected] = object [email protected] struct000A: [email protected] += 0x140A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0000A: [email protected] += -0x140AA6: call_method 0x411990 struct [email protected] num_params 0 pop 0 // sub_4119900AA6: call_method 0x59AD20 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo0AA6: call_method 0x4241C0 struct [email protected] num_params 1 pop 0 [email protected] // sub_4241C0000A: [email protected] += 0x180A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0if8039:   not  [email protected] == 0jf @ATEST_ATTACH_3 000A: [email protected] += 0x40A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0000A: [email protected] += 0x100AA6: call_method 0x59AD70 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo:ATEST_ATTACH_3000A: [email protected] += -0x180AA6: call_method 0x532B00 struct [email protected] num_params 0 pop 0 // _RwFrameUpdateObject0AB2: ret 0

 

 

thanks for help! wink.gif

Edited by jayd00
Link to comment
Share on other sites

and what about to attach actor to actor?..

I did it, but I have a bug, the actor attached, is shaking while moving.

 

...becasue this $actor will be something like wings for my mod.

So it's another situation now

Please describe your plan

 

you wanna attach a modactor to player and now you need to imitate the default playercam while player isn't visible?

 

It's not possible to imitate the default playercam and keep the default player controling

but it's possible to do it partialy which could be fine for that mod

 

Try the script below, it attaches object to player and actor to object

the cam to player with 067C:

opcode 0A4A: to set playerangle to steer with mousemove and move with forward button

 

{$CLEO .cs}:Mod_Actor_Overlay_Camthread 'ALAYCAM' :ALAYCAM_11wait 0 if 0256:   player $PLAYER_CHAR definedjf @ALAYCAM_11 if and0AB0:   key_pressed 48//-- 0 (zero) 0AB0:   key_pressed 8//--Backspace jf @ALAYCAM_11 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0 0992: set_player $PLAYER_CHAR weapons_scrollable 0 0247: load_model #wmoice 0247: load_model 3045:ALAYCAM_14wait 0 if and0248:   model #wmoice available0248:   model 3045 availablejf @ALAYCAM_14 :ALAYCAM_15wait 0 84EE:   not animation "PARACHUTE" loaded jf @ALAYCAM_17 04ED: load_animation "PARACHUTE" jump @ALAYCAM_15 :ALAYCAM_17009A: [email protected] = create_actor_pedtype 24 model #wmoice at 100.5 10.5 10.5 0107: [email protected] = create_object 3045 at 100.5 10.5 100.5 0223: set_actor [email protected] health_to 2000 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 10619: enable_actor [email protected] collision_detection 0 0249: release_model #wmoice069B: attach_object [email protected] to_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.5 rotation 0.0 0.0 0.0 04F4: put_actor [email protected] into_turret_on_object [email protected] offset_from_object_origin 0.0 2.0 0.5 orientation 0 both_side_angle_limit 0.0 lock_weapon 0 0812: AS_actor [email protected] perform_animation "FALL_SKYDIVE" IFP_file "PARACHUTE" 4.0 loopA 1 lockX 1 lockY 1 lockF 0 time -2 // versionB [email protected] = -1.0 [email protected] = 0.4 [email protected] = 0 :ALAYCAM_50wait 0 if 0256:   player $PLAYER_CHAR definedjf @ALAYCAM_80 if 80E1:   not player 0 pressed_key 15 jf @ALAYCAM_80 0A4A: store_joystick_X_offset_to [email protected] Y_offset_to [email protected] 0172: [email protected] = actor $PLAYER_ACTOR Z_angle 0063: [email protected] -= [email protected]  // floating-point values0173: set_actor $PLAYER_ACTOR Z_angle_to [email protected] or0611:  actor $PLAYER_ACTOR animation == "WEAPON_crouch"0611:  actor $PLAYER_ACTOR animation == "RIFLE_crouchfire"jf @ALAYCAM_53 if  [email protected] == 0 jf @ALAYCAM_55 069B: attach_object [email protected] to_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0 rotation 0.0 0.0 0.0 [email protected] = 1 jump @ALAYCAM_55 :ALAYCAM_53if  [email protected] == 1 jf @ALAYCAM_55 069B: attach_object [email protected] to_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.5 rotation 0.0 0.0 0.0 [email protected] = 0 jump @ALAYCAM_55 :ALAYCAM_55if  [email protected] == 0 jf @ALAYCAM_70 if or [email protected] > 1.0  [email protected] > 0.0 jf @ALAYCAM_60 [email protected] /= 200.0 005B: [email protected] += [email protected] // (float) :ALAYCAM_60067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 0.5 1.5 rotation 0.0 1.5 [email protected] 0.0 2 jump @ALAYCAM_50 :ALAYCAM_70067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 0.5 0.0 rotation 0.0 1.5 0.0 0.0 2 jump @ALAYCAM_50 :ALAYCAM_80009B: destroy_actor [email protected]: destroy_object [email protected]: set_player $PLAYER_CHAR weapons_scrollable 1 0373: set_camera_directly_behind_player 02EB: restore_camera_with_jumpcutjump @ALAYCAM_11 

 

Link to comment
Share on other sites

 

Please describe your plan

you wanna attach a modactor to player and now you need to imitate the default playercam while player isn't visible?

 

blush.gif sorry, I didn't explained too much, the moving camera is for another script, thanks for your advices... thats really an interesting script, is usefull for me wink.gif

 

well, I'm making wings for the $player, the new actor in the object, will be the wings of $palyer, due the animations... (wings moving)

I have the models and everything, but I got a bug with the attach_object, as I said before.

 

when I attach the object to one bone, the new actor(wings) in the object is shaking when the $player walk or run or is moving.

 

there is no problem in the script, I already did it.

I only have problems with the attach part.

Because the new actor shakes, or is left behind when the $player is moving.

 

If I attach the object with the 069B there is no problem, the actor didn't shakes. But the actor(wings) is static, I meant doesn't move with the back, when actor is running or walking, is only following the $player.

 

 

thanks for help cookie.gifcookie.gif

Link to comment
Share on other sites

RelatedAbyss

I'm slightly confused, but all I want to know is can I put "driving_leviathn" instead of "driving_heli" because I want to slightly change a mod I downloaded. (leviathn referring to the gta3.img name for the leviathan.)

Link to comment
Share on other sites

I'm slightly confused, but all I want to know is can I put "driving_leviathn" instead of "driving_heli" because I want to slightly change a mod I downloaded. (leviathn referring to the gta3.img name for the leviathan.)

this should help, there is positive condition and negative

 

00DD:   actor $PLAYER_ACTOR driving_car_with_model #LEVIATHN80DD:   not actor $PLAYER_ACTOR driving_car_with_model #LEVIATHN 

 

 

only remember to use the opcode search wink.gif

Link to comment
Share on other sites

Hello. I have a problem with this code, the game crash after loading the game.

 

//health bar 0007: [email protected] = 400.0    0AC7: [email protected] = var [email protected] offset0A8C: write_memory 0x58EE66 size 4 value [email protected] virtual_protect 1

 

 

I am writing this code in main.scm.

Edited by juarez
Link to comment
Share on other sites

 

Hello. I have a problem with this code, the game crash after loading the game.

 

//health bar 0007: [email protected] = 400.0    0AC7: [email protected] = var [email protected] offset0A8C: write_memory 0x58EE66 size 4 value [email protected] virtual_protect 1

 

 

I am writing this code in main.scm.

yo man, you add code into main.scm and now the game crash because you added code into main.scm

why did you do that?

it's a cleo script tutorial, show me your cleo script

what's the function of the memadress?

Edited by ZAZ
Link to comment
Share on other sites

Okay I gave to CLEO and added 2 bytes. I wanted to move the weapon Icon to another place, but after calling and changing the float in the [email protected] icon is in the same place.

 

{$CLEO}0000: [email protected] = 32.0 0AC7: [email protected] = var [email protected] [email protected] *= 0x90900A8C: write_memory 0x58F91C    size 6 value [email protected] virtual_protect 1     //weapon icon X0A93: end_custom_thread

 

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