CLEO Help How to define my jump?

CLEO related
Status
Not open for further replies.

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
how can i define height of my jump with editbox?

look my code..

PHP:
{$CLEO .cs}

0000: NOP

REPEAT
   WAIT 0
UNTIL 0AFA:

Dialog.Create(21@, "")
Dialog.SetRECT(21@, 490, 462, 250, 190)
Dialog.AddButton(21@, 1, "Apply", 0, 60, 135, 35)
Dialog.AddEditBox(21@, 2, "5.0" , 145, 60, 85, 35)
Dialog.SetVisible(21@,0)


while true
wait 0    
            
    if Dialog.IsVisible(21@)
    then   
        0B81: dialog 21@ pop_event_to 2@ control_id_to 3@   
        IF
            3@ == 1 
        THEN                                       
            0B89: dialog 1@ get_control 2 text_to 19@v
        END
    end 
           
 
           if 
            key_down 66  // B Key
            then
            30@ = Actor.Angle($PLAYER_ACTOR)
            32@ = 0.0 
            083E: set_actor $PLAYER_ACTOR rotation 32@ 0.0 30@ while_in_air 
            083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ 1@ 2@ 3@
            083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 1@ 2@ 19@v 
            end
            

////////////////////////////////////////////////////////////////////////   
           if and 
            0AB0: 75
            not Samp.ChatInputOpened()
            then
            0B12: 0@ = 0@ XOR 1
            if
            0@ == true
            then
            wait 200  
            Dialog.SetVisible(21@, 1)
            SAMP.ToggleCursor(1)
            else
            wait 200 
            Dialog.SetVisible(21@,0)
            SAMP.ToggleCursor(0)
            end
            end
            
end

I'm doing something wrong or what? explain to me pls

@Parazitas @Zin @monday etc...
 

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
I made like that..

PHP:
{$CLEO .cs}
{$INCLUDE SF}

0000: NOP

REPEAT
   WAIT 0
UNTIL 0AFA:

Dialog.Create(21@, "")
Dialog.SetRECT(21@, 490, 462, 250, 190)
Dialog.AddButton(21@, 1, "Apply", 0, 60, 135, 35)
Dialog.AddEditBox(21@, 2, "5.0" , 145, 60, 85, 35)
/// Dialog set not visibile
Dialog.SetVisible(21@,0)


while true
wait 0    
            
    if Dialog.IsVisible(21@)
    then   
        0B81: dialog 21@ pop_event_to 2@ control_id_to 3@   
        IF
            3@ == 1 
        THEN
            alloc 16@ 60                                        
            0B89: dialog 1@ get_control 2 text_to 16@
            0AD4: 16@ = scan_string 16@ format "%d" 19@
            if 
            key_down 66  // B Key
            then
            30@ = Actor.Angle($PLAYER_ACTOR)
            32@ = 0.0 
            083E: set_actor $PLAYER_ACTOR rotation 32@ 0.0 30@ while_in_air 
            083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ 1@ 2@ 3@
            083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 1@ 2@ 19@
            end
           free 16@ 
        END
    end 
                         
           /////////////////////////////////////////////////////////////////////////    
           if and 
            0AB0: 75
            not Samp.ChatInputOpened()
            then
            0B12: 0@ = 0@ XOR 1
            if
            0@ == true
            then
            wait 200  
            Dialog.SetVisible(21@, 1)
            SAMP.ToggleCursor(1)
            else
            wait 200 
            Dialog.SetVisible(21@,0)
            SAMP.ToggleCursor(0)
            end
            end
            
end

i think it is wrong yet cuz it doesnt work lol
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,719
Solutions
1
Reaction score
111
No. It's more effort for me to make it then for you to just debug, stop being so lazy. If you don't know how to debug then fine, just use "log" to print the vars in the console and you just wanna check they're the correct type getting input into the opcode.
 
Status
Not open for further replies.
Top