CLEO Help camera

CLEO related
Status
Not open for further replies.

Adel123

Member
Joined
May 11, 2014
Messages
10
Reaction score
0
Its possible to point the camera to some coordinates? If yes, please make someone with any coordinates, i will edit it.
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,497
Reaction score
241
Location
( ͡° ͜ʖ ͡°)
This cleo will make your camera aim at the farm in LS cordinates: 0.0 0.0 0.0

Code:
{$CLEO .cs}
0000:

WHILE TRUE
    WAIT 0
    IF
    0AB0: 2
    THEN
        0AB1: [member=1966]Aim[/member] 4 -1  POINT_CAMERA_TO: 0.0 0.0 0.0
    END
END







:AIM
var
1@ :float
2@ :float
3@ :float
4@ :float
5@ :float
6@ :float
7@ :float
8@ :float
9@ :float
10@ :float
11@ :float
12@ :float
13@ :float
14@ :float
15@ :float
end
0087: 4@ = 1@ // (float)
0087: 5@ = 2@ // (float)
0087: 6@ = 3@ // (float)
068D: get_camera_position_to 1@ 2@ 3@            
04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
1@ -= 4@
2@ -= 5@
0096: make 1@ absolute_float
0096: make 2@ absolute_float
10@ = 1@
11@ = 2@
10@ *= 10@                                           
11@ *= 11@
10@ += 11@
01FB: 10@ = square_root 10@ // Ac
11@ = 1@ // Aa vrem
12@ = 10@ // Ac vrem
11@ /= 12@
0AA5: call 0x4207A0 num_params 1 pop 1 _value 11@ // asin
0AE9: pop_float 12@ // fstp [0@]
0AA5: call 0x48DE40 num_params 1 pop 1 _value 11@ // acos
0AE9: pop_float 13@ // fstp [0@]
if 
0ab1: @getSlotWeapon 0 16@
then 
    if 0ab1: @getAngleForCam 7 4@ 5@ 7@ 8@ 12@ 13@ 16@ 15@
    then 
        15@ += 0.0389
        0A8C: write_memory 0xB6F258 size 4 value 15@ virtual_protect 0
    end
end
0ab2: 0

        
 
:getAngleForCam
var
    0@ : float
end
if 6@ == 5
then
    7@ = 0.0100
    8@ = 0.0100
    9@ = 1.5607
    10@ = 1.5807
else if 6@ == 6
    then
        7@ = 0.0180
        8@ = 0.0200
        9@ = 1.5507
        10@ = 1.5907
    else
        7@ = 0.0
        8@ = 0.0
        9@ = 1.5707
        10@ = 1.5707
    end
end
 
if and
    2@ > 0@
    3@ > 1@
then
    5@ -= 8@
    15@ = 5@
end
                   
if and
    2@ > 0@
    3@ < 1@
then
    5@ *= -1.0
    5@ -= 7@
    15@ = 5@
end
                   
if and
    2@ < 0@
    3@ > 1@
then
    4@ += 9@
    15@ = 4@
end
                   
if and
    2@ < 0@
    3@ < 1@
then
    4@ *= -1.0
    4@ -= 10@
    15@ = 4@
end
 
0A8D: 11@ = read_memory 0xB6F258 size 4 virtual_protect 0
11@ -= 15@
if and
    11@ < 0.1800
    11@ > -0.1800
then 0485: return_true
else 059A: return_false
end
0ab2: 1 15@
 
:getSlotWeapon
0A96: 0@ = actor $player_actor struct
0@ += 0x718
0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0
if or
    1@ == 2
    1@ == 3
    1@ == 4
    1@ == 5
    1@ == 6
    1@ == 7
then 0485: return_true
else 059A: return_false
end
0ab2: 1 1@               
 

Adel123

Member
Joined
May 11, 2014
Messages
10
Reaction score
0
Not working, look at my code, it is pointing the camera every time on some other same location.

Code:
{$CLEO .cs}
cmd "camera" @Noname_1

:Noname_1
Camera.PointAt(665.8948, -479.5685, 16.4175, 2)
SAMP.CmdRet
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,497
Reaction score
241
Location
( ͡° ͜ʖ ͡°)
Adel123 link said:
Not working, look at my code, it is pointing the camera every time on some other same location.

Code:
{$CLEO .cs}
cmd "camera" @Noname_1

:Noname_1
Camera.PointAt(665.8948, -479.5685, 16.4175, 2)
SAMP.CmdRet

Instead of: Camera.PointAt(665.8948, -479.5685, 16.4175, 2)
you use:
0AB1: [member=1966]Aim[/member] 4 -1  POINT_CAMERA_TO: 665.8948 -479.5685 16.4175

OK?



Dudeee... i gave you a function to do that....
 
Status
Not open for further replies.
Top