Guest User

Untitled

a guest
Jan 21st, 2015
696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.25 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 <sscanf2>
  7. #include <zcmd>
  8.  
  9. #define COLOR_RED 0xFF0000AA
  10. #define COLOR_SILVER 0xC0C0C0AA
  11. #define COLOR_WHITE 0xFFFFFFAA
  12. #define COLOR_GREEN 0x00FF00CE
  13. #define CHLAMYDIA 3
  14. new chlamydia[MAX_PLAYERS];
  15. new time;
  16.  
  17. #if defined FILTERSCRIPT
  18.  
  19. public OnFilterScriptInit()
  20. {
  21. print("\n--------------------------------------");
  22. print(" Rob and Rape Command Made By Ahmed_Nezoo");
  23. print("--------------------------------------\n");
  24. return 1;
  25. }
  26.  
  27. CMD:rob(playerid, params[])
  28. {
  29. new targetid;
  30. new rob = random(10);
  31. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /rob [id]");
  32. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
  33. new Float:x, Float:y, Float:z;
  34. GetPlayerPos(targetid, x, y, z);
  35. if(!IsPlayerInRangeOfPoint(playerid, 5, x, y, z)) return SendClientMessage(playerid, COLOR_RED, "This player is too far away");
  36. if(GetPlayerMoney(targetid) < 1000) return SendClientMessage(playerid, COLOR_RED, "This player doesn't have enough money");
  37. new money = GetPlayerMoney(targetid);
  38.  
  39. if(rob == 0 || rob == 1)
  40. {
  41. new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  42. GetPlayerName(playerid, name, sizeof(name));
  43. new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
  44. GetPlayerName(targetid, name2, sizeof(name2));
  45. GivePlayerMoney(playerid, money / 10);
  46. GivePlayerMoney(targetid, -money / 10);
  47. format(string,sizeof(string),"%s has robbed %s",name, name2);
  48. SendClientMessageToAll(COLOR_GREEN,string);
  49. format(string,sizeof(string),"You robbed $%d", money/10);
  50. SendClientMessage(playerid,COLOR_SILVER,string);
  51. format(string,sizeof(string),"You got robbed and lost $%d", money/10);
  52. SendClientMessage(targetid,COLOR_SILVER,string);
  53.  
  54. }
  55. else if(rob == 2 || rob == 4)
  56. {
  57. new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  58. GetPlayerName(playerid, name, sizeof(name));
  59. new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
  60. GetPlayerName(targetid, name2, sizeof(name2));
  61. GivePlayerMoney(playerid, money / 20);
  62. GivePlayerMoney(targetid, -money / 20);
  63. format(string,sizeof(string),"%s has robbed %s",name, name2);
  64. SendClientMessageToAll(COLOR_GREEN,string);
  65. format(string,sizeof(string),"You robbed $%d", money/20);
  66. SendClientMessage(playerid,COLOR_SILVER,string);
  67. format(string,sizeof(string),"You got robbed and lost $%d", money/20);
  68. SendClientMessage(targetid,COLOR_SILVER,string);
  69.  
  70. }
  71. else if(rob == 5 || rob == 6)
  72. {
  73. new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  74. GetPlayerName(playerid, name, sizeof(name));
  75. new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
  76. GetPlayerName(targetid, name2, sizeof(name2));
  77. GivePlayerMoney(playerid, money / 5);
  78. GivePlayerMoney(targetid, -money / 5);
  79. format(string,sizeof(string),"%s has robbed %s",name, name2);
  80. SendClientMessageToAll(COLOR_GREEN,string);
  81. format(string,sizeof(string),"You robbed $%d", money/5);
  82. SendClientMessage(playerid,COLOR_SILVER,string);
  83. format(string,sizeof(string),"You got robbed and lost $%d", money/5);
  84. SendClientMessage(targetid,COLOR_SILVER,string);
  85.  
  86. }
  87. else
  88. {
  89. new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  90. GetPlayerName(playerid, name, sizeof(name));
  91. new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
  92. GetPlayerName(targetid, name2, sizeof(name2));
  93. format(string,sizeof(string),"%s noticed you, Run away or he can kill you !", name2);
  94. SendClientMessage(playerid, COLOR_RED, string);
  95. format(string,sizeof(string),"%s tried to rob you and faile you may now kill him !", name);
  96. SendClientMessage(targetid, COLOR_RED, string);
  97. format(string1,sizeof(string1),"%s tried to rob %s and failed", name, name2);
  98. SendClientMessageToAll(COLOR_GREEN,string1);
  99. }
  100. return 1;
  101. }
  102.  
  103.  
  104.  
  105. CMD:rape(playerid, params[])
  106. {
  107. new string[256];
  108. new targetid;
  109. if(sscanf(params, "u", targetid))
  110. {
  111. SendClientMessage(playerid, COLOR_WHITE, "Usage: /rape [id]");
  112. }
  113. else
  114. {
  115. new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  116. GetPlayerName(playerid, name, sizeof(name));
  117. new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
  118. GetPlayerName(targetid, name2, sizeof(name2));
  119. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
  120. if(targetid == playerid) return SendClientMessage(playerid, COLOR_RED, "You can not rape yourself.");
  121. new Float:X, Float:Y, Float:Z;
  122. GetPlayerPos(targetid ,X,Y,Z);
  123. if(!IsPlayerInRangeOfPoint(targetid,5,X,Y,Z)) return SendClientMessage(playerid, COLOR_RED,"This player is too far away");
  124. new raperand = random(5);
  125. if(raperand == 1 || raperand == 2)
  126. {
  127.  
  128. format(string, sizeof(string), "%s has attempted to rape you!", name);
  129. SendClientMessage(targetid, COLOR_GREEN, string);
  130. }
  131. else if(raperand == 3 || raperand == 5)
  132. {
  133. if(!chlamydia[targetid])
  134. {
  135. chlamydia[targetid] = 1;
  136. new Float:health;
  137. GetPlayerHealth(targetid,health);
  138. SetPlayerHealth(targetid, health-5-random(10));
  139. format(string, 256, "Your successfully raped %s and infected him with Chlamydia", name2);
  140. SendClientMessage(playerid, COLOR_GREEN, string);
  141. time = SetTimerEx("rape", 30000, true, "i", targetid);
  142. }
  143. }
  144. else
  145. {
  146. new Float:health;
  147. GetPlayerHealth(targetid,health);
  148. SetPlayerHealth(targetid, health-5-random(15));
  149. format(string,sizeof(string), "You successfully raped %s", name2);
  150. SendClientMessage(playerid, -1, string);
  151. format(string, sizeof(string), "%s has successfully raped you!", name);
  152. SendClientMessage(targetid, COLOR_GREEN, string);
  153. time = SetTimerEx("rape", 30000, true, "i", targetid);
  154. }
  155. }
  156.  
  157. return 1;
  158. }
  159.  
  160. forward rape(playerid);
  161. public rape(playerid)
  162. {
  163. new Float:health;
  164. GetPlayerHealth(playerid,health);
  165. SetPlayerHealth(playerid, health-5-random(10));
  166. return 1;
  167. }
  168.  
  169. public OnPlayerDeath(playerid, killerid, reason)
  170. {
  171. if(chlamydia[playerid])
  172. {
  173. KillTimer(time);
  174. }
  175. return 1;
  176. }
  177.  
  178. public OnFilterScriptExit()
  179. {
  180. return 1;
  181. }
  182.  
  183. #else
  184.  
  185. #endif
Advertisement
Add Comment
Please, Sign In to add comment