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
31@ = false
30@ = false
:re
wait 0
if
31@ == true
jf @re
if
SAMP.IsPlayerConnected(5@)
jf @noconectado
9@ = SAMP.GetActorHandleByPlayerID(5@)
if
056D: actor 9@ defined
wait 750
jump @listo
wait 100
:reportar
if
30@ == false
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 5@
jf @uso
if
SAMP.IsPlayerConnected(5@)
jf @idinvalido
30@ = true
31@ = true
0B36: samp 4@ = get_player_nickname 5@
0AC6: 7@ = label @reportek offset
0B3B: samp show_dialog id 666 caption "Selecciona el tipo de reporte" text 7@ 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 2@ list_item 3@ input_text 0
then
if and
2@ == 1
3@ == 0
then
0AF9: samp say_msg "/b /reportar %d ASR" 5@
0AF8: samp add_message_to_chat "Haz reportado por ASR correctamente a %s, ID %d." color 0x6098D1 4@ 5@
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: