Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Object Model


Rapier
 Share

Recommended Posts

Hello guys! Well, I'm doing a script and is necessary to create an object to create some coordinates from this object. As VC does not have an opcode to let objects invisible, I need the name of the smallest object possible (or some way to make it invisible). Could anyone help me?

 

Thanks!

 

Link to comment
Share on other sites

Tell more about your idea, I believe its possible to do what you want without objects.

Link to comment
Share on other sites

Michael.Knight1
Hello guys! Well, I'm doing a script and is necessary to create an object to create some coordinates from this object. As VC does not have an opcode to let objects invisible, I need the name of the smallest object possible (or some way to make it invisible). Could anyone help me?

 

Thanks!

You don't can put object invisible in gta VC

Link to comment
Share on other sites

@DK22Pac: Well, I'm making a partial conversion of my old mod GTAVC PMM. Take a look at the script:

{$CLEO .S}thread 'FIREBLL'Model.Load(#GRENADE)038B: load_requested_models :LabelFireballif  not Model.Available(#GRENADE)jf @LabelFireball01 wait 0jump @LabelFireball:LabelFireball0104C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 0.0 0.00172: [email protected] = actor $PLAYER_ACTOR z_angle 0107: [email protected] = create_object #GRENADE at [email protected] [email protected] [email protected]: set_object [email protected] collision_detection 0 0177: set_object [email protected] z_angle_to [email protected] 0372: set_actor $PLAYER_ACTOR anim 31 wait_state_time 1000 [email protected] = 0 wait [email protected] = 0  // Contador [email protected] = 1.75  // Offset do ângulo [email protected] = 0  // Flag para destrancar o [email protected] = 0  // Flag de explosãojump @LabelFireball03:LabelFireball02wait 0if and [email protected] > 1000 [email protected] == 0jf @[email protected] = 1Player.CanMove($PLAYER_CHAR) = true:LabelFireball03if [email protected] == 0jf @LabelFireball06 [email protected] += [email protected] += 0.250400: create_coordinate [email protected] [email protected] [email protected] from_object [email protected] offset 0.0 [email protected] 0.0  024F: create_corona 2.0 2.0 2.0 with_color 255 0 0 at_point [email protected] [email protected] [email protected] 0437: scatter_particle 61 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0 if 8339: not objects_in_cube [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 0 1 1 0 0 jf @LabelFireball04 if [email protected] > 499 jf @LabelFireball02 //0006: [email protected] = 10437: scatter_particle 42 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0jump @LabelFireball05:LabelFireball040006: [email protected] = 1020C: create_explosion_with_radius 10 at [email protected] [email protected] [email protected] :LabelFireball05Model.Destroy(#GRENADE)Object.Destroy([email protected])Object.RemoveReferences([email protected]):LabelFireball06 if [email protected] == 1jf @LabelFireball0205DC: end_custom_thread

 

This script creates an energy ball that explodes when it finds vehicles or peds. To create the coordinates of this energy ball I need an object. In SA, this method works perfect because there is an opcode to make the object invisible. I think the only way is to use a very small object.

 

@Michael.Knight1: Dude, that I already know!

Link to comment
Share on other sites

So, why do you need object?

You can do it in this way.

 

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

 

Link to comment
Share on other sites

 

@DK22Pac: That's the way I did years ago, the only problem is that you have to lock the player position to not alter the trajectory of the energy ball. So if you create an object to create the trajectory of the energy ball, you do not need to lock the player, you understand?

Link to comment
Share on other sites

Ok. Then, store actor's matrix (64 bytes) to buffer, and use .exe procedure to get offset from matrix.

Link to comment
Share on other sites

Just need to find RwV3dTransformPoints adress... I haven't Vice's idb and can't download it now (link is broken).

 

constRwV3dTransformPoints = 0x...end// store actor's matrix to buffer - use it when player pressed key to throw ball05E6: [email protected] = actor $PLAYER_ACTOR [email protected] += 405F7: [email protected] = label @matrix offsetfor [email protected] = 0 to 15   05E0: [email protected] = read_memory [email protected] size 4 virtual_protect 0   05DF: write_memory [email protected] size 4 value [email protected] virtual_protect 0   [email protected] += 4   [email protected] += 4end//// get offset from matrix05F8: [email protected] = var [email protected] [email protected] = 0.0 // X offset// [email protected] is Y [email protected] = 0.0 // Z offset05F7: [email protected] = label @matrix offset05E1: call RwV3dTransformPoints num_params 4 pop 4 [email protected] 1 [email protected] [email protected]//:matrixhex00000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 00000000end

 

 

Edit: found it, wait for few mins biggrin.gif

Edited by DK22Pac
Link to comment
Share on other sites

Ok, I'll make that as scm-functions.

 

:getOffsetFromPlayerMatrix{Example:05F5: call_scm_func @getOffsetFromPlayerMatrix params_count 3 ofssets 0.0 [email protected] 0.0 store_to [email protected] [email protected] [email protected]}05F8: [email protected] = var [email protected] offset05F7: [email protected] = label @matrix offset05E1: call 0x647160 num_params 4 pop 4 [email protected] 1 [email protected] [email protected]: ret 3 [email protected] [email protected] [email protected]:storePlayerMatrix{Example:05F5: call_scm_func @storePlayerMatrix params_count 0}05E6: [email protected] = actor $PLAYER_ACTOR [email protected] += 405F7: [email protected] = label @matrix offset05E3: call_method 0x4DF8F0 struct [email protected] num_params 1 pop 0 [email protected]: ret 0:matrixhex00000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 00000000end

 

Edited by DK22Pac
Link to comment
Share on other sites

Put it after

 

05DC: end_custom_thread

 

Link to comment
Share on other sites

Didn't read the whole topic, but if you need the smallest object, you should have a look at #FAKETARGET id 377.

Link to comment
Share on other sites

Also try

 

05E8: [email protected] = object [email protected] [email protected] += 0x5005DF: write_memory [email protected] size 1 value 0 virtual_protect 0 // clear all flags for object

 

Link to comment
Share on other sites

 

Put it after

 

05DC: end_custom_thread

 

Ok, I'll try...

 

@krasiejow: Thank you!

Link to comment
Share on other sites

sh*t, the game crashes... mad.gif What is wrong?

{$CLEO .S}thread 'FIREBLL'05F5: call_scm_func @LabelStorePlayerMatrix params_count [email protected] = 0 wait [email protected] = 0  // Contador [email protected] = 1.75  // Offset do ângulo [email protected] = 0  // Flag para destrancar o [email protected] = 0  // Flag de explosãojump @LabelFireball03:LabelFireball02wait 0if and [email protected] > 1000 [email protected] == 0jf @[email protected] = 1Player.CanMove($PLAYER_CHAR) = true:LabelFireball03if [email protected] == 0jf @LabelFireball06 [email protected] += [email protected] += 0.2505F5: call_scm_func @LabelGetOffSetFromPlayerMatrix params_count 3 offsets 0.0 [email protected] 0.0 store_to [email protected] [email protected] [email protected]: create_corona 2.0 2.0 2.0 with_color 255 0 0 at_point [email protected] [email protected] [email protected] 0437: scatter_particle 61 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0 if 8339: not objects_in_cube [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 0 1 1 0 0 jf @LabelFireball04 if [email protected] > 499 jf @LabelFireball02 //0006: [email protected] = 10437: scatter_particle 42 0.0 at [email protected] [email protected] [email protected] 0.0 0.0 0.0jump @LabelFireball05:LabelFireball040006: [email protected] = 1020C: create_explosion_with_radius 10 at [email protected] [email protected] [email protected] :LabelFireball05Model.Destroy(377)Object.Destroy([email protected])Object.RemoveReferences([email protected]):LabelFireball06 if [email protected] == 1jf @LabelFireball0205DC: end_custom_thread:LabelGetOffSetFromPlayerMatrix{Example:05F5: call_scm_func @GetOffSetFromPlayerMatrix params_count 3 offsets 0.0 [email protected] 0.0 store_to [email protected] [email protected] [email protected]}05F8: [email protected] = var [email protected] offset05F7: [email protected] = label @LabelMatrix offset05E1: call 0x647160 num_params 4 pop 4 [email protected] 1 [email protected] [email protected]: ret 3 [email protected] [email protected] [email protected]:LabelStorePlayerMatrix{Example:05F5: call_scm_func @StorePlayerMatrix params_count 0}05E6: [email protected] = actor $PLAYER_ACTOR [email protected] += 405F7: [email protected] = label @LabelMatrix offset05E3: call_method 0x4DF8F0 struct [email protected] num_params 1 pop 0 [email protected]: ret 0:LabelMatrixhex00000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 0000000000000000 00000000 00000000 00000000end

 

Link to comment
Share on other sites

@Rapier Idunno, I can't check it cause I havent Vice City. So try other method, with object flags.

And you forgot to delete all parts of code where [email protected] used.

@juarez I told about vc.exe database for IDA.

Link to comment
Share on other sites

@DK22Pac: Thank you for help and also for the attention. But the hint of krasiejow worked well. The object 377 is invisible. smile.gif

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.