Advertisement
Guest User

Untitled

a guest
Feb 19th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.70 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. //...::====================== Include's ======================::...//
  3. #include <a_samp>
  4. #include <zcmd>
  5. #include <sscanf2>
  6. //...::====================== Colors ======================::...//
  7. #define grey 0xAFAFAFAA
  8. #define cyan 0x00FFFFFF
  9. #define red 0xFF0000AA
  10. //...::====================== Shortcut ======================::...//
  11. #define SK SendClientMessage(killerid,
  12. #define SP SendClientMessage(playerid,
  13. #define Gm GivePlayerMoney(killerid,
  14. //...::====================== Define ======================::...//
  15. //-------------------------Options-----------------------------//
  16. #define FiveSpreeCash 1500
  17. #define FiveSpreeScore 5
  18. #define TenSpreeCash 5000
  19. #define TenSpreeScore 8
  20. #define FifteenSpreeCash 8000
  21. #define FifteenSpreeScore 12
  22. #define TwentySpreeCash 15000
  23. #define TwentySpreeScore 15
  24. #define ThirtyfiveSpreeCash 20000
  25. #define ThirtyfiveSpreeScore 20
  26. #define SpreeWeapon 15
  27. #define SpreeWeapon2 20
  28. #define SpreeWeapon3 25
  29. #define SpreeWeapon4 30
  30. #define DIALOG_ID 523
  31. #define GivenAmmo 500
  32. //---------------------//
  33. new spree[MAX_PLAYERS];
  34. //--------------------//
  35. #if defined FILTERSCRIPT
  36.  
  37. public OnFilterScriptInit()
  38. {
  39. print("\n--------------------------------------");
  40. print("Simple Spree System By V_LOPE Has Been Loaded!");
  41. print("--------------------------------------\n");
  42. return 1;
  43. }
  44.  
  45. public OnFilterScriptExit()
  46. {
  47. print("\n--------------------------------------");
  48. print("Simple Spree System By V_LOPE Load Failed");
  49. print("--------------------------------------\n");
  50. return 1;
  51. }
  52. #endif
  53.  
  54. public OnPlayerConnect(playerid)
  55. {
  56. spree[playerid] = 0;
  57. return 1;
  58. }
  59. CMD:spree(playerid,params[])
  60. {
  61. new player1,name[24];
  62. if(isnull(params)) player1 = playerid;
  63. else player1 = strval(params);
  64. GetPlayerName(player1,name,sizeof(name));
  65. new str[128];
  66. format(str, sizeof(str), "%s's Is Killing Spree with %d Kills",name,spree[player1]);
  67. SendClientMessage(playerid, 0x00F600FF, str);
  68. SendClientMessage(playerid, grey, "You Can Use /Spree [id] too");
  69. return 1;
  70. }
  71. CMD:setspree(playerid,params[])
  72. {
  73. if(!IsPlayerAdmin(playerid)) return 0;
  74. new targetid,number;
  75. if (sscanf(params, "dis", targetid,number)) return SendClientMessage(playerid, red, "USAGE: /setspree [playerid] [spree]");
  76. new string[128],pName[24],aName[24];
  77. GetPlayerName(targetid,pName,sizeof(pName));
  78. GetPlayerName(playerid,aName,sizeof(aName));
  79. if(!IsPlayerConnected(targetid) && targetid == INVALID_PLAYER_ID) return SP red,"Player is Not Connected");
  80. format(string, sizeof(string), "You have set \"%s's\" Spree to '%d'", pName, number); SendClientMessage(playerid,cyan,string);
  81. if(targetid != playerid)
  82. {
  83. format(string,sizeof(string),"Administrator \"%s\" has set your Spree to '%d'", aName, number);
  84. SendClientMessage(targetid,cyan,string);
  85. }
  86. PlayerPlaySound(targetid,1057,0.0,0.0,0.0);
  87. spree[targetid] = number;
  88. return 1;
  89. }
  90.  
  91. public OnPlayerDisconnect(playerid, reason)
  92. {
  93. spree[playerid] = 0;
  94. return 1;
  95. }
  96.  
  97.  
  98. public OnPlayerDeath(playerid, killerid, reason)
  99. {
  100. new string[128],PlayerName[24];
  101. GetPlayerName(killerid,PlayerName,sizeof(PlayerName));
  102. spree[killerid]++;
  103. spree[playerid] = 0;
  104. if(spree[killerid] == 5)
  105. {
  106. format(string,sizeof(string),"%s Is Killing Spree With 5 Kills !",PlayerName);
  107. SendClientMessageToAll(cyan,string);
  108. Gm FiveSpreeCash); //GivePlayerMoney
  109. GivePlayerScore(killerid,FiveSpreeScore);
  110. format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 10 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",FiveSpreeCash,FiveSpreeScore);
  111. SK cyan,string);
  112. }
  113. else if(spree[killerid] == 10)
  114. {
  115. format(string,sizeof(string),"%s Is Killing Spree With 10 Kills !",PlayerName);
  116. SendClientMessageToAll(cyan,string);
  117. Gm TenSpreeCash); //GivePlayerMoney
  118. GivePlayerScore(killerid,TenSpreeScore);
  119. format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 10 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",TenSpreeCash,TenSpreeScore);
  120. SK cyan,string);
  121. }
  122. else if(spree[killerid] == 15)
  123. {
  124. format(string,sizeof(string),"%s Is Killing Spree With 15 Kills !",PlayerName);
  125. SendClientMessageToAll(cyan,string);
  126. Gm FifteenSpreeCash); //GivePlayerMoney
  127. GivePlayerScore(killerid,FifteenSpreeScore);
  128. format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 15 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",FifteenSpreeCash,FifteenSpreeScore);
  129. SK cyan,string);
  130. }
  131. else if(spree[killerid] == 20)
  132. {
  133. format(string,sizeof(string),"%s Is Killing Spree With 20 Kills !",PlayerName);
  134. SendClientMessageToAll(cyan,string);
  135. Gm TwentySpreeCash); //GivePlayerMoney
  136. GivePlayerScore(killerid,TwentySpreeScore);
  137. format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 20 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",TwentySpreeCash,TwentySpreeScore);
  138. SK cyan,string);
  139. }
  140. else if(spree[killerid] == 35)
  141. {
  142. format(string,sizeof(string),"%s Is Killing Spree With 35 Kills !",PlayerName);
  143. SendClientMessageToAll(cyan,string);
  144. Gm ThirtyfiveSpreeCash); //GivePlayerMoney
  145. GivePlayerScore(killerid,ThirtyfiveSpreeScore);
  146. format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 20 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",ThirtyfiveSpreeCash,ThirtyfiveSpreeScore);
  147. SK cyan,string);
  148. }
  149. if(spree[killerid] == SpreeWeapon)
  150. {
  151. ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
  152. }
  153. if(spree[killerid] == SpreeWeapon2)
  154. {
  155. ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
  156. }
  157. if(spree[killerid] == SpreeWeapon3)
  158. {
  159. ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
  160. }
  161. if(spree[killerid] == SpreeWeapon4)
  162. {
  163. ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
  164. }
  165. return 1;
  166. }
  167.  
  168. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  169. {
  170. if(dialogid == DIALOG_ID && response)
  171. {
  172. if(listitem == 1)
  173. {
  174. GivePlayerWeapon(playerid,9,1);
  175. SP cyan,"Weapon has be Given!");
  176. }
  177. if(listitem == 2)
  178. {
  179. GivePlayerWeapon(playerid,22,GivenAmmo);
  180. SP cyan,"Weapon has be Given!");
  181. }
  182. if(listitem == 3)
  183. {
  184. GivePlayerWeapon(playerid,23,GivenAmmo);
  185. SP cyan,"Weapon has be Given!");
  186. }
  187. if(listitem == 4)
  188. {
  189. GivePlayerWeapon(playerid,24,GivenAmmo);
  190. SP cyan,"Weapon has be Given!");
  191. }
  192. if(listitem == 5)
  193. {
  194. GivePlayerWeapon(playerid,25,GivenAmmo);
  195. SP cyan,"Weapon has be Given!");
  196. }
  197. if(listitem == 6)
  198. {
  199. GivePlayerWeapon(playerid,26,GivenAmmo);
  200. SP cyan,"Weapon has be Given!");
  201. }
  202. if(listitem == 7)
  203. {
  204. GivePlayerWeapon(playerid,27,GivenAmmo);
  205. SP cyan,"Weapon has be Given!");
  206. }
  207. if(listitem == 8)
  208. {
  209. GivePlayerWeapon(playerid,28,GivenAmmo);
  210. SP cyan,"Weapon has be Given!");
  211. }
  212. if(listitem == 9)
  213. {
  214. GivePlayerWeapon(playerid,29,GivenAmmo);
  215. SP cyan,"Weapon has be Given!");
  216. }
  217. if(listitem == 10)
  218. {
  219. GivePlayerWeapon(playerid,30,GivenAmmo);
  220. SP cyan,"Weapon has be Given!");
  221. }
  222. if(listitem == 11)
  223. {
  224. GivePlayerWeapon(playerid,31,GivenAmmo);
  225. SP cyan,"Weapon has be Given!");
  226. }
  227. if(listitem == 12)
  228. {
  229. GivePlayerWeapon(playerid,32,GivenAmmo);
  230. SP cyan,"Weapon has be Given!");
  231. }
  232. if(listitem == 13)
  233. {
  234. GivePlayerWeapon(playerid,33,GivenAmmo);
  235. SP cyan,"Weapon has be Given!");
  236. }
  237. if(listitem == 14)
  238. {
  239. GivePlayerWeapon(playerid,34,GivenAmmo);
  240. SP cyan,"Weapon has be Given!");
  241. }
  242. }
  243. return 1;
  244. }
  245.  
  246. stock GivePlayerScore(playerid,score)
  247. {
  248. SetPlayerScore(playerid,GetPlayerScore(playerid)+score);
  249. }
  250.  
  251. stock IsNumeric(string[])
  252. {
  253. for (new i = 0, j = strlen(string); i < j; i++)
  254. {
  255. if (string[i] > '9' || string[i] < '0') return 0;
  256. }
  257. return 1;
  258. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement