Help with dialog

TheDjCody

Active Member
Joined
Sep 6, 2018
Messages
32
Likes
6
Points
8
#1
The dialog box and cmd /re (ID) works, the problems is the list in the dialog, when i select one item don't do nothing, this is the code:

Code:
{$CLEO .cs}

wait 3000
0B34: samp register_client_command "re" to_label @reportar
[email protected] = false
[email protected] = false

:re
wait 0
if
[email protected] == true
jf @re
if
SAMP.IsPlayerConnected([email protected])
jf @noconectado
[email protected] = SAMP.GetActorHandleByPlayerID([email protected])
if
056D:  actor [email protected] defined
wait 750
jump @listo
wait 100


:reportar
if
[email protected] == false
SAMP.IsCommandTyped([email protected])
if
0AD4: [email protected] = scan_string [email protected] format "%d" [email protected]
jf @uso
if
SAMP.IsPlayerConnected([email protected])
jf @idinvalido
[email protected] = true
[email protected] = true
0B36: samp [email protected] = get_player_nickname [email protected]
0AC6: [email protected] = label @reportek offset
0B3B: samp show_dialog id 666 caption "Selecciona el tipo de reporte" text [email protected] button_1 "Reportar" button_2 "Cancelar" style 2
samp.CmdRet()
goto @re

while true
wait 0
if
0B3C:  samp is_dialog_responded id 666 button [email protected] list_item [email protected] input_text 0
then
    if and
    [email protected] == 1
    [email protected] == 0
    then
        0AF9: samp say_msg "/b /reportar %d ASR" [email protected]
        0AF8: samp add_message_to_chat "Haz reportado por ASR correctamente a %s, ID %d." color 0x6098D1 [email protected] [email protected]
        jump @re
    end
end

end

:reportek
hex
"ASR" A
"test" 0
end
      
:noconectado
goto @re

:uso
0AF8: samp add_message_to_chat "Debes agregar el ID para reportar: /re <ID> | Ejemplo /re 100" color 0xBFBFBF
SAMP.CmdRet
goto @re

:idinvalido
0AF8: samp add_message_to_chat "El ID que has colocado es invalido o el jugador está desconectado." color 0xBF0000
SAMP.CmdRet
goto @re

:listo
goto @re
 
Last edited:
Top