CLEO Help Show dialog when press a key

CLEO related
Status
Not open for further replies.

Andrei_N.A.A.

New member
Joined
May 4, 2020
Messages
2
Reaction score
0
Location
Romania
Hello! I have some issues with this coding. When i press key 3 it crash my game. Sorry for bad english!
Can u help me pls?

Code:
:key_dialog
wait 0
if and
0AB0:   key_pressed 51 // key 3
0AFA:   is_samp_structures_available
else_jump @key_dialog
goto @dialog
:dialog
0AC6: 17@ = label @hex_dialog offset
SAMP.ShowDialog(7777, "Title", 17@, "Close", "", 0)
:hex_dialog
hex
3e 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 31 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 32 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 33 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 34 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 35 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 36 0d 0a 3e 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3c 7b 30 30 30 30 30 30 7d
end
 

cheetahftw1

Active member
Joined
Aug 31, 2018
Messages
39
Reaction score
0
Salut, incearca asta:

Code:
{$CLEO}
0000: NOP

repeat
wait 0
until SAMP.Available()

chatmsg "Mesaj cand intri in joc" -1


while true
wait 0

if and
key_down 51
not Samp.ChatInputOpened()
not Samp.IsDialogActive(-1)
then
    0AB1: call @dialog 0
    wait 100
end

END
   
   
:dialog
   SAMP.IsCommandTyped(0@)
0AC6: 17@ = label @hex_dialog offset
SAMP.ShowDialog(7777, "{FFFFFF}Title", 17@, "Close", "", 0)
SAMP.CmdRet

:hex_dialog
hex
3e 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 31 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 32 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 33 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 34 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 35 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 73 74 36 0d 0a 3e 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3c 7b 30 30 30 30 30 30 7d
end
 

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
La sfarsit de hex pui 00, aia segnificand ca termini hex-ul. Adica vei avea '7d 00'. Nu vad un motiv de ce nu ar merge codul lui cheetahftw1, probabil e din cauza versiunii sampfuncs sau cleo, poate chiar si samp. La ce ai nevoie de acest cmd? Pe ce server? Trimite pe prv.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,128
Solutions
5
Reaction score
884
Location
Lithuania
PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

while true
wait 0

if
0AB0:   key_pressed 51 // key 3
then
    0AC6: 0@ = label @dialog_text offset
    0B3B: samp show_dialog id 1000 caption "Title" text 0@ button_1 "Ok" button_2 "" style 0
    wait 1500
end

end

:dialog_text
HEX
"123 Hello 123 Bye" 0
END
 
Last edited:

mmia

Member
Joined
Apr 30, 2019
Messages
17
Reaction score
0
PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

while true
wait 0

if
0AB0:   key_pressed 51 // key 3
then
    0AC6: 0@ = label @dialog_text offset
    0B3B: samp show_dialog id 1000 caption "Title" text 0@ button_1 "Ok" button_2 "" style 0
    wait 1500
end

end

:dialog_hex
HEX
"123 Hello 123 Bye" 0
END
When I try to compile it
 

Attachments

  • 1589138252053.png
    1589138252053.png
    7.3 KB · Views: 21
Status
Not open for further replies.
Top