CLEO Help Cam restore in sniperzoom needed

CLEO related
Status
Not open for further replies.

SS041

New member
Joined
Apr 1, 2020
Messages
1
Reaction score
0
Location
EARTH
Hello This is the code with sniperzoom and cam restore, but I want cam restore only, so, can someone edit for it please, Will be grateful if you make a normal .cs file for it, Thx
( Credits will be given)


// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread "ExtraWS"
0662: printstring "Made by FYP"
0662: printstring "BlastHack.Net"
gosub @ExtraWS_817
1@ = 0
3@ = 0
4@ = 0
0B34: samp register_client_command "ws" to_label @cmd

:ExtraWS_71
wait 0
if
Player.Defined(0)
jf @ExtraWS_810
if and
31@ == true
not Actor.Driving($PLAYER_ACTOR)
not Actor.Dead($PLAYER_ACTOR)
jf @ExtraWS_810
0470: 0@ = actor $PLAYER_ACTOR current_weapon
0A96: 5@ = actor $PLAYER_ACTOR struct
5@ += 1816
0A8D: 5@ = read_memory 5@ size 1 virtual_protect 0
5@ += 1
if and
5@ >= 3
not 5@ > 7
jf @ExtraWS_810
if
not 0@ == 34
jf @ExtraWS_810
if
00E1: player 0 pressed_key 6
jf @ExtraWS_465
if
1@ == 0
jf @ExtraWS_299
0A8D: 10@ = read_memory 5379741 size 4 virtual_protect 1
0A8D: 11@ = read_memory 5379745 size 2 virtual_protect 1
0A8C: write_memory 5379741 size 4 value -1869574000 virtual_protect 1
0A8C: write_memory 5379745 size 2 value 37008 virtual_protect 1
1@ = 1

:ExtraWS_299
if
3@ == 0
jf @ExtraWS_458
if or
5@ == 6
5@ == 7
jf @ExtraWS_458
0A8D: 2@ = read_memory 11989584 size 4 virtual_protect 0
if or
not 2@ > 50.0
4@ == 1
jf @ExtraWS_458
0A8D: 12@ = read_memory 5379774 size 4 virtual_protect 1
0A8D: 13@ = read_memory 5379778 size 2 virtual_protect 1
0A8C: write_memory 5379774 size 4 value -1869574000 virtual_protect 1
0A8C: write_memory 5379778 size 2 value 37008 virtual_protect 1
3@ = 1
4@ = 0

:ExtraWS_458
goto @ExtraWS_571

:ExtraWS_465
if
1@ == 1
jf @ExtraWS_518
0A8C: write_memory 5379741 size 4 value 10@ virtual_protect 1
0A8C: write_memory 5379745 size 2 value 11@ virtual_protect 1
1@ = 0

:ExtraWS_518
if
3@ == 1
jf @ExtraWS_571
0A8C: write_memory 5379774 size 4 value 12@ virtual_protect 1
0A8C: write_memory 5379778 size 2 value 13@ virtual_protect 1
3@ = 0

:ExtraWS_571
if
00E1: player 0 pressed_key 6
jf @ExtraWS_810
if
00E1: player 0 pressed_key 5
jf @ExtraWS_699
0A8D: 2@ = read_memory 11989584 size 4 virtual_protect 0
2@ += 2.0
if
2@ > 70.0
jf @ExtraWS_660
2@ = 70.0

:ExtraWS_660
0A8C: write_memory 11989584 size 4 value 2@ virtual_protect 0
if
3@ == 0
jf @ExtraWS_699
4@ = 1

:ExtraWS_699
if
00E1: player 0 pressed_key 7
jf @ExtraWS_810
0A8D: 2@ = read_memory 11989584 size 4 virtual_protect 0
2@ -= 2.0
if
not 2@ >= 4.0
jf @ExtraWS_771
2@ = 4.0

:ExtraWS_771
0A8C: write_memory 11989584 size 4 value 2@ virtual_protect 0
if
3@ == 0
jf @ExtraWS_810
4@ = 1

:ExtraWS_810
goto @ExtraWS_71

:cmd
if
31@ == false
then
31@ = true
chatmsg "+" -1
else
31@ = false
chatmsg "-" -1
end
0B43: samp cmd_ret


:ExtraWS_817
0A8C: write_memory 5310892 size 1 value 235 virtual_protect 1
0A8C: write_memory 5310917 size 1 value 235 virtual_protect 1
0A8C: write_memory 5386662 size 1 value 235 virtual_protect 1
0A8C: write_memory 5386797 size 1 value 235 virtual_protect 1
0A8C: write_memory 5387194 size 1 value 235 virtual_protect 1
return
 
Last edited:

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
268
Location
Pluto
Hello This is the code with sniperzoom and cam restore, but I want cam restore only, so, can someone edit for it please, Will be grateful if you make a normal .cs file for it, Thx
( Credits will be given)


// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread "ExtraWS"
0662: printstring "Made by FYP"
0662: printstring "BlastHack.Net"
gosub @ExtraWS_817
1@ = 0
3@ = 0
4@ = 0
0B34: samp register_client_command "ws" to_label @cmd

:ExtraWS_71
wait 0
if
Player.Defined(0)
jf @ExtraWS_810
if and
31@ == true
not Actor.Driving($PLAYER_ACTOR)
not Actor.Dead($PLAYER_ACTOR)
jf @ExtraWS_810
0470: 0@ = actor $PLAYER_ACTOR current_weapon
0A96: 5@ = actor $PLAYER_ACTOR struct
5@ += 1816
0A8D: 5@ = read_memory 5@ size 1 virtual_protect 0
5@ += 1
if and
5@ >= 3
not 5@ > 7
jf @ExtraWS_810
if
not 0@ == 34
jf @ExtraWS_810
if
00E1: player 0 pressed_key 6
jf @ExtraWS_465
if
1@ == 0
jf @ExtraWS_299
0A8D: 10@ = read_memory 5379741 size 4 virtual_protect 1
0A8D: 11@ = read_memory 5379745 size 2 virtual_protect 1
0A8C: write_memory 5379741 size 4 value -1869574000 virtual_protect 1
0A8C: write_memory 5379745 size 2 value 37008 virtual_protect 1
1@ = 1

:ExtraWS_299
if
3@ == 0
jf @ExtraWS_458
if or
5@ == 6
5@ == 7
jf @ExtraWS_458
0A8D: 2@ = read_memory 11989584 size 4 virtual_protect 0
if or
not 2@ > 50.0
4@ == 1
jf @ExtraWS_458
0A8D: 12@ = read_memory 5379774 size 4 virtual_protect 1
0A8D: 13@ = read_memory 5379778 size 2 virtual_protect 1
0A8C: write_memory 5379774 size 4 value -1869574000 virtual_protect 1
0A8C: write_memory 5379778 size 2 value 37008 virtual_protect 1
3@ = 1
4@ = 0

:ExtraWS_458
goto @ExtraWS_571

:ExtraWS_465
if
1@ == 1
jf @ExtraWS_518
0A8C: write_memory 5379741 size 4 value 10@ virtual_protect 1
0A8C: write_memory 5379745 size 2 value 11@ virtual_protect 1
1@ = 0

:ExtraWS_518
if
3@ == 1
jf @ExtraWS_571
0A8C: write_memory 5379774 size 4 value 12@ virtual_protect 1
0A8C: write_memory 5379778 size 2 value 13@ virtual_protect 1
3@ = 0

:ExtraWS_571
if
00E1: player 0 pressed_key 6
jf @ExtraWS_810
if
00E1: player 0 pressed_key 5
jf @ExtraWS_699
0A8D: 2@ = read_memory 11989584 size 4 virtual_protect 0
2@ += 2.0
if
2@ > 70.0
jf @ExtraWS_660
2@ = 70.0

:ExtraWS_660
0A8C: write_memory 11989584 size 4 value 2@ virtual_protect 0
if
3@ == 0
jf @ExtraWS_699
4@ = 1

:ExtraWS_699
if
00E1: player 0 pressed_key 7
jf @ExtraWS_810
0A8D: 2@ = read_memory 11989584 size 4 virtual_protect 0
2@ -= 2.0
if
not 2@ >= 4.0
jf @ExtraWS_771
2@ = 4.0

:ExtraWS_771
0A8C: write_memory 11989584 size 4 value 2@ virtual_protect 0
if
3@ == 0
jf @ExtraWS_810
4@ = 1

:ExtraWS_810
goto @ExtraWS_71

:cmd
if
31@ == false
then
31@ = true
chatmsg "+" -1
else
31@ = false
chatmsg "-" -1
end
0B43: samp cmd_ret


:ExtraWS_817
0A8C: write_memory 5310892 size 1 value 235 virtual_protect 1
0A8C: write_memory 5310917 size 1 value 235 virtual_protect 1
0A8C: write_memory 5386662 size 1 value 235 virtual_protect 1
0A8C: write_memory 5386797 size 1 value 235 virtual_protect 1
0A8C: write_memory 5387194 size 1 value 235 virtual_protect 1
return

That codes was ancient already, that script simulates opcode 0922 . It is easier to use modern opcodes than relying on that complex coding stuff...

To restore sniper camera, use the opcode like this:
Code:
{
1.0 - normal/restore zoom(100%)
0.5 - x2 zoom(200%)
0.25 - x4 zoom(400%)
}
0922: set_camera_zoom_from 1.0 to 1.0 timelimit 1 smooth_transition true
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
268
Location
Pluto
I have not tested this yet, you can improve it if you like to:
Code:
{$CLEO .cs}
0000: camera zoom restore by ajom

While true
 wait 0
 If 0AB0:  key_pressed 88 // key X
 then 0922: set_camera_zoom_from 1.0 to 1.0 timelimit 1 smooth_transition true
 end
End
 
Status
Not open for further replies.
Top