Coding

 Reply to this postStart new topic

Remove player's +Z velocity limit

powernoob
post Jan 29 2013, 01:31 AM
Post #1


The New Guy!

Posts: 11
Joined: 9-January 13



Hello,

I would like to disable the +Z velocity limit when a player is on foot, the limit appear to be 0.25.

Anyone know where in the IDB can I find the limitation code?

Thanks!


Edit: OK I think I have found the limitation code:

005E91CE CPed__processControl+4FE

But I have no idea how to disable it, I tried to write a NOP to this adress but the game crashed when I tried to set player velocity xD


Edit Ok I have found how to modify the 0.25 limit, but not how to disable this check:

In Cheat Engine, set manual address to 5E91CE, then set type to array of bytes, lenght 7, you should see C7 46 4C 00 00 80 3E, this is the opcode and parameters for mov [esi+4c],3e800000, where 3e800000 is 0.25 in hexadecimal.

I tried to change this 0.25 limit to 100 (42C80000, so just needed to change the last 2 bytes to C8 42), unfortunately when I tried to set the player velocity +Z to like 10, it immediately changed the velocity to 100 (or very high value) and there was no more gravity until I reach Z coordinate 99999.999, at which point I fall normally with gravity.


Edit again: sorry I am stupid xD, the address of the 0.25 limit is at 862E38, (type is double), I found it by looking a little above in the IDB, at 005E91B4 smile.gif

Anyway I think the other value isn't useless either... smile.gif

Final edit: better to always set both 862E38 and 5E91D1 to the same values, or what I described earlier will happen (if 862E38's value is lower than 5E91D1's value) wink.gif

Oh and write 7 NOP at 5E91CE to completely disable the limit! Hey I start to understand how it works smile.gif

This post has been edited by powernoob: Jan 29 2013, 04:11 AM
Go to the top of the page
 
+Quote Post
Deji
post Jan 29 2013, 09:58 AM
Post #2


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Don't change 0x862E38, it should be read-only data. Instead you need to rewrite any pointers using it that relate to the velocity limit. I've not got the IDB open so I can't comment on the others right now.


--------------------
Go to the top of the page
 
+Quote Post
Silent
post Jan 29 2013, 11:35 AM
Post #3


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



You may aswell NOP 2 bytes at 0x5E91B2 to remove the limit from all peds, including the player.
Go to the top of the page
 
+Quote Post
ThirteenAG
post Jan 29 2013, 04:22 PM
Post #4


Ameteur Member

Posts: 54
Joined: 8-January 11



What exactly this limit do?
Go to the top of the page
 
+Quote Post
LINK/2012
post Jan 29 2013, 04:56 PM
Post #5


I will kill you

Posts: 126
Joined: 13-May 11



QUOTE (ThirteenAG @ Jan 29 2013, 01:22 PM) *
What exactly this limit do?

I think it is the maximum speed the player can fall, if the player is falling at the speed of 0.25, the speed won't increase anymore.

@Down
Now I don't understand too


This post has been edited by LINK2012: Jan 29 2013, 05:20 PM
Go to the top of the page
 
+Quote Post
powernoob
post Jan 29 2013, 05:01 PM
Post #6


The New Guy!

Posts: 11
Joined: 9-January 13



No, it's the limit for the maximum RISE speed (+Z) smile.gif

QUOTE
Don't change 0x862E38, it should be read-only data. Instead you need to rewrite any pointers using it that relate to the velocity limit.


Ok you are right this is used for others things, better not change this value smile.gif

This post has been edited by powernoob: Jan 29 2013, 05:07 PM
Go to the top of the page
 
+Quote Post
Opcode.eXe
post Jul 10 2013, 11:49 PM
Post #7


The New Guy!

Posts: 9
Joined: 14-April 13



Got this, works fine:

{$CLEO .cs}
THREAD "THREAD_BY_OPCODEXE"
0662: NOP "www.youtube.com/OpcodeXe"
0662: NOP "http://www.gtagarage.com/mods/show.php?id=23402" // thx to Kryptonian tongue.gif



:NOP
wait 0
if
0ADC: test_cheat "limit"
jf @NOP
0A8C: write_memory 0x5E91CE size 1 value 0x90 virtual_protect 1
0A8C: write_memory 0x5E91CF size 1 value 0x90 virtual_protect 1
0A8C: write_memory 0x5E91D0 size 1 value 0x90 virtual_protect 1
0A8C: write_memory 0x5E91D1 size 1 value 0x90 virtual_protect 1
0A8C: write_memory 0x5E91D2 size 1 value 0x90 virtual_protect 1
0A8C: write_memory 0x5E91D3 size 1 value 0x90 virtual_protect 1
0A8C: write_memory 0x5E91D4 size 1 value 0x90 virtual_protect 1
0ACD: show_text_highpriority "NOPPED" time 1200

:RESTORE
wait 0
if
0ADC: test_cheat "limit"
jf @RESTORE
0A8C: write_memory 0x5E91CE size 1 value 0xC7 virtual_protect 1
0A8C: write_memory 0x5E91CF size 1 value 0x46 virtual_protect 1
0A8C: write_memory 0x5E91D0 size 1 value 0x4C virtual_protect 1
0A8C: write_memory 0x5E91D1 size 1 value 0x0 virtual_protect 1
0A8C: write_memory 0x5E91D2 size 1 value 0x0 virtual_protect 1
0A8C: write_memory 0x5E91D3 size 1 value 0x80 virtual_protect 1
0A8C: write_memory 0x5E91D4 size 1 value 0x3E virtual_protect 1
0ACD: show_text_highpriority "RESTORED" time 1200
jump @NOP
Go to the top of the page
 
+Quote Post
Sidewalk Surfer
post Jul 23 2013, 05:41 PM
Post #8


Newbie In Training

Posts: 16
From: NYC USA
Joined: 29-December 09



Is this so you can make peds not stay stuck to the floor? If so, I am looking for the same thing.


--------------------
Whoa dude! Mr. Turtle is my father.
Go to the top of the page
 
+Quote Post
Opcode.eXe
post Jan 18 2014, 10:58 PM
Post #9


The New Guy!

Posts: 9
Joined: 14-April 13



QUOTE (Sidewalk Surfer @ Jul 23 2013, 06:41 PM) *
Is this so you can make peds not stay stuck to the floor? If so, I am looking for the same thing.


So you want to set players velocity while hes on the ground?
You have to simulate that you're in air:

0A96: 0@ = actor $PLAYER_ACTOR struct
0A8E: 1@ = 0@ + 0x46C // int
0A8C: write_memory 1@ size 1 value 0 virtual_protect 0

Use this in a loop and then youre able to set velocity like in this video:
http://www.youtube.com/watch?v=n_6Uhki6T8M
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: