Guest User

bogeyman_EST

a guest
Mar 29th, 2009
919
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define filterscript
  4.  
  5. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  6. #define NUMVALUES 4
  7. /* EDIT FROM HERE*/
  8. #define COLOR_ERROR 0xFF0000FF //Color of the error messages
  9. #define COLOR_MSG 0x00FFFFFF //Color of general messages
  10. #define ANTISPAM_RAPE 5 //Minimum time between /rape commands (in seconds)
  11. #define ANTISPAM_CURE 25 //Minimum time between /cure commands (in seconds)
  12. #define CHLAMYDIA 3 //The interval which the player loses health with Chlamydia (in seconds)
  13. #define GONORRHEA 2 //The interval which the player loses health with Gonorrhea (in seconds)
  14. #define RAPE_DISTANCE 5.0 //Distance between players to be able to rape
  15. /*NO NEED TO EDIT FROM HERE*/
  16.  
  17. stock Float:GetDistanceBetweenPlayers(p1,p2){
  18. new Float:x1,Float:y1,Float:z1,Float:x3,Float:y3,Float:z3;
  19. if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){
  20. return -1.00;
  21. }
  22. GetPlayerPos(p1,x1,y1,z1);
  23. GetPlayerPos(p2,x3,y3,z3);
  24. return floatsqroot(floatpower(floatabs(floatsub(x3,x1)),2)+floatpower(floatabs(floatsub(y3,y1)),2)+floatpower(floatabs(floatsub(z3,z1)),2));
  25. }
  26.  
  27. new string[256];
  28. new chlamydia[MAX_PLAYERS];
  29. new gonorrhea[MAX_PLAYERS];
  30. new rapespam[MAX_PLAYERS];
  31. new curespam[MAX_PLAYERS];
  32.  
  33. stock ReturnPlayerName(id)
  34. {
  35. new thename[MAX_PLAYER_NAME];
  36. GetPlayerName(id, thename, MAX_PLAYER_NAME);
  37. return thename;
  38. }
  39.  
  40. dcmd_rape(playerid, params[])
  41. {
  42. new ID = strval(params);
  43. if(!strlen(params))
  44. {
  45. SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rape [ID]");
  46. }
  47. else
  48. {
  49. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_ERROR, "That player is not connected!");
  50. if(ID == playerid) return SendClientMessage(playerid, COLOR_ERROR, "You cannot rape yourself!");
  51. if(rapespam[playerid] == 0)
  52. {
  53. if(GetDistanceBetweenPlayers(playerid,ID) > RAPE_DISTANCE) return SendClientMessage(playerid, COLOR_ERROR, "You are not close enough to eachother!");
  54. new raperand = random(5);
  55. if(raperand == 1 || raperand == 2)
  56. {
  57. format(string, sizeof(string), "%s (%i) noticed you trying to rape him", ReturnPlayerName(ID), ID);
  58. SendClientMessage(playerid, COLOR_MSG, string);
  59. format(string, sizeof(string), "%s (%i) tried to rape you", ReturnPlayerName(playerid), playerid);
  60. SendClientMessage(ID, COLOR_MSG, string);
  61. }
  62. else if(raperand == 3 || raperand == 5)
  63. {
  64. if(!chlamydia[ID])
  65. {
  66. chlamydia[ID] = 1;
  67. new Float:health;
  68. GetPlayerHealth(ID, health);
  69. SetPlayerHealth(ID, health-5-random(10));
  70. format(string, 256, "You raped and infected %s (%i) with Chlamydia", ReturnPlayerName(ID), ID);
  71. SendClientMessage(playerid, COLOR_MSG, string);
  72. format(string, sizeof(string), "%s (%i) raped you and infected you with Chlamydia", ReturnPlayerName(playerid), playerid);
  73. SendClientMessage(ID, COLOR_MSG, string);
  74. }
  75. else
  76. {
  77. new Float:health;
  78. GetPlayerHealth(ID, health);
  79. SetPlayerHealth(ID, health-5-random(15));
  80. format(string, 256, "You raped %s (%i)", ReturnPlayerName(ID), ID);
  81. SendClientMessage(playerid, COLOR_MSG, string);
  82. format(string, sizeof(string), "%s (%i) raped you", ReturnPlayerName(playerid), playerid);
  83. SendClientMessage(ID, COLOR_MSG, string);
  84. }
  85. }
  86. else if(raperand == 4)
  87. {
  88. if(!gonorrhea[ID])
  89. {
  90. gonorrhea[ID] = 1;
  91. new Float:health;
  92. GetPlayerHealth(ID, health);
  93. SetPlayerHealth(ID, health-5-random(20));
  94. format(string, 256, "You raped and infected %s (%i) with Gonorrhea", ReturnPlayerName(ID), ID);
  95. SendClientMessage(playerid, COLOR_MSG, string);
  96. format(string, sizeof(string), "%s (%i) raped you and infected you with Gonorrhea", ReturnPlayerName(playerid), playerid);
  97. SendClientMessage(ID, COLOR_MSG, string);
  98. }
  99. else
  100. {
  101. new Float:health;
  102. GetPlayerHealth(ID, health);
  103. SetPlayerHealth(ID, health-5-random(20));
  104. format(string, 256, "You raped %s (%i)", ReturnPlayerName(ID), ID);
  105. SendClientMessage(playerid, COLOR_MSG, string);
  106. format(string, sizeof(string), "%s (%i) raped you", ReturnPlayerName(playerid), playerid);
  107. SendClientMessage(ID, COLOR_MSG, string);
  108. }
  109. }
  110. rapespam[playerid] = 1;
  111. SetTimerEx("rapespamt", ANTISPAM_RAPE*1000, false, "i", playerid);
  112. }
  113. else
  114. {
  115. SendClientMessage(playerid, COLOR_ERROR, "Please wait before raping someone again!");
  116. }
  117. }
  118. return 1;
  119. }
  120.  
  121. public OnPlayerCommandText(playerid, cmdtext[])
  122. {
  123. dcmd(rape, 4, cmdtext);
  124.  
  125. if(!strcmp(cmdtext, "/cure", true))
  126. {
  127. if(curespam[playerid] == 0)
  128. {
  129. if(chlamydia[playerid] || gonorrhea[playerid])
  130. {
  131. new randcure = random(3);
  132. if(randcure == 1 || randcure == 2)
  133. {
  134. SendClientMessage(playerid, COLOR_MSG, "You tried to cure yourself by poking yourself in random places with a needle but it failed");
  135. }
  136. else
  137. {
  138. SendClientMessage(playerid, COLOR_MSG, "You tried to cure yourself by poking yourself in random places with a needle and it worked!!");
  139. SendClientMessage(playerid, COLOR_MSG, "You are now cured from all diseases!");
  140. chlamydia[playerid] = 0;
  141. gonorrhea[playerid] = 0;
  142. }
  143. SetTimerEx("curespamt", ANTISPAM_CURE*1000, false, "i", playerid);
  144. curespam[playerid] = 1;
  145. }
  146. else
  147. {
  148. SendClientMessage(playerid, COLOR_ERROR, "You don't have any STDs to cure!");
  149. }
  150. }
  151. else
  152. {
  153. SendClientMessage(playerid, COLOR_ERROR, "Please wait before trying to cure yourself again!");
  154. }
  155. return 1;
  156. }
  157.  
  158. return 0;
  159. }
  160.  
  161. public OnFilterScriptInit()
  162. {
  163. SetTimer("checkchlamy", CHLAMYDIA*1000, true);
  164. SetTimer("checkgono", GONORRHEA*1000, true);
  165. }
  166.  
  167. public OnPlayerDeath(playerid, killerid, reason)
  168. {
  169. chlamydia[playerid] = 0;
  170. gonorrhea[playerid] = 0;
  171. }
  172.  
  173. forward checkchlamy();
  174.  
  175. public checkchlamy()
  176. {
  177. for(new i = 0; i < MAX_PLAYERS; i++)
  178. {
  179. if(chlamydia[i] == 1 && IsPlayerConnected(i))
  180. {
  181. new Float:health;
  182. GetPlayerHealth(i, health);
  183. SetPlayerHealth(i, health-5-random(10));
  184. }
  185. }
  186. }
  187.  
  188. forward checkgono();
  189.  
  190. public checkgono()
  191. {
  192. for(new i = 0; i < MAX_PLAYERS; i++)
  193. {
  194. if(gonorrhea[i] == 1 && IsPlayerConnected(i))
  195. {
  196. new Float:health;
  197. GetPlayerHealth(i, health);
  198. SetPlayerHealth(i, health-5-random(20));
  199. }
  200. }
  201. }
  202.  
  203. forward rapespamt(Id);
  204.  
  205. public rapespamt(Id)
  206. {
  207. rapespam[Id] = 0;
  208. }
  209.  
  210. forward curespamt(id);
  211.  
  212. public curespamt(id)
  213. {
  214. curespam[id] = 0;
  215. }
Advertisement
Add Comment
Please, Sign In to add comment