Jump to content
  • 0

Problema


FlOrINn

Question

Problema intalnita (descriere):Am facut  comanda /help iar cand tastez /help nu imi apare dialog .
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul:Am dat mai jos
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da de foarte multe ori :-k

		if(strcmp(cmd, "/help", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
        ShowPlayerDialog(playerid, DIALOG_HELPME, DIALOG_STYLE_LIST,"Help", "1.Ajutor General n 2.Ajutor Secundar n 3.Ajutor Helper n 4.Ajutor Admin n 5.Ajutor VIP", "Select","Cancel");
		
		}
		return 1;
	}

 

:P Respecta ca sa fi respectact :P 

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

Developer in :

C++,PHP,HTML,CSS,JAVASCRIPT,XML,MYSQL

si ceva  Pawno :)

WebDesign,Photoshop

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

/////////////////////////////////////////////////////////////////////////////////////////

=============================================

Steam ~ Kiburici

=============================================

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Nu ai declarat ce face DIALOG_HELPME:

 

case DIALOG_HELPME:
{
    if(response)
    {
        switch(listitem)
        { case 0: cerinta 1;
          case 1: cerinta 2;
          ...
          case n: cerinta n-1;
     }
}

Il pui la OnDialogResponse.

Edited by R3muSGFX
  • Upvote 1
qua8n0lrq5wl5v5xccbk.png
 
mf79y6bvavi9sp2qqfoi.png
Contact: Mail: [email protected]
Y!M: r3mus.onlypro
Skype: r3mus.onlypro
Link to comment
Share on other sites

  • 0

Am rezolvat in mare parte, R3mus codul ala nu merge a trebuit sa-l rescriu ...

Acum e ala problema cand dau pe Ajutor secundar ma duce la alt dialog o idee ??

:P Respecta ca sa fi respectact :P 

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

Developer in :

C++,PHP,HTML,CSS,JAVASCRIPT,XML,MYSQL

si ceva  Pawno :)

WebDesign,Photoshop

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

/////////////////////////////////////////////////////////////////////////////////////////

=============================================

Steam ~ Kiburici

=============================================

Link to comment
Share on other sites

  • 0

Am rezolvat in mare parte, R3mus codul ala nu merge a trebuit sa-l rescriu ...

Acum e ala problema cand dau pe Ajutor secundar ma duce la alt dialog o idee ??

case DIALOG_HELPME:
{
    if(response)
       return ( 1 );

    switch(listitem)
    { 
        case 0: ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Ajutor General", "Aici scrii ce face ajutorul general", "Close", "");
        case 1: ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Ajutor Secundar", "Aici scrii ce face ajutorul secundar", "Close", "");
        case 2: ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Ajutor Helper", "Aici scrii ce face ajutorul helper", "Close", "");
        case 3: ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Ajutor Admin", "Aici scrii ce face ajutorul admini-lor", "Close", "");
        case 4: ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Ajutor VIP", "Aici scrii ce face ajutorul VIP", "Close", "");
    }
    return ( 1 );
}
  • Upvote 1

242086.png

Link to comment
Share on other sites

  • 0

Tot cand dau pe case0 imi deschide alt dialog

Edited by FlOrINn

:P Respecta ca sa fi respectact :P 

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

Developer in :

C++,PHP,HTML,CSS,JAVASCRIPT,XML,MYSQL

si ceva  Pawno :)

WebDesign,Photoshop

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

/////////////////////////////////////////////////////////////////////////////////////////

=============================================

Steam ~ Kiburici

=============================================

Link to comment
Share on other sites

  • 0

Am rezolvat aia acum :

Se da :


case 0:
{
        ShowPlayerDialog(playerid, dialog_general, DIALOG_STYLE_LIST,"Ajutor General", "Despre ContnInformatiinDespre ServernGeneralsnChatnBanknFactionnJob","Ok","Cancel");
return 1;
}

//Si dialog_general :

if(dialogid == dialog_general)
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "Server:Ai oprit aceasta actiune!");
return 1;
}
  switch(listitem)
  {
case 0:
{
SendClientMessage(playerid, 0xFF0000FF, "TEST");
}
case 1:
{
SendClientMessage(playerid, 0xFF0000FF, "TEST1");
}
case 2:
{
SendClientMessage(playerid, 0xFF0000FF, "TEST2");
}
case 3:
{
SendClientMessage(playerid, 0xFF0000FF, "TEST3");
}
case 4:
{
SendClientMessage(playerid, 0xFF0000FF, "TEST4");
}
case 5:
{
SendClientMessage(playerid, 0xFF0000FF, "TEST5");
}
case 6:
{
SendClientMessage(playerid, 0xFF0000FF, "TEST6");
}
   }
}
Edited by FlOrINn

:P Respecta ca sa fi respectact :P 

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

Developer in :

C++,PHP,HTML,CSS,JAVASCRIPT,XML,MYSQL

si ceva  Pawno :)

WebDesign,Photoshop

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

/////////////////////////////////////////////////////////////////////////////////////////

=============================================

Steam ~ Kiburici

=============================================

Link to comment
Share on other sites

  • 0

Ok ca sa intelegi mai bine invata sa folosesti urmatoarele functii si callbacks:

http://wiki.sa-mp.com/wiki/ShowPlayerDialog

http://wiki.sa-mp.com/wiki/OnDialogResponse

Aici iti da exemplu concret cum trebuie sa faci.

Exemplu:

if(dialogid == DIALOG_HELPME)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", "");
        }
                case 1:
                {
                    ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", "");
        }
                    case 2:
                {
                    ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", "");
        }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "Ai anulat")
        }
    }

Daca ai mai multe cazuri doar copii:

case 2:
                {
                    ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", "");
        }

 

Si ii schimbi numarul din case 2 in case 3.

Edited by Джо

 

 

Link to comment
Share on other sites

  • 0

Джо nu sunt chiar asa cum ma consideri, am incercat aia inainte in helpme si nu a functionat ,am cautat dialogul care imi aparea si l-am sters nici nu avea id dialogul ala si daia.

:P Respecta ca sa fi respectact :P 

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

Developer in :

C++,PHP,HTML,CSS,JAVASCRIPT,XML,MYSQL

si ceva  Pawno :)

WebDesign,Photoshop

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

/////////////////////////////////////////////////////////////////////////////////////////

=============================================

Steam ~ Kiburici

=============================================

Link to comment
Share on other sites

  • 0

Am rezolvat-o pana la urma :| ciudat este ca aveam defenit dialogul ala cu alt id :Z l-am facut din nou si a functionat !

Multumesc pentru ajutor !

:P Respecta ca sa fi respectact :P 

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

Developer in :

C++,PHP,HTML,CSS,JAVASCRIPT,XML,MYSQL

si ceva  Pawno :)

WebDesign,Photoshop

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

/////////////////////////////////////////////////////////////////////////////////////////

=============================================

Steam ~ Kiburici

=============================================

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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. For more details you can also review our Terms of Use and Privacy Policy.