Advertisement
Guest User

Anti Spawn Kill 1.0

a guest
Oct 8th, 2011
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. forward SpawnKill(playerid);
  9. forward Pro(playerid);
  10. forward UnPro(playerid);
  11.  
  12. new Text:Textdraw0;
  13. new Text:Textdraw1;
  14.  
  15. public OnFilterScriptInit()
  16. {
  17. SetTimerEx("SpawnKill", 15000, 0, "i");
  18. SetTimerEx("Pro", 15000, 0, "i");
  19. SetTimerEx("UnPro", 7000, 0, "i");
  20.  
  21. Textdraw0 = TextDrawCreate(239.000000, 396.000000, "Protected");
  22. TextDrawBackgroundColor(Textdraw0, 255);
  23. TextDrawFont(Textdraw0, 2);
  24. TextDrawLetterSize(Textdraw0, 0.769999, 3.000000);
  25. TextDrawColor(Textdraw0, -16776961);
  26. TextDrawSetOutline(Textdraw0, 0);
  27. TextDrawSetProportional(Textdraw0, 1);
  28. TextDrawSetShadow(Textdraw0, 1);
  29.  
  30. Textdraw1 = TextDrawCreate(245.000000, 395.000000, "UnProtected");
  31. TextDrawBackgroundColor(Textdraw1, 255);
  32. TextDrawFont(Textdraw1, 2);
  33. TextDrawLetterSize(Textdraw1, 0.589999, 3.199999);
  34. TextDrawColor(Textdraw1, -16776961);
  35. TextDrawSetOutline(Textdraw1, 0);
  36. TextDrawSetProportional(Textdraw1, 1);
  37. TextDrawSetShadow(Textdraw1, 1);
  38.  
  39. return 1;
  40. }
  41.  
  42. public OnFilterScriptExit()
  43. {
  44. return 1;
  45. }
  46.  
  47.  
  48.  
  49. main()
  50. {
  51. print("\n----------------------------------");
  52. print(" Blank Gamemode by your name here");
  53. print("----------------------------------\n");
  54. }
  55.  
  56.  
  57. public OnGameModeInit()
  58. {
  59. return 1;
  60. }
  61.  
  62. public OnGameModeExit()
  63. {
  64. return 1;
  65. }
  66.  
  67. public OnPlayerRequestClass(playerid, classid)
  68. {
  69. return 1;
  70. }
  71.  
  72. public OnPlayerConnect(playerid)
  73. {
  74. return 1;
  75. }
  76.  
  77. public OnPlayerDisconnect(playerid, reason)
  78. {
  79. return 1;
  80. }
  81.  
  82. public OnPlayerSpawn(playerid)
  83. {
  84. ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Anti Spawn Kill Panel","Anti Spawn Kill On\nAnti Spawn Kill Off","Select","Cancel");
  85. return 1;
  86. }
  87.  
  88. public OnPlayerDeath(playerid, killerid, reason)
  89. {
  90. return 1;
  91. }
  92. public SpawnKill(playerid)
  93. {
  94. SetPlayerHealth(playerid, 100.0);
  95. return 1;
  96. }
  97. public Pro(playerid)
  98. {
  99. TextDrawHideForPlayer(playerid,Textdraw0);
  100. return 1;
  101. }
  102. public UnPro(playerid)
  103. {
  104. TextDrawHideForPlayer(playerid,Textdraw1);
  105. return 1;
  106. }
  107. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  108. {
  109. switch(dialogid) // Lookup the dialogid
  110. {
  111. case 1:
  112. {
  113. if(!response)
  114. {
  115. SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
  116. return 1;
  117. }
  118.  
  119. switch(listitem)
  120. {
  121. case 0:
  122. {
  123. SetPlayerHealth(playerid, 99999.0);
  124. SetTimerEx("SpawnKill", 15000, false, "i", playerid);
  125. SetTimerEx("Pro", 15000, 0, "i");
  126. TextDrawShowForPlayer(playerid,Textdraw0);
  127. }
  128. case 1:
  129. {
  130. SetPlayerHealth(playerid, 100.0);
  131. SetTimerEx("UnPro", 7000, 0, "i");
  132. TextDrawShowForPlayer(playerid,Textdraw1);
  133. }
  134.  
  135.  
  136. }
  137.  
  138. }
  139.  
  140.  
  141. }
  142. return 0;
  143. }
  144. COMMAND:kill(playerid, params[])
  145. {
  146. SetPlayerHealth(playerid,0);
  147. return 1;
  148. }
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement