CLEO Help dialog problem

CLEO related
Status
Not open for further replies.

HowEnCokkien

Well-known member
Joined
Jul 9, 2017
Messages
307
Reaction score
9
so my biggest problem about cleo coding,, i cant get this dialog shits working so correct me pls. even it doesnt do a simple action.



Code:
{$CLEO}
0000:NOP


REPEAT
wait 100
until 0AFA:

0B34: "hz" @test

while true
wait 0
end

while true
wait 0

IF 0B3C: samp is_dialog_responded id 100 button 9@ list_item 10@ input_text 0
THEN

IF 0039: 9@ == 1
THEN

IF 0039: 10@ == 0
THEN
Model.Load(368)
END
IF MODEL.Available(368)
THEN
01B2: give_actor $PLAYER_ACTOR weapon 44 ammo 1
wait 50
Model.Destroy(368)
END

END

END

END

:test
wait 0
0AC6: 1@ = label @text offset
0B3B: samp show_dialog id 100 caption "test" text 1@ button_1 "OK" button_2 "CANCEL" style 2
0B43: samp cmd_ret

:text
hex
"Randdom wep" 0
end
ty
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,133
Solutions
5
Reaction score
885
Location
Lithuania
@HowEnCokkien

PHP:
{$CLEO .cs}
0000: NOP
 
 
REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY 
 
0B34: "dialog" @toggle
 
WHILE TRUE
   WAIT 0     
 
IF
24@ == TRUE
THEN  
   0AC6: 25@ = label @SHOW_DIALOG offset  
   0B3B: samp show_dialog id 998 caption "Dialog Title" text 25@ button_1 "OK" button_2 "CLOSE" style 2  
   24@ = FALSE
END
 
IF 
0B3C: samp is_dialog_responded id 998 button 26@ list_item 27@ input_text 0
THEN
 
 
IF 
26@ == 1 // OK button
THEN
   IF 
   27@ == 2
   THEN 
       0AF8: "Dialog - TEST 1" -1
       Model.Load(368)
       IF
       MODEL.Available(368)
       THEN
           01B2: give_actor $PLAYER_ACTOR weapon 44 ammo 1
           wait 50
           Model.Destroy(368)
       END
   END
END
 
IF 
26@ == 1 // OK button
THEN
   IF 
   27@ == 3
   THEN 
       0AF8: "Dialog - TEST 2" -1
   END
END
 
IF 
26@ == 1 // OK button
THEN
   IF 
   27@ == 4
   THEN 
       0AF8: "Dialog - TEST 3" -1
   END
END
 
IF 
26@ == 1 // OK button
THEN
   IF 
   27@ == 5
   THEN 
       0AF8: "Dialog - TEST 4" -1
   END
END
 
END //// END 0B3C: samp is_dialog_responded id 998 button 26@ list_item 27@ input_text 0
     
END /// END WHILE TRUE
 
 
:SHOW_DIALOG
hex
"{148730}---------------------- Test Dialog Line 1 ------------------------------" 0A
" " 0A
"{FFFFFF}Dialog 2 - TEST 1" 0A
"{00FF00}Dialog 2 - TEST 2" 0A
"{FF0000}Dialog 2 - TEST 3" 0A 
"{FFFF00}Dialog 2 - TEST 4" 0A  
" " 00
end 
 
:toggle
0B12: 24@ = 24@ XOR 1
 
0B43:
 
Status
Not open for further replies.
Top