Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Summer Special
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

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

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
Rapier

Object Model

Recommended Posts

Rapier

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!

 

Share this post


Link to post
Share on other sites
DK22Pac

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Rapier

@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!

Share this post


Link to post
Share on other sites
Rapier

 

@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?

Share this post


Link to post
Share on other sites
DK22Pac

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

Share this post


Link to post
Share on other sites
Rapier

Sounds easy, but I have no idea how to do this... dontgetit.gif

Share this post


Link to post
Share on other sites
DK22Pac

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

Share this post


Link to post
Share on other sites
Rapier

Man, my brain will begin to fry with it... tounge.gif

Share this post


Link to post
Share on other sites
DK22Pac

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

Share this post


Link to post
Share on other sites
Rapier

This is really impressive, but as I'll add this in my script???

Share this post


Link to post
Share on other sites
DK22Pac

Put it after

 

05DC: end_custom_thread

 

Share this post


Link to post
Share on other sites
xNCx

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

Share this post


Link to post
Share on other sites
Rapier

 

Put it after

 

05DC: end_custom_thread

 

Ok, I'll try...

 

@krasiejow: Thank you!

Share this post


Link to post
Share on other sites
Rapier

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

 

Share this post


Link to post
Share on other sites
Juarez

 

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

where?

Share this post


Link to post
Share on other sites
DK22Pac

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

Share this post


Link to post
Share on other sites
Rapier

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

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.

Sign in to follow this  

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