Advertisement
Guest User

Untitled

a guest
Mar 13th, 2018
566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. //********************************** DILER SISTEM ***********************************//
  2. // Obican diler sistem by Lukkaku
  3. //RESPECT TO PURDA
  4. //***********************************************************************************//
  5.  
  6.  
  7. #define DIALOG_DILER 705
  8.  
  9.  
  10. OSTALIH KOMANDI!YCMD:diler(playerid, params[],help)
  11. {
  12. if(UlogovanProvera[playerid] == 0) return Error(playerid,"Nisi ulogovan/a ili nisi registroivan/a");
  13. if(PI[playerid][Lider] == 1 || PI[playerid][Lider] == 2 || PI[playerid][Clan] == 1 || PI[playerid][Clan] == 2) return Error(playerid, "Ti si LSPD/FBI/SAJ,ne mozes kupovati od Dealera!");
  14. {
  15. if(!IgracKodDilera(playerid)) return SCM_BS(playerid,"Morate biti ispred Dealera da bi kupili robu!");
  16. SPD(playerid, DIALOG_DILER, DIALOG_STYLE_LIST, "Kupovina", "AK47(2000$)\nM4A1(3500$)\nSniper(4000$)\nCannabis(200$)\nDeagle(2200$)\nCocain(300$)\nPancir(800$)", "Kupi", "Odustani");
  17. }
  18. return 1;
  19. }
  20.  
  21.  
  22. CreateActor(29,X:1273.898 Y:-1719.304 Z:54.771 ); // DILER 1
  23. CreateActor(28,X:126.135 Y:-1278.583 Z:29.270); // DILER 2
  24. CreateDynamic3DTextLabel("{FFFFFF}[ {FFD700}Diler {FFFFFF}]\n/Dealer da kupite od Dealer!", TAMNOPLAVA,2288.6343,-1642.5212,14.9966, 15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
  25. CreateDynamic3DTextLabel("{FFFFFF}[ {FFD700}Diler {FFFFFF}]\n/Dealer da kupite od Dealer!", TAMNOPLAVA,2257.5627,-1408.5022,24.0000, 15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
  26.  
  27. // MEDJU OSTALE STOCK NAJBOLJE UBACITI
  28. stock IgracKodDilera(playerid)
  29. {
  30. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2288.6343,-1642.5212,14.9966)) return 1;// 1
  31. else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2257.5627,-1408.5022,24.0000)) return 1;// 2
  32.  
  33. return 0;
  34. }
  35.  
  36. //
  37. if(dialogid == DIALOG_DILER)
  38. {
  39. if(response)
  40. {
  41. if (listitem == 0)
  42. {
  43. GivePlayerWeapon(playerid, 30, 120);
  44. g_NovacMinus(playerid, 2000);
  45. SCM_BS(playerid, "Kupili ste AK-47 sa 220 metaka za 1500$ od dilera!");
  46. }
  47. else if (listitem == 1)
  48. {
  49. GivePlayerWeapon(playerid, 31, 120);
  50. g_NovacMinus(playerid, 3500);
  51. SCM_BS(playerid, "Kupili ste M4 sa 220 metaka za 2500$ od dilera!");
  52. }
  53. else if (listitem == 2)
  54. {
  55. GivePlayerWeapon(playerid, 34, 60);
  56. g_NovacMinus(playerid, 4000);
  57. SCM_BS(playerid, "Kupili ste Sniper sa 120 metaka za 3000$ od dilera!");
  58. }
  59. else if (listitem == 3)
  60. {
  61. PI[playerid][Cannabis]++;
  62. g_NovacMinus(playerid, 200);
  63. SCM_BS(playerid, "Kupili ste 1g Marihuane za 500$ od dilera!");
  64. }
  65. else if (listitem == 4)
  66. {
  67. GivePlayerWeapon(playerid, 24, 60);
  68. g_NovacMinus(playerid, 2200);
  69. SCM_BS(playerid, "Kupili ste Desert Eagle sa 120 metaka za 2500$ od dilera!");
  70. }
  71. else if (listitem == 5)
  72. {
  73. PI[playerid][Kokain]++;
  74. g_NovacMinus(playerid, 300);
  75. SCM_BS(playerid, "Kupili ste 1g Kokaina za 200$ od dilera!");
  76. }
  77. else if (listitem == 6)
  78. {
  79. g_SetPlayerArmour(playerid,100);
  80. g_NovacMinus(playerid, 800);
  81. SCM_BS(playerid, "Kupili ste Pancir za 700$ od dilera!");
  82. }
  83.  
  84. }
  85. }
  86.  
  87. stock SCM_BS(playerid, text[])
  88. {
  89. new ffstr[128];
  90. format(ffstr, 128, "{0099FF}[GOLD CITY] "C_ZUTA"%s", text);
  91. SCM(playerid, BELA, ffstr); // 0xBFC0C2FF
  92. return 1;
  93. }
  94.  
  95.  
  96. stock g_NovacMinus(id, iznos)
  97. {
  98. GivePlayerMoney(id, -iznos);
  99. PI[id][pMoney] -= iznos;
  100. return 1;
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement