Jump to content
  • 0

Comanda /su


opy

Question

Problema intalnita (descriere): Cum pot face ca atunci cand un membru PD foloseste comanda /su ID sa apara un dialog si sa selecteze el din dialog ce wanted sa dea, sper ca ati inteles, sunt incepator si am acest dialog. P.S Nu inteleg de ce atunci cand activez comanda pe gamemode foloseste dialogu asta si la celelalte dialoguri, exemplu daca dau /gps si aleg o locatie imi spune: Ai oferit wanted 1 pentru bataie pe strada
Ero(area / rile) / warning-(ul / urile): Nu sunt erori.
Liniile de cod / sursa / script-ul(obligatoriu):

#include < a_samp >


#include < zcmd >


#define SCM                    SendClientMessage
#define COLOR_RED           0xAA3333AA
#define WantedDialogDa      150
#define SPD                 ShowPlayerDialog

CMD: su(playerid,params[])
{
SPD(playerid, 150, 2, "WantedDialogDa", "Bataie pe Strada\t\t\tWanted 1\nCrima\t\t\tWanted 3\nComplice\t\t\tWanted 5", "Am inteles", "Iesire");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(response)
  {
   if(listitem == 0)
   {
    SCM(playerid, COLOR_RED, "Ai oferit wanted 1 pentru bataie pe strada");
   }
   if(listitem == 1)
   {
    SCM(playerid, COLOR_RED, "Ai oferit wanted 3 pentru Crima");
   }
   if(listitem == 2)
   {
    SCM(playerid, COLOR_RED, "Ai oferim wanted 5 pentru Complice");
   }
  }
  else
  {
    SCM(playerid, COLOR_RED, "Ai anulat operatia de Wanted");
  }
  return 1;

}

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da dar sunt incepator

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

#include < a_samp >


#include < zcmd >

#define SCM                    SendClientMessage
#define COLOR_RED           0xAA3333AA
#define DIALOG_SU      150
#define SPD                 ShowPlayerDialog

CMD: su(playerid,params[])
{
    SPD(playerid, DIALOG_SU, DIALOG_STYLE_LIST, "WantedDialogDa", "Bataie pe Strada\t\t\tWanted 1\nCrima\t\t\tWanted 3\nComplice\t\t\tWanted 5", "Am inteles", "Iesire");

return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_SU)
    {
        if(!response) return SCM(playerid, COLOR_RED, "Ai anulat operatia de Wanted");
        if(listitem == 0)
        {
            SCM(playerid, COLOR_RED, "Ai oferit wanted 1 pentru bataie pe strada");
        }
        if(listitem == 1)
        {
            SCM(playerid, COLOR_RED, "Ai oferit wanted 3 pentru Crima");
        }
        if(listitem == 2)
        {
            SCM(playerid, COLOR_RED, "Ai oferim wanted 5 pentru Complice");
        }
    }    
    return 1;

}

Edited by Gireada

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

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.