Jump to content

Eroare: Meniurile nu functioneaza


NEXUS.
 Share

Recommended Posts

  • Descriere problema: Am incercat de mai multe zile sa concep niste meniuri, insa acestea nu functioneaza indiferent ce-as face. Dau click pe o selectie si nimic.
  • Poze / Video (optional): https://imgur.com/a/UtCaDAq
  • Cod (sursa pe baza caruia sa ajutam, daca e cazul): 
  •  

  • if 0B3C: samp is_dialog_responded id 6164 button 22@ list_item 23@ input_text 0
    then
    if 0AB0: is_key_pressed 27 
    then
    0B47: samp close_current_dialog_with_button 1@ 
    else if 0039: 22@ == 1 
    then 

    if 23@ == 0
    then
    chatmsg "{FF3030}Selectia Unu {FFFFFF}texte." -1
    end

    if 23@ == 1
    then
    chatmsg "{83D64B}Selectia Doi {FFFFFF}texte." -1
    end

    else
    0B47: samp close_current_dialog_with_button 1@ 
    end
    end
    end 


    //////////////////////////////////////////////////////////// Selection MENU ////////////////////////////////////////////////////////////

    :NexSelectare
    0AC6: $6 = label @Selectare offset 
    samp.ShowDialog(6164, "INFO Selectii:", $6, "Select", "", 2)    
    SAMP.CmdRet  
      
    :Selectare
    hex
    "S1 (Selectia Unu)" A
    "S2 (Selectia Doi)" 0
    end
    ret 0

     

  • Alte precizări: multumesc pentru atentie
Edited by South NEXUS.
Link to comment
Share on other sites

if 0B3C: samp is_dialog_responded id 6164 button 22@ list_item 23@ input_text 0
then
    if 22@ == 1
    then
        if 23@ == 0
        then
        chatmsg "{FF3030}Selectia Unu {FFFFFF}texte." -1
        end
        
        if 23@ == 1
        then
        chatmsg "{83D64B}Selectia Doi {FFFFFF}texte." -1
        end
    else 0B47: samp close_current_dialog_with_button 0
    end
end

 

Link to comment
Share on other sites

Nu are avea de ce sa nu mearga, incearcă varianta asta, să schimbi ID-ul de dialog.

 

:loop
wait 0

if 0B3C: samp is_dialog_responded id 7777 button 22@ list_item 23@ input_text 0
then
    if 22@ == 1
    then
        if 23@ == 0
        then
        chatmsg "{FF3030}Selectia Unu {FFFFFF}texte." -1
        end
        
        if 23@ == 1
        then
        chatmsg "{83D64B}Selectia Doi {FFFFFF}texte." -1
        end
    else 0B47: samp close_current_dialog_with_button 0
    end
end

jump @loop


:NexSelectare
0AC6: 0@ = label @Selectare offset 
samp.ShowDialog(7777, "INFO Selectii:", 0@, "Select", "", 2)    
SAMP.CmdRet  
  
:Selectare
hex
"S1 (Selectia Unu)" A
"S2 (Selectia Doi)" 00
end
ret 0

 

Link to comment
Share on other sites

Ți s-a mai spus că ești un om GENIAL????

ți-o spun eu acum, mersi pentru timpul acordat și pentru ajutor! ❤️ | rezolvată problema asta

-------------------------------
Încă o problemă pe care o am este că dacă folosesc codul trimis de tine mai sus, aceleași tipuri de coduri din partea inferioară a codului nu funcționează. Am verificat să văd distincția ID-urilor dialogurilor și toate ID-urile de dialog sunt distincte, nu se aseamănă niciunul.
--------------------------------

Edited by South NEXUS.
Link to comment
Share on other sites

ÎNCĂĂĂ o întrebare dacă se poate. 

Știi cumva de ce când vreau să apăs pe un buton, mă redirecționează către celălalt meniu căruia i-am dat jump dar imediat dă crash? 
! Când folosesc comanda creată, apăs pe opțiune ce-ar trebui să mă redirecționeze către un alt meniu, jocul dă crash. Se deschide meniul pentru 1 secundă și dă crash.

-------------------

 

 :loop1
wait 0

if 0B3C: samp is_dialog_responded id 7778 button 22@ list_item 23@ input_text 0
then
    if 22@ == 1
    then
        if 23@ == 0
        then
        chatmsg "{32A852}<< teweeeestttt >>" -1
        end
    
        if 23@ == 1
        then 
        chatmsg "{32A852}<< teeeeestttttt >>" -1
        
        end
    else 0B47: samp close_current_dialog_with_button 0
    end
end

jump @loop1


:Detalii
0AC6: 0@ = label @Altedetalii offset 
samp.ShowDialog(7778, "{FFBB00} Informatii | Craftsman ", 0@, "Select", "", 2)    
SAMP.CmdRet  
  
@Altedetalii
hex
"Selectia Meniu 2/1?" A
"Selectie Meniu 2/2" A
end
ret 0
  SAMP.CmdRet
---------------------------------------------------
- Am încercat să rulez codul fără a avea o redirecționare dintr-un alt meniu și a rulat fără probleme. 
- Am încercat ca în loc de meniu să pun doar un text și mi-a mers (logic), deci cred că e ceva de meniu.
- Jump @DetaliiMester e deja modificat cu @AlteDetalii, poza e puțin mai veche, dinaintea modificării (încercam să fac ceva chestie înainte).

image.png.03f98ab0649c6cdde90534ca21cacfa5.png

 

Edited by South NEXUS.
Link to comment
Share on other sites

Nu faci cate un loop pentru fiecare raspundere de dialog, in loop pui toate dialogurile la care raspunzi doar modifici ID-ul si actiunea pe care vrei sa o faca

 

:loop
wait 0

if 0B3C: samp is_dialog_responded id 6969 button 22@ list_item 23@ input_text 0
then
    if 22@ == 1
    then
        if 23@ == 0
        then...
        end
        
        if 23@ == 1
        then...
        end
    else 0B47: samp close_current_dialog_with_button 0
    end
end

if 0B3C: samp is_dialog_responded id 9696 button 22@ list_item 23@ input_text 0
then
    if 22@ == 1
    then
        if 23@ == 0
        then...
        end
        
        if 23@ == 1
        then...
        end
    else 0B47: samp close_current_dialog_with_button 0
    end
end

if 0B3C: samp is_dialog_responded id 6699 button 22@ list_item 23@ input_text 0
then
    if 22@ == 1
    then
        if 23@ == 0
        then...
        end
        
        if 23@ == 1
        then...
        end
    else 0B47: samp close_current_dialog_with_button 0
    end
end

.
.
.

jump @loop

 

Link to comment
Share on other sites

  • Tupi locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.