CLEO Help whats my fuckin' mistake?

CLEO related
Status
Not open for further replies.

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
here is code..

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

0000: NOP

REPEAT
   WAIT 0
UNTIL 0AFA:

Dialog.Create(21@, "all my niggas is dead")
Dialog.SetRECT(21@, 490, 462, 250, 190)
Dialog.AddButton(21@, 1, "TP to VEH", 0, 60, 135, 35)
Dialog.AddButton(21@, 2, "TP to Player", 0, 110, 135, 35)
Dialog.AddEditBox(21@, 3, "", 145, 60, 85, 35)
Dialog.AddEditBox(21@, 4, "", 145, 110, 85, 35)
/// Dialog minimize off
Dialog.SetMinimized(21@, 0)
/// Dialog set not visibile
Dialog.SetVisible(21@,0)


while true
wait 0
            if Dialog.IsVisible(21@)
            then
                Dialog.PopEvent(21@, -1, 29@)
                    if 29@ == 1
                    then
                        alloc 28@ = 260
                        Dialog.GetControlText(14@, 3, 28@)
                        0C1A: 28@ = atoi 28@
                        0AFF: samp 27@ = car_handle_by_samp_vehicle_id 28@
                        if 056E:   car 27@ defined
                        then
                            00AA: store_car 27@ position_to 22@ 23@ 24@
                            00A1: put_actor $PLAYER_ACTOR at 22@ 23@ 24@
                        end
                        free 28@
                    end
                    if 29@ == 2
                    then
                        alloc 28@ = 260
                        Dialog.GetControlText(14@, 4, 15@)
                        0C1A: 28@ = atoi 28@
                        0B20: samp 27@ = actor_handle_by_samp_player_id 28@
                        if 056D:   actor 27@ defined
                        then
                            00A0: store_actor 27@ position_to 22@ 23@ 24@
                            00A1: put_actor $PLAYER_ACTOR at 22@ 23@ 24@
                        end
                        free 28@
                    end
                end
               
           if and 
            0AB0: 75  // K
            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
[/spoiler]

SO... what i am doing wrong?
this code it is to be like when i press both of buttons it make function to tp.. but this is not working i have no idea.. someone know why?

@Zin @Parazitas etc...
 
Status
Not open for further replies.
Top