05.01.2010, 21:10
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.
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; }