Advertisement
NTNGuyenthanh

System /BenhVien

Aug 22nd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.68 KB | None | 0 0
  1.  
  2. //add tren dau gm
  3. #define BENHVIENMAU (5090)
  4.  
  5.  
  6. //tim public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  7. //add duoi new string[128];
  8.  
  9. if(dialogid == BENHVIENMAU)
  10. {
  11. if(response)
  12. {
  13. if(listitem == 0)
  14. {
  15. if((PlayerInfo[playerid][pCash] <10000))
  16. {
  17. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
  18. }
  19. else
  20. {
  21. new Float:health;
  22. GetPlayerHealth(playerid, health);
  23. new hpint = floatround( health, floatround_round );
  24. if( hpint >= 1000 )
  25. {
  26. SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
  27. return 1;
  28. }
  29. else
  30. {
  31. if (health < 20.0)
  32. {
  33. SetPlayerHealth(playerid, 35.0);
  34. GivePlayerCash(playerid, -20000);
  35. SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
  36. }
  37. return 1;
  38. }
  39. }
  40. }
  41. if(listitem == 1) //
  42. {
  43. if((PlayerInfo[playerid][pCash] <30000))
  44. {
  45. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
  46. return 1;
  47. }
  48. else
  49. {
  50. new Float:health;
  51. GetPlayerHealth(playerid, health);
  52. new hpint = floatround( health, floatround_round );
  53. if( hpint >= 50 )
  54. {
  55. SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
  56. return 1;
  57. }
  58. else
  59. {
  60. if (health < 45.0)
  61. {
  62. SetPlayerHealth(playerid, 50.0);
  63. GivePlayerCash(playerid, -30000);
  64. SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
  65. }
  66. return 1;
  67. }
  68. }
  69. }
  70. if(listitem ==2) //
  71. {
  72. if((PlayerInfo[playerid][pCash] <45000))
  73. {
  74. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
  75. return 1;
  76. }
  77. else
  78. {
  79. new Float:health;
  80. GetPlayerHealth(playerid, health);
  81. new hpint = floatround( health, floatround_round );
  82. if( hpint >= 95 )
  83. {
  84. SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
  85. return 1;
  86. }
  87. else
  88. {
  89. if (health < 95.0)
  90. {
  91. SetPlayerHealth(playerid, 100.0);
  92. GivePlayerCash(playerid, -45000);
  93. SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
  94. }
  95. return 1;
  96. }
  97. }
  98. }
  99. if(listitem ==3) //
  100. {
  101. if((PlayerInfo[playerid][pCash] <85000))
  102. {
  103. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
  104. return 1;
  105. }
  106. else
  107. {
  108. new Float:health;
  109. GetPlayerHealth(playerid, health);
  110. new hpint = floatround( health, floatround_round );
  111. if( hpint >= 95 )
  112. {
  113. SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
  114. return 1;
  115. }
  116. else
  117. {
  118. if (health < 95.0)
  119. {
  120. SetPlayerHealth(playerid, 100.0);
  121. SetPlayerArmour(playerid, 50.0);
  122. GivePlayerCash(playerid, -85000);
  123. SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
  124. }
  125. return 1;
  126. }
  127. }
  128. }
  129. }
  130. }
  131.  
  132. ///////////////////////////////add duoi cmd makeadmin hay cmd bat ki
  133.  
  134.  
  135. CMD:benhvien(playerid, params[])
  136. {
  137. if(!IsOBenhvien(playerid))
  138. {
  139. SendClientMessageEx(playerid, COLOR_GRAD4, "Ban Không O Bênh Viên!");
  140. return 1;
  141. }
  142. else {
  143. ShowPlayerDialog(playerid, BENHVIENMAU, DIALOG_STYLE_TABLIST_HEADERS, "Benh Vien!",
  144. "Tên Dich Vu\tPrice\tMáu\n\
  145. Chê Dô Nghèo\t20.000$\t35HP\n\
  146. Chê Dô Thuong`\t30.000$\t50HP\n\
  147. Chê Dô Dai Gia\t45.000$\t100HP\n\
  148. Chê Dô Vip\t85.000$\t100HP + 50 Giáp",
  149. "Chon", "Huy");
  150. }
  151. return 0;
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement