Guest User

denis

a guest
Apr 27th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. if(dialogid == 69)
  2. {
  3. if(response)
  4. {
  5. if (listitem == 0 && GetPlayerMoney(playerid) > 149)
  6. {
  7. if(PlayerInfo[playerid][pTraderPerk] > 0)
  8. {
  9. new skill = 150 / 100;
  10. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  11. new payout = 150 - price;
  12. format(string, sizeof(string), "~r~-$%d", payout);
  13. GameTextForPlayer(playerid, string, 5000, 1);
  14. GivePlayerCash(playerid,- payout);
  15. SBizzInfo[16][sbTill] += payout;
  16. ExtortionSBiz(16, payout);
  17. SBizzInfo[16][sbProducts]--;
  18. OnPropUpdate();
  19.  
  20. }
  21. else
  22. {
  23. format(string, sizeof(string), "~r~-$%d", 150);
  24. GameTextForPlayer(playerid, string, 5000, 1);
  25. GivePlayerCash(playerid,-150);
  26. SBizzInfo[16][sbTill] += 150;
  27. ExtortionSBiz(16, 150);
  28. SBizzInfo[16][sbProducts]--;
  29. OnPropUpdate();
  30. }
  31. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  32. new randphone = 100000 + random(899999);//minimum 1000 max 9999
  33. PlayerInfo[playerid][pPnumber] = randphone;
  34. format(string, sizeof(string), "Kupili ste mobilni, vas novi broj je {FFFFFF}%d", randphone);
  35. SendClientMessage(playerid, ZELENKASTA, string);
  36. SendClientMessage(playerid, ZELENKASTA, "Ovo uvjek mozete provjeriti kucajuci {FFFFFF}/ucp");
  37. SendClientMessage(playerid, ZELENKASTA, "Podsjetnik: Sada mozete kucati /help da vidite komande od telefona.");
  38. return 1;
  39. }
  40. else if (listitem == 1 && GetPlayerMoney(playerid) > 500)
  41. {
  42. if(PlayerInfo[playerid][pTraderPerk] > 0)
  43. {
  44. new skill = 500 / 100;
  45. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  46. new payout = 500 - price;
  47. GivePlayerCash(playerid,- payout);
  48. SBizzInfo[16][sbTill] += payout;
  49. ExtortionSBiz(16, payout);
  50. SBizzInfo[16][sbProducts]--;
  51. OnPropUpdate();
  52. format(string, sizeof(string), "~r~-$%d", payout);
  53. GameTextForPlayer(playerid, string, 5000, 1);
  54. }
  55. else
  56. {
  57. GivePlayerCash(playerid,-500);
  58. SBizzInfo[16][sbTill] += 500;
  59. ExtortionSBiz(16, 500);
  60. SBizzInfo[16][sbProducts]--;
  61. OnPropUpdate();
  62. format(string, sizeof(string), "~r~-$%d", 500);
  63. GameTextForPlayer(playerid, string, 5000, 1);
  64. }
  65. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  66. new prize;
  67. new symb1[32]; new symb2[32]; new symb3[32];
  68. new randcard1 = random(10);//minimum 1000 max 9999
  69. new randcard2 = random(10);//minimum 1000 max 9999
  70. new randcard3 = random(10);//minimum 1000 max 9999
  71. if(randcard1 >= 5)
  72. {
  73. format(symb1, sizeof(symb1), "~b~]");
  74. randcard1 = 1;
  75. }
  76. else if(randcard1 <= 4 && randcard1 >= 2)
  77. {
  78. format(symb1, sizeof(symb1), "~g~]");
  79. randcard1 = 2;
  80. }
  81. else if(randcard1 < 2)
  82. {
  83. format(symb1, sizeof(symb1), "~y~]");
  84. randcard1 = 3;
  85. }
  86. if(randcard2 >= 5)
  87. {
  88. format(symb2, sizeof(symb2), "~b~]");
  89. randcard2 = 1;
  90. }
  91. else if(randcard2 <= 4 && randcard2 >= 2)
  92. {
  93. format(symb2, sizeof(symb2), "~g~]");
  94. randcard2 = 2;
  95. }
  96. else if(randcard2 < 2)
  97. {
  98. format(symb2, sizeof(symb2), "~y~]");
  99. randcard2 = 3;
  100. }
  101. if(randcard3 >= 5)
  102. {
  103. format(symb3, sizeof(symb3), "~b~]");
  104. randcard3 = 1;
  105. }
  106. else if(randcard3 <= 4 && randcard3 >= 2)
  107. {
  108. format(symb3, sizeof(symb3), "~g~]");
  109. randcard3 = 2;
  110. }
  111. else if(randcard3 < 2)
  112. {
  113. format(symb3, sizeof(symb3), "~y~]");
  114. randcard3 = 3;
  115. }
  116. if(randcard1 == randcard2 && randcard1 == randcard3)
  117. {
  118. if(randcard1 > 5)
  119. {
  120. prize = 2500;
  121. }
  122. if(randcard1 <= 4 && randcard1 >= 2)
  123. {
  124. prize = 1500;
  125. }
  126. if(randcard1 < 2)
  127. {
  128. prize = 500;
  129. }
  130. GivePlayerCash(playerid,prize);
  131. SBizzInfo[16][sbTill] -= prize;
  132. ExtortionSBiz(16, prize);
  133. SBizzInfo[16][sbProducts]--;
  134. OnPropUpdate();
  135. format(string, sizeof(string), "%s %s %s ~n~~n~~w~~g~$%d",symb1,symb2,symb3, prize);
  136. }
  137. else
  138. {
  139. format(string, sizeof(string), "%s %s %s ~n~~n~~w~~r~$0",symb1,symb2,symb3);
  140. }
  141. GameTextForPlayer(playerid, string, 3000, 3);
  142. return 1;
  143. }
Advertisement
Add Comment
Please, Sign In to add comment