Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. // add vào gamemode
  2.  
  3. #define DIALOG_DONATOR
  4.  
  5. // nay la de tranh bi anti warning
  6. stock SetPlayerArmourEx(playerid, Float:armour)
  7. {
  8. ValidArmor[playerid] = armour;
  9. SetPlayerArmour(playerid, armour);
  10. return 1;
  11. }
  12.  
  13. CMD:buypacksung(playerid, params[])
  14. {
  15. if(PlayerInfo[playerid][pLevel] > 0)
  16. {
  17. new string[60];
  18. format(string, sizeof(string), "Máu\nGiáp\nPack sung");
  19. ShowPlayerDialogEx(playerid, DIALOG_DONATOR, DIALOG_STYLE_LIST, "LanhChua.Shane.Pack.Sung", string,"Lay", "Xóa");
  20. }
  21. else
  22. {
  23. SendClientMessage(playerid, COLOR_YELLOW, "Ban khong du cap de mua pack sung ");
  24. }
  25. return 1;
  26. }
  27.  
  28. tìm public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  29. thêm:
  30.  
  31. if(dialogid == DIALOG_DONATOR) Packsung by Shane DZ
  32. {
  33. if(response)
  34. {
  35. if(listitem == 0)
  36. {
  37. new Float:health;
  38. GetPlayerHealth(playerid, health);
  39. new hpint = floatround( health, floatround_round );
  40. if( hpint >= 100 )
  41. {
  42. SendClientMessageEx(playerid, COLOR_GREY, "Ban da day binh mau.");
  43. return 1;
  44. }
  45. SetPlayerHealth(playerid, 100);
  46. SendClientMessageEx(playerid, COLOR_NEWS, "Warning: Ban da su dung Donator de su dung binh mau ( 100HP ).");
  47. }
  48. if(listitem == 1)
  49. {
  50. new Float:armour;
  51. GetPlayerArmour(playerid, armour);
  52. if( armour >= 100 )
  53. {
  54. SendClientMessage(playerid, COLOR_GREY, "Ban da day giap");
  55. return 1;
  56. }
  57. SetPlayerArmourEx(playerid, 100);
  58. SendClientMessage(playerid, COLOR_NEWS, "Warning: Ban da su dung Donator de su dung binh giap ( 100ARMOUR ).");
  59. }
  60. if(listitem == 2)
  61. {
  62. PlayerInfo[playerid][pCash] -= 2000000;
  63. GivePlayerValidWeapon(playerid, 30, 999999);
  64. GivePlayerValidWeapon(playerid, 31, 999999);
  65. GivePlayerValidWeapon(playerid, 27, 999999);
  66. GivePlayerValidWeapon(playerid, 24, 999999);
  67. GivePlayerValidWeapon(playerid, 29, 999999);
  68. SendClientMessage(playerid, COLOR_NEWS, "[Faskis] Ban da mua bo packsung tu Donator LanhChua.Shane");
  69. }
  70. }
  71. }
  72.  
  73. =================================Pawn code by LanhChua.Shane=============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement