I need some help whit MAPMENU
#1

I made 2 MAPMENU whit command /uniform in 2 different place one in hospital, and other one in police station. Menu work normal and compiles but when i take skin for cop, gives me skin from medic. How to separate to responds the skins each menu?
Thank you.



Code:
#include <a_samp>

#define MAPMENU 11

#define PlayerToPoint(%1, %2, %3, %4, %5) IsPlayerInRangeOfPoint(%2, %1, %3, %4, %5)

#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(uniform,7, cmdtext);
  return 0;
}

dcmd_uniform(playerid, params[])
{
   #pragma unused params
   if(IsPlayerInRangeOfPoint(playerid, 7.0,1622.3131,1801.3890,20.4099))
   {
      ShowPlayerDialog(playerid, MAPMENU, DIALOG_STYLE_LIST, "Las Venturas Medic Department","Male Uniform\n \n• Uniform green shirt\n• Uniform blue shirt\n• Uniform white shirt\n \nFemale Uniform\n \n• Uniform one\n• Uniform two\n• Uniform three\n \n• Seringue", "Take", "Cancel");
   }
   else if(IsPlayerInRangeOfPoint(playerid, 8.0,209.9964,185.1304,1003.0313))
   {
     ShowPlayerDialog(playerid, MAPMENU, DIALOG_STYLE_LIST, "Las Venturas Police Department","Uniform\n \nUniform 1\nUniform 2\nUniform 3\nUniform 4\nUniform 5\nUniform 6", "Take", "Cancel");
   }
   return 0;
}



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == MAPMENU)
	{
		if(response)
		{
			if(listitem == 0) // Male Uniform Medic
			{
			}
			if(listitem == 1) // None
			{
			}
			if(listitem == 2) // Uniform one
			{
  				SetPlayerSkin(playerid, 276);
			}
			if(listitem == 3) // Uniform two
			{
  				SetPlayerSkin(playerid, 275);
			}
			if(listitem == 4) // Uniform three
			{
  				SetPlayerSkin(playerid, 274);
			}
			if(listitem == 5) // None
			{
			}
			if(listitem == 6) // Female Uniform Medic
			{
			}
			if(listitem == 7) // None
			{
			}
			if(listitem == 8) // Uniform One
			{
  				SetPlayerSkin(playerid, 11);
			}
			if(listitem == 9) // Uniform two
			{
  				SetPlayerSkin(playerid, 172);
			}
			if(listitem == 10) // Uniform three
			{
  				SetPlayerSkin(playerid, 194);
  			}
  			if(listitem == 11) // None
			{
  			}
			if(listitem == 12) // Didlo
			{
  				GivePlayerWeapon(playerid, 11, 0);
      }
      else if(dialogid == MAPMENU)
      {
      if(response)
      {
      if(listitem == 0) // Uniform Police
      {
      }
      if(listitem == 13) // None
      {
      }
      if(listitem == 14) // Uniform 1
      {
	    SetPlayerSkin(playerid, 280);
      }
      if(listitem == 15) // Uniform 2
      {
  		  SetPlayerSkin(playerid, 281);
      }
      if(listitem == 16) // Uniform 3
      {
	    SetPlayerSkin(playerid, 282);
      }
      if(listitem == 17) // Uniform 4
      {
      SetPlayerSkin(playerid, 283);
      }
      if(listitem == 18) // Uniform 6
      {
	    SetPlayerSkin(playerid, 285);
      }
      if(listitem == 19) // Uniform 6
      {
	    SetPlayerSkin(playerid, 285);
      }
     }
    }
   }
  }
  return 1;
}
Reply
#2

Show us the code? And these are dialogs, not menus.
Reply
#3

Quote:
Originally Posted by _Xerxes_
Show us the code? And these are dialogs, not menus.
Code is there, isn't it?
Reply
#4

Quote:
Originally Posted by _Xerxes_
Show us the code? And these are dialogs, not menus.
Code is there. Any idea?
Reply
#5

Err, overlooked it sorry.
Reply
#6

pawn Code:
if(dialogid == MAPMENU)
else if(dialogid == MAPMENU)
What the..?
You should use 2 defines, instead of 1 called MAPMENU
Reply
#7

Well i used
Code:
#define MAPMENU2 11

ShowPlayerDialog(playerid, MAPMENU2, DIALOG_STYLE_LIST 

 else if(dialogid == MAPMENU2) ....
Is same.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)