Dialog help!
#1

Hey!


Код:
#include <a_samp>

#if defined FILTERSCRIPT

#else

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/Jobs", cmdtext, true, 10) == 0)
	{
 		ShowPlayerDialog(playerid, 157, DIALOG_STYLE_LIST, "Job information", "Police \nPilot \nTaxi", "Select", "Cancel");
		return 1;
		}
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    if(dialogid == 157 && response)
  {
    switch(listitem)
    {
      case 0:
      {
				SendClientMessageToAll(0xAA0000AA,"Type /Police to see information about police job!");
      }
      case 1:
      {
     		SendClientMessage(playerid,0xAA0000AA,"Type /Pilot to see information about pilot job!");
      }
      case 2:
      {
				SendClientMessage(playerid,0xAA0000AA,"Type /Taxi to see information about taxi job!");
      }
    }
  }
		return 1;
}
#endif
When I do /jobs, the menu pops up well and things work great, UNTIL
When I select any of those "Police, Pilot, Taxi" -> NOTHING pops up, what should happen is that SendClientMessage sends the message for that selection.

It Compiles without errors or warnings.

Anyone knows whats wrong?


Regards,
Assyria
Reply
#2

It should be DIALOG_STYLE_LIST
Reply
#3

Oh, It was but I changed for a try for that. That didnt work too.
Reply
#4

You press the button too after you select it?
Reply
#5

Yes
Reply
#6

This code is working, it has to be something else.
Reply
#7

Yes, code is working, but when I select example, "Police" and click "Select"... nothing happeds... What should happen is come a message what I have set with SendClientMessage in case 0
Reply
#8

I mean I tested this code and I can see the message.
Reply
#9

bump
Reply
#10

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

#else

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/Jobs", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Job information", "Police \nPilot \nTaxi", "Select", "Cancel");
        return 1;
        }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    if(dialogid == 157 && response)
  {
    switch(listitem)
    {
      case 0:
      {
                SendClientMessageToAll(0xAA0000AA,"Type /Police to see information about police job!");
      }
      case 1:
      {
            SendClientMessage(playerid,0xAA0000AA,"Type /Pilot to see information about pilot job!");
      }
      case 2:
      {
                SendClientMessage(playerid,0xAA0000AA,"Type /Taxi to see information about taxi job!");
      }
    }
  }
        return 1;
}
#endif
thats not the fixed im saying is it because /jobs has
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Job information", "Police \nPilot \nTaxi", "Select", "Cancel");
the id 1 and dialog response has
pawn Код:
if(dialogid == 157 && response)
  {
? i bet it is...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)