CLEO Help Help please

CLEO related
Status
Not open for further replies.

MDA

Active member
Joined
Jun 15, 2016
Messages
32
Reaction score
0
Code:
{$CLEO}

thread "Ladder Spawner"

repeat
wait 0
until SAMP.Available()

0B34: samp register_client_command "lsp" to_label @toggle

while true
wait 0
if
    19@ == 1
    then
        if and
        8B21:  not samp is_chat_not_opened
        0AB0: 54
        then
            Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
            4@ = Actor.Angle($PLAYER_ACTOR)
            3@ -= 1.0
            5@ = Object.Create(1437, 1@, 2@, 3@)
            Object.Angle(5@) = 4@   
            0453: set_object 5@ XYZ_rotation 30 0.0 0.0
        end
    end
end

:toggle
0B12: 19@ = 19@ XOR 1
if
   19@ == 1
then
   chatmsg "LADDER SPAWNER: {FFFF00}ON" color 0xFFFFFF
else
   chatmsg "LADDER SPAWNER: {FF3333}OFF" color 0xFFFFFF
end
SAMP.CmdRet()

Object angle doesn't following Actor angle and object rotate not changed, how to fix it?
 

4changesLeft

Well-known member
Joined
Apr 10, 2015
Messages
365
Reaction score
4
I think with Object.Angle(5@) = 4@ you dont actually change the angle, you just set the number to a certain amount
What you need is opcode 0177
Ex:
0177: set_object 5@ Z_angle_to 4@
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
The Z axis is responsible for the object spinning rotation.

[shcode=cpp]
4@ = Actor.Angle($PLAYER_ACTOR)
0453: set_object 5@ XYZ_rotation 0.0 0.0 4@
[/shcode]
 

MDA

Active member
Joined
Jun 15, 2016
Messages
32
Reaction score
0
springfield said:
The Z axis is responsible for the object spinning rotation.

[shcode=cpp]
4@ = Actor.Angle($PLAYER_ACTOR)
0453: set_object 5@ XYZ_rotation 0.0 0.0 4@
[/shcode]
Thank you  :)
 
Status
Not open for further replies.
Top