Jump to content

návod Dialógy A Všetko O Nich [*]


Lax.

Recommended Posts

Plsky moc tomu nechápu, jak mám udělat funkci pro tlačítko 2 Dialogy používám jen na 1 tlačítko asi takhle

if(dialogid == 1524)
   {
    if(response == 1)
          {
          switch(listitem)
              {
         	    case 0:
       	    {
               SetPlayerPos(playerid,790.8370,-2356.4290,4.0630);
               SendClientMessage(playerid, 0x008000AA, "Připojil si se na derby");
               SetPlayerInterior(playerid, 0);
       	    }
       	    case 1:
       	    {
               SetPlayerPos(playerid,-305.1209,1533.0859,75.3594);
               SendClientMessage(playerid, 0x008000AA, "Připojil si se na drift");
               SetPlayerInterior(playerid, 0);
       	    }
       	    case 2:
       	    {
               SetPlayerPos(playerid,-82.3281,2500.5935,16.4844);
               SendClientMessage(playerid, 0x008000AA, "Připojil si se na drag");
               SetPlayerInterior(playerid, 0);
               }
               }
         }
   }

 

Ale dnes sem si chtěl udělat dialog, styl MSGBOX, ale nwm jak na to 2 tlačítko. Pls "help"

Link to comment
Share on other sites

if(dialogid == 1524)

{

if(response == 1)

{

switch(listitem)

{

case 0:

{

SetPlayerPos(playerid,790.8370,-2356.4290,4.0630);

SendClientMessage(playerid, 0x008000AA, "Připojil si se na derby");

SetPlayerInterior(playerid, 0);

}

case 1:

{

SetPlayerPos(playerid,-305.1209,1533.0859,75.3594);

SendClientMessage(playerid, 0x008000AA, "Připojil si se na drift");

SetPlayerInterior(playerid, 0);

}

case 2:

{

SetPlayerPos(playerid,-82.3281,2500.5935,16.4844);

SendClientMessage(playerid, 0x008000AA, "Připojil si se na drag");

SetPlayerInterior(playerid, 0);

}

}

}

Tady //nebo sem se spletl o závorku :d

}

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • 4 weeks later...
  • 3 months later...
  • 3 months later...

Nachapu kam to mam napsat .

 

Chci udělat dialog v kterym bude text (příkazy)

a nevim kam mam napsat toto:

 

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Příkazy","/blabla\n/aaa\nRiadok 3","Tlačidlo 1","Tlačidlo 2");

 

(jestli jako do ongamemode int pod return nebo kam proste)

Link to comment
Share on other sites

Hici kde do modu

 

#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

 

public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(prikazy,7,cmdtext);
}

 

hockde do modu

 

dcmd_prikazy(playerid,params[]){
#pragma unused params
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Příkazy","/blabla\n/aaa\nRiadok 3","Tlačidlo 1","Tlačidlo 2");
}

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 3 weeks later...

Čawte mám taký problém v pawne mi nehádže žiadny error no keď to dám na server nechce mi to ukázať dialog ... hovorím o tom prehadzovaní položiek ... v pawne mám aj new , stock aj v OnDialogResponse mám tie veci ShowedPlayerDialog[playerid]=false; za každým ShowPlayerDialog

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...