Advertisement
Guest User

Zombie Settings SA-MP By kitten

a guest
Feb 1st, 2011
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new gTeam[MAX_PLAYERS];
  4. new string[128];
  5. new Text:Textdraw0;
  6. new Text:Textdraw1;
  7. new Text:Textdraw2;
  8. new Text:Textdraw3;
  9. new Text:Textdraw4;
  10. new Text:Textdraw5;
  11. forward HPCHECK(playerid);
  12. forward FlashBrains(playerid);
  13. forward FlashBrains2(playerid);
  14. #define TEAM_ZOMBIE 0
  15.  
  16. stock ZombieSetUp(playerid)
  17. {
  18. SetPlayerTeam(playerid, 0);
  19. SetPlayerHealth(playerid, 100);
  20. }
  21.  
  22. public HPCHECK(playerid)
  23. {
  24. new Float:ZombieHP;
  25. GetPlayerHealth(playerid,ZombieHP);
  26. if(gTeam[playerid] == TEAM_ZOMBIE)
  27. {
  28. if(ZombieHP < 0.0 && 0.5 && 0.10 && 0.15 && 0.20 && 0.25 && 0.30 && 0.35 && 0.40 && 0.45 && 0.50 && 0.55 && 0.60 && 0.65 && 0.70 && 0.75 && 0.80 && 0.85 && 0.90 && 0.95 && 100.0 )
  29. {
  30. format(string, sizeof(string), "TEAM: ~y~ZOMBIE~n~ ~r~HP: ~w~[[ ~y~ %s ~w~]]", ZombieHP);
  31. TextDrawSetString(Textdraw5,string);
  32. }
  33. }
  34. return 1;
  35. }
  36.  
  37. public FlashBrains(playerid)
  38. {
  39. TextDrawHideForPlayer(playerid, Textdraw4);
  40. SetTimer("FlashBrains2",4000,true);
  41. }
  42. public FlashBrains2(playerid)
  43. {
  44. TextDrawShowForPlayer(playerid, Textdraw4);
  45. SetTimer("FlashBrains",4000,true);
  46. }
  47.  
  48. public OnFilterScriptInit()
  49. {
  50. SetTimer("HPCHECK",9000,true);
  51. SetTimer("FlashBrains",9000,false); // starts flashing + 9 seconds to start
  52.  
  53. Textdraw0 = TextDrawCreate(2.000000, -1.000000, ".");
  54. TextDrawBackgroundColor(Textdraw0, 255);
  55. TextDrawFont(Textdraw0, 1);
  56. TextDrawLetterSize(Textdraw0, 0.509998, 54.000000);
  57. TextDrawColor(Textdraw0, -1);
  58. TextDrawSetOutline(Textdraw0, 0);
  59. TextDrawSetProportional(Textdraw0, 1);
  60. TextDrawSetShadow(Textdraw0, 1);
  61. TextDrawUseBox(Textdraw0, 1);
  62. TextDrawBoxColor(Textdraw0, -13495236);
  63. TextDrawTextSize(Textdraw0, 638.000000, 0.000000);
  64.  
  65. Textdraw1 = TextDrawCreate(447.000000, 270.000000, "~r~±~n~±~n~±~n~±~n~±~n~±~n~±");
  66. TextDrawBackgroundColor(Textdraw1, 255);
  67. TextDrawFont(Textdraw1, 1);
  68. TextDrawLetterSize(Textdraw1, 2.409998, 1.999999);
  69. TextDrawColor(Textdraw1, -1);
  70. TextDrawSetOutline(Textdraw1, 1);
  71. TextDrawSetProportional(Textdraw1, 1);
  72.  
  73. Textdraw2 = TextDrawCreate(430.000000, 290.000000, "~r~±~n~±~n~±~n~±~n~±~n~±");
  74. TextDrawBackgroundColor(Textdraw2, 255);
  75. TextDrawFont(Textdraw2, 1);
  76. TextDrawLetterSize(Textdraw2, 2.049999, 1.899999);
  77. TextDrawColor(Textdraw2, -1);
  78. TextDrawSetOutline(Textdraw2, 1);
  79. TextDrawSetProportional(Textdraw2, 1);
  80.  
  81. Textdraw3 = TextDrawCreate(430.000000, 310.000000, "~r~§~n~§~n~§~b~§~n~±");
  82. TextDrawBackgroundColor(Textdraw3, 255);
  83. TextDrawFont(Textdraw3, 1);
  84. TextDrawLetterSize(Textdraw3, 0.899999, 2.000000);
  85. TextDrawColor(Textdraw3, -1);
  86. TextDrawSetOutline(Textdraw3, 1);
  87. TextDrawSetProportional(Textdraw3, 1);
  88.  
  89. Textdraw4 = TextDrawCreate(39.000000, 310.000000, "BRAINS ...");
  90. TextDrawBackgroundColor(Textdraw4, 255);
  91. TextDrawFont(Textdraw4, 1);
  92. TextDrawLetterSize(Textdraw4, 0.610000, 3.000000);
  93. TextDrawColor(Textdraw4, -65281);
  94. TextDrawSetOutline(Textdraw4, 1);
  95. TextDrawSetProportional(Textdraw4, 1);
  96.  
  97. Textdraw5 = TextDrawCreate(500.000000, 110.000000, " TEAM: ~y~ZOMBIE~n~ ~r~HP: ~w~[[ ~y~ 100 ~w~]] ");
  98. TextDrawBackgroundColor(Textdraw5, 255);
  99. TextDrawFont(Textdraw5, 1);
  100. TextDrawLetterSize(Textdraw5, 0.310000, 1.000000);
  101. TextDrawColor(Textdraw5, -1);
  102. TextDrawSetOutline(Textdraw5, 1);
  103. TextDrawSetProportional(Textdraw5, 1);
  104. TextDrawUseBox(Textdraw5, 1);
  105. TextDrawBoxColor(Textdraw5, 844797500);
  106. TextDrawTextSize(Textdraw5, 596.000000, 1.000000);
  107.  
  108. return 1;
  109. }
  110.  
  111.  
  112.  
  113. public OnFilterScriptExit()
  114. {
  115. TextDrawHideForAll(Textdraw0);
  116. TextDrawDestroy(Textdraw0);
  117. TextDrawHideForAll(Textdraw1);
  118. TextDrawDestroy(Textdraw1);
  119. TextDrawHideForAll(Textdraw2);
  120. TextDrawDestroy(Textdraw2);
  121. TextDrawHideForAll(Textdraw3);
  122. TextDrawDestroy(Textdraw3);
  123. TextDrawHideForAll(Textdraw4);
  124. TextDrawDestroy(Textdraw4);
  125. TextDrawHideForAll(Textdraw5);
  126. TextDrawDestroy(Textdraw5);
  127. return 1;
  128. }
  129.  
  130. public OnPlayerConnect(playerid)
  131. {
  132. if(gTeam[playerid] == TEAM_ZOMBIE)
  133. {
  134. TextDrawShowForPlayer(playerid, Textdraw0);
  135. TextDrawShowForPlayer(playerid, Textdraw1);
  136. TextDrawShowForPlayer(playerid, Textdraw2);
  137. TextDrawShowForPlayer(playerid, Textdraw3);
  138. TextDrawShowForPlayer(playerid, Textdraw5);
  139. }
  140. return 1;
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement