CLEO Help Need cleo, lua or sf script that stabilizes vehicle camera

CLEO related
Status
Not open for further replies.
Joined
Feb 1, 2020
Messages
10
Reaction score
0
Location
Unknown
This script should fix vehicle camera unfolding. There was a cleo mod called StableVehCam.cs by Opcode.exe, but it doesnt work.. so if anyone knows another one or could create one. I would appreciate it alot
Mod from Opcode.exe:
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
C++:
void API::SetCameraLock()
{
    uintptr_t addressCameraTimer = gtaModuleBase + 0x770118;
    *(float*)addressCameraTimer = 50.0f;
}
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
{$CLEO .cs}

0000: NOP 

wait 8500
 
while true
wait 0

if
0AB1: @IsActorInDriverSeat 0
then
    if 0AB0: 90 // if i press Z Key
    then
        0A8C: write_memory 0xB70118 size 4 value 50.0 virtual_protect 0
    end
end

end

:IsActorInDriverSeat
{
    USE WITH >> IF STATEMENT:
    0AB1: @IsActorInDriverSeat 0
}
if
00DF:   actor $PLAYER_ACTOR in_car
then
    03C0: 0@ = actor $PLAYER_ACTOR car
    046C: 1@ = car 0@ driver
    if
    003B: 1@ == $PLAYER_ACTOR
    then
        0485:  return_true
    else
        059A:  return_false
    end
end
0AB2: ret 0
 
Joined
Feb 1, 2020
Messages
10
Reaction score
0
Location
Unknown
PHP:
{$CLEO .cs}

0000: NOP

wait 8500

while true
wait 0

if
0AB1: @IsActorInDriverSeat 0
then
    if 0AB0: 90 // if i press Z Key
    then
        0A8C: write_memory 0xB70118 size 4 value 50.0 virtual_protect 0
    end
end

end

:IsActorInDriverSeat
{
    USE WITH >> IF STATEMENT:
    0AB1: @IsActorInDriverSeat 0
}
if
00DF:   actor $PLAYER_ACTOR in_car
then
    03C0: 0@ = actor $PLAYER_ACTOR car
    046C: 1@ = car 0@ driver
    if
    003B: 1@ == $PLAYER_ACTOR
    then
        0485:  return_true
    else
        059A:  return_false
    end
end
0AB2: ret 0
Awesome man! It works, but there is a problem. I want it to be toggleable, so i can turn it on and off. I dont like to hold Z like this. Anyway, if you can fix it for me. Appreciated!!

Edit: Or another option to make it automatic, without holding any keys or pressing them.
 
Last edited:

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Awesome man! It works, but there is a problem. I want it to be toggleable, so i can turn it on and off. I dont like to hold Z like this. Anyway, if you can fix it for me. Appreciated!!

Edit: Or another option to make it automatic, without holding any keys or pressing them.

Type NCM to toggle the vehicle camera stabilizer

PHP:
{$CLEO .cs}

0000: NOP

const
    ISENABLED = 31@
end
31@ = true // enable the vehiclestabalizer at startup

repeat
wait 1000
until 056D:   actor $PLAYER_ACTOR defined

while true
    wait 0

    if 0ADC:   test_cheat "NCM"
    then
             0B12: ISENABLED = ISENABLED XOR true // toggle state
             if ISENABLED == true
             then 0ACD: show_text_highpriority "~y~Vehicle Camera Stabilizer: ~g~On" time 2000
             else 0ACD: show_text_highpriority "~y~Vehicle Camera Stabilizer: ~r~Off" time 2000
             end
    end

    if ISENABLED == true
    then
             if gosub @IsActorInDriverSeat
             then 0A8C: write_memory 0xB70118 size 4 value 50.0 virtual_protect 0
             end
    end
end

:IsActorInDriverSeat
{
    USE WITH >> IF STATEMENT:
    gosub @IsActorInDriverSeat
}
if 00DF:   actor $PLAYER_ACTOR in_car
then
    03C0: 0@ = actor $PLAYER_ACTOR car
    046C: 1@ = car 0@ driver
    if 003B: 1@ == $PLAYER_ACTOR
    then 0485:  return_true
    else 059A:  return_false
    end
end
return
 
Status
Not open for further replies.
Top