Guest User

Untitled

a guest
Feb 7th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. case DIALOG_INVENTORY:
  2. {
  3. if(response)
  4. {
  5. switch(listitem)
  6. {
  7. case 0:
  8. {
  9. if(PlayerInfo[playerid][pIAmphetamine] >= 1)
  10. {
  11. return ShowPlayerDialog(playerid, DIALOG_IAMPHETAMINE, DIALOG_STYLE_LIST,""COL_WHITE"Amphetamine Pill", "Use\nShow\nDrop", "Select", "Cancel");
  12. }
  13. if(PlayerInfo[playerid][pIBackpack] >= 1)
  14. {
  15. return ShowPlayerDialog(playerid, DIALOG_IBACKPACK, DIALOG_STYLE_LIST,""COL_WHITE"Backpack", "Use\nShow\nDrop", "Select", "Cancel");
  16. }
  17. if(PlayerInfo[playerid][pICocaine] >= 1)
  18. {
  19. return ShowPlayerDialog(playerid, DIALOG_ICOCAINE, DIALOG_STYLE_LIST,""COL_WHITE"Ball of Cocaine", "Use\nShow\nDrop", "Select", "Cancel");
  20. }
  21. if(PlayerInfo[playerid][pIHikingBag] >= 1)
  22. {
  23. return ShowPlayerDialog(playerid, DIALOG_IHIKING, DIALOG_STYLE_LIST,""COL_WHITE"Hiking Bag", "Use\nShow\nDrop", "Select", "Cancel");
  24. }
  25. if(PlayerInfo[playerid][pIMarijuana] >= 1)
  26. {
  27. return ShowPlayerDialog(playerid, DIALOG_IMARIJUANA, DIALOG_STYLE_LIST,""COL_WHITE"Marijuana Cigarette", "Use\nShow\nDrop", "Select", "Cancel");
  28. }
  29. }
  30. case 1:
  31. {
  32. if(PlayerInfo[playerid][pIBackpack] >= 1)
  33. {
  34. while(PlayerInfo[playerid][pIAmphetamine] >= 1)
  35. {
  36. return ShowPlayerDialog(playerid, DIALOG_IBACKPACK, DIALOG_STYLE_LIST,""COL_WHITE"Backpack", "Use\nShow\nDrop", "Select", "Cancel");
  37. }
  38. }
  39. if(PlayerInfo[playerid][pICocaine] >= 1)
  40. {
  41. while(PlayerInfo[playerid][pIAmphetamine] >= 1 || PlayerInfo[playerid][pIBackpack] >= 1)
  42. {
  43. return ShowPlayerDialog(playerid, DIALOG_ICOCAINE, DIALOG_STYLE_LIST,""COL_WHITE"Ball of Cocaine", "Use\nShow\nDrop", "Select", "Cancel");
  44. }
  45. }
  46. if(PlayerInfo[playerid][pIHikingBag] >= 1)
  47. {
  48. while(PlayerInfo[playerid][pIAmphetamine] >= 1 || PlayerInfo[playerid][pIBackpack] >= 1 || PlayerInfo[playerid][pICocaine] >= 1)
  49. {
  50. return ShowPlayerDialog(playerid, DIALOG_IHIKING, DIALOG_STYLE_LIST,""COL_WHITE"Hiking Bag", "Use\nShow\nDrop", "Select", "Cancel");
  51. }
  52. }
  53. if(PlayerInfo[playerid][pIMarijuana] >= 1)
  54. {
  55. while(PlayerInfo[playerid][pIAmphetamine] >= 1 || PlayerInfo[playerid][pIBackpack] >= 1 || PlayerInfo[playerid][pICocaine] >= 1 || PlayerInfo[playerid][pIHikingBag] >= 1)
  56. {
  57. return ShowPlayerDialog(playerid, DIALOG_IMARIJUANA, DIALOG_STYLE_LIST,""COL_WHITE"Marijuana Cigarette", "Use\nShow\nDrop", "Select", "Cancel");
  58. }
  59. }
  60. }
  61. case 2:
  62. {
  63. if(PlayerInfo[playerid][pICocaine] >= 1)
  64. {
  65. while(PlayerInfo[playerid][pIAmphetamine] >= 1 && PlayerInfo[playerid][pIBackpack] >= 1)
  66. {
  67. return ShowPlayerDialog(playerid, DIALOG_ICOCAINE, DIALOG_STYLE_LIST,""COL_WHITE"Ball of Cocaine", "Use\nShow\nDrop", "Select", "Cancel");
  68. }
  69. }
  70. if(PlayerInfo[playerid][pIHikingBag] >= 1)
  71. {
  72. while(PlayerInfo[playerid][pIAmphetamine] >= 1 || PlayerInfo[playerid][pIBackpack] >= 1 || PlayerInfo[playerid][pICocaine] >= 1)
  73. {
  74. while(PlayerInfo[playerid][pIBackpack] >= 1 || PlayerInfo[playerid][pICocaine] >= 1)
  75. {
  76. return ShowPlayerDialog(playerid, DIALOG_IHIKING, DIALOG_STYLE_LIST,""COL_WHITE"Hiking Bag", "Use\nShow\nDrop", "Select", "Cancel"); // This is where my problem is, I know it's returning the Backpack twice, so it figures Hiking Bag is where it should be. I can't figure out how to go through this.
  77. }
  78. }
  79. }
  80. if(PlayerInfo[playerid][pIMarijuana] >= 1)
  81. {
  82. while(PlayerInfo[playerid][pIAmphetamine] >= 1 || PlayerInfo[playerid][pIBackpack] >= 1 || PlayerInfo[playerid][pICocaine] >= 1 || PlayerInfo[playerid][pIHikingBag] >= 1 && PlayerInfo[playerid][pIBackpack] >= 1 || PlayerInfo[playerid][pICocaine] >= 1 || PlayerInfo[playerid][pIHikingBag] >= 1)
  83. {
  84. return ShowPlayerDialog(playerid, DIALOG_IMARIJUANA, DIALOG_STYLE_LIST,""COL_WHITE"Marijuana Cigarette", "Use\nShow\nDrop", "Select", "Cancel");
  85. }
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment