Advertisement
Guest User

objekti

a guest
Mar 1st, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1.  
  2.  
  3. #include <a_samp>
  4.  
  5.  
  6. public OnPlayerCommandText(playerid, cmdtext[])
  7. {
  8. if (strcmp("/objects", cmdtext, true, 10) == 0)
  9. {
  10. ShowPlayerDialog(playerid,99,DIALOG_STYLE_LIST,"{FF002B}OBJEKTI","Sprunk\nDragon\nBarrel 1\nBarrel 2\nSmoke Mach\nHaybreak\nSAM Site\nTorch\nSkull\nUFO Sign\nUFO Light\nPetrol Pump\nAmmo Boxes\n{FF002B}Remove Object","IZABERI","IZADJI");
  11. return 1;
  12. }
  13. return 0;
  14. }
  15.  
  16. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  17. {
  18. if(response)
  19. {
  20. switch(dialogid == 99)
  21. {
  22. case 1:
  23. {
  24. switch(listitem)
  25. {
  26. case 0:
  27. {
  28. SetPlayerAttachedObject(playerid,1,13562,true,0.0,0.0,0.0,0.0);
  29. GameTextForPlayer(playerid,"~g~SPRUNK ~w~CREATED",4000,3);
  30. }
  31. case 1:
  32. {
  33. SetPlayerAttachedObject(playerid,1,3528,true,0.0,0.0,0.0,0.0);
  34. GameTextForPlayer(playerid,"~g~DRAGON ~w~CREATED",4000,3);
  35. }
  36. case 2:
  37. {
  38. SetPlayerAttachedObject(playerid,1,1218,true,0.0,0.0,0.0,0.0);
  39. GameTextForPlayer(playerid,"~g~BARREL 1 ~w~CREATED",4000,3);
  40. }
  41. case 3:
  42. {
  43. SetPlayerAttachedObject(playerid,1,1217,true,0.0,0.0,0.0,0.0);
  44. GameTextForPlayer(playerid,"~g~BARREL 2 ~w~CREATED",4000,3);
  45. }
  46. case 4:
  47. {
  48. SetPlayerAttachedObject(playerid,1,1780,true,0.0,0.0,0.0,0.0);
  49. GameTextForPlayer(playerid,"~g~SMOKE MACH ~w~CREATED",4000,3);
  50. }
  51. case 5:
  52. {
  53. SetPlayerAttachedObject(playerid,1,3374,true,0.0,0.0,0.0,0.0);
  54. GameTextForPlayer(playerid,"~g~HAYBREAK ~w~CREATED",4000,3);
  55. }
  56. case 6:
  57. {
  58. SetPlayerAttachedObject(playerid,1,3267,true,0.0,0.0,0.0,0.0);
  59. GameTextForPlayer(playerid,"~g~SAM SITE ~w~CREATED",4000,3);
  60. }
  61. case 7:
  62. {
  63. SetPlayerAttachedObject(playerid,1,3461,true,0.0,0.0,0.0,0.0);
  64. GameTextForPlayer(playerid,"~g~TIKI TORCH ~w~CREATED",4000,3);
  65. }
  66. case 8:
  67. {
  68. SetPlayerAttachedObject(playerid,1,3524,true,0.0,0.0,0.0,0.0);
  69. GameTextForPlayer(playerid,"~g~SKULL ~w~CREATED",4000,3);
  70. }
  71. case 9:
  72. {
  73. SetPlayerAttachedObject(playerid,1,16778,true,0.0,0.0,0.0,0.0);
  74. GameTextForPlayer(playerid,"~g~UFO SIGN ~w~CREATED",4000,3);
  75. }
  76. case 10:
  77. {
  78. SetPlayerAttachedObject(playerid,1,16779,true,0.0,0.0,0.0,0.0);
  79. GameTextForPlayer(playerid,"~g~UFO LIGHT ~w~CREATED",4000,3);
  80. }
  81. case 11:
  82. {
  83. SetPlayerAttachedObject(playerid,1,1686,true,0.0,0.0,0.0,0.0);
  84. GameTextForPlayer(playerid,"~g~PETROL PUMP ~w~CREATED",4000,3);
  85. }
  86. case 12:
  87. {
  88. ShowPlayerDialog(playerid,98,DIALOG_STYLE_LIST,"{FF002B}OBJEKTI > AMMO BOXES","Box 1\nBox 2\nBox 3\nBox 4\nBox 5\nBox 6\n{FF002B}Return","IZABERI","IZADJI");
  89. }
  90. case 13:
  91. {
  92. RemovePlayerAttachedObject(playerid,1);
  93. GameTextForPlayer(playerid,"~g~OBJECT ~w~REMOVED",4000,3);
  94. }
  95. }
  96. }
  97. }
  98. switch(dialogid == 98)
  99. {
  100. case 1:
  101. {
  102. switch(listitem)
  103. {
  104. case 0:
  105. {
  106. SetPlayerAttachedObject(playerid,1,2040,true,0.0,0.0,0.0,0.0);
  107. GameTextForPlayer(playerid,"~g~AMMO BOX 1 ~w~CREATED",4000,3);
  108. }
  109. case 1:
  110. {
  111. SetPlayerAttachedObject(playerid,1,2041,true,0.0,0.0,0.0,0.0);
  112. GameTextForPlayer(playerid,"~g~AMMO BOX 2 ~w~CREATED",4000,3);
  113. }
  114. case 2:
  115. {
  116. SetPlayerAttachedObject(playerid,1,2042,true,0.0,0.0,0.0,0.0);
  117. GameTextForPlayer(playerid,"~g~AMMO BOX 3 ~w~CREATED",4000,3);
  118. }
  119. case 3:
  120. {
  121. SetPlayerAttachedObject(playerid,1,2043,true,0.0,0.0,0.0,0.0);
  122. GameTextForPlayer(playerid,"~g~AMMO BOX 4 ~w~CREATED",4000,3);
  123. }
  124. case 4:
  125. {
  126. SetPlayerAttachedObject(playerid,1,2358,true,0.0,0.0,0.0,0.0);
  127. GameTextForPlayer(playerid,"~g~AMMO BOX 5 ~w~CREATED",4000,3);
  128. }
  129. case 5:
  130. {
  131. SetPlayerAttachedObject(playerid,1,2359,true,0.0,0.0,0.0,0.0);
  132. GameTextForPlayer(playerid,"~g~AMMO BOX 6 ~w~CREATED",4000,3);
  133. }
  134. case 6:
  135. {
  136. ShowPlayerDialog(playerid,99,DIALOG_STYLE_LIST,"{FF002B}OBJEKTI","Sprunk\nDragon\nBarrel 1\nBarrel 2\nSmoke Mach\nHaybreak\nSAM Site\nTorch\nSkull\nUFO Sign\nUFO Light\nPetrol Pump\nAmmo Boxes\n{FF002B}Remove Object","IZABERI","IZADJI");
  137. }
  138. }
  139. }
  140. }
  141. }
  142. return 1;
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement