Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- #define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- new KillingSpree[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Killing Spree");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Killing Spree By Niko_boy For PK SAMP SERVER ");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- KillingSpree[playerid] = 0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new KillingSpree[MAX_PLAYERS];
- KillingSpree[killerid] ++ ; // 1 kills
- KillingSpree[playerid] = 0; // player who died his killing spree will be restored to 0.
- //------- // finds the player on a Killing Spree of 3 kills
- if(killerid == INVALID_PLAYER_ID)
- {
- SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
- }
- else
- {
- SendDeathMessage(killerid,playerid,reason);
- SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
- GivePlayerMoney(playerid,-1000);
- if(bounty[playerid] > 0 && (playerGang[killerid] == 0 || playerGang[playerid] != playerGang[killerid])) {
- GetPlayerName(playerid, killedplayer, sizeof(killedplayer));
- format(string, sizeof(string), "You earned a bounty of %d for killing %s.", bounty[playerid], killedplayer);
- SendClientMessage(killerid, COLOR_GREEN, string);
- GivePlayerMoney(killerid, bounty[playerid]);
- bounty[playerid] = 0;
- }
- if(playercash > 0) {
- GivePlayerMoney(killerid, playercash);
- }
- }
- //==//
- SetPlayerWantedLevel(playerid, 0);
- KillingSpree[playerid] = 0;
- KillingSpree[killerid] ++;
- //--------------
- if (KillingSpree[killerid] == 20)
- {
- SetPlayerWantedLevel(killerid, 6);
- GivePlayerMoney (killerid,20000);
- GivePlayerWeapon (killerid,35,7);
- GivePlayerHealth (killerid,30);
- SetPlayerArmour(killerid,90);
- format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
- SendClientMessage(killerid, COLOR_RED, string)
- }//---------------
- else if (KillingSpree[killerid] == 16)
- {
- GivePlayerMoney (killerid,8000);
- GivePlayerWeapon (killerid,16,5);
- GivePlayerHealth (killerid,25);
- GivePlayerArmour(killerid,30);
- format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
- SendClientMessage(killerid, COLOR_RED, string);
- SetPlayerWantedLevel(killerid, 4)
- }
- else if (KillingSpree[killerid] == 12)
- {
- SetPlayerWantedLevel(killerid, 3);
- GivePlayerMoney (killerid,5000);
- GivePlayerWeapon (killerid,31,150);
- GivePlayerHealth (killerid,20);
- GivePlayerArmour(killerid,20);
- format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
- SendClientMessage(killerid, COLOR_PINK, string)
- }
- else if (KillingSpree[killerid] == 8)
- {
- SetPlayerWantedLevel(killerid, 2);
- GivePlayerMoney (killerid,3000);
- GivePlayerWeapon (killerid,28,280);
- GivePlayerHealth (killerid,15);
- GivePlayerArmour(killerid,15);
- format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
- SendClientMessage(killerid, COLOR_DARKGREEN, string)
- }
- else if (KillingSpree[killerid] == 5)
- {
- SetPlayerWantedLevel(killerid, 1);
- GivePlayerMoney (killerid,1270);
- GivePlayerWeapon (killerid,24,250);
- GivePlayerHealth (killerid,10);
- GivePlayerArmour(killerid,10);
- format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
- SendClientMessage(killerid, COLOR_YELLOW, string)
- }
- if (KillingSpree[killerid] > 5)
- {
- new string[128];
- format(string,sizeof(string),"%s now got a killings spree of %d !!!", killerid, KillingSpree);
- SendClientMessageToAll(red, string); print(string);
- }
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/ksh", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement