Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Kill Spree
- //by rocker3410
- #include <a_samp>
- new Spree[MAX_PLAYERS];
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_DARKBLUE 0x2641FEAA
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Spree[killerid]++;
- Spree[playerid] = 0;
- new string[100];
- if(Spree[killerid] == 10)//10 Kill Spree
- {
- format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
- SendClientMessageToAll(COLOR_PURPLE, string);
- SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 10 kills in a row. You have earned 2 score!");
- GivePlayerScore(killerid, 2);
- }
- else if(Spree[killerid] == 20)//20 Kill Spree
- {
- format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
- SendClientMessageToAll(COLOR_PURPLE, string);
- SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 20 kills in a row. You have earned 4 score!");
- GivePlayerScore(killerid, 4);
- }
- else if(Spree[killerid] == 30)//30 Kill Spree
- {
- format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
- SendClientMessageToAll(COLOR_PURPLE, string);
- SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 30 kills in a row. You earned 6 score!");
- GivePlayerScore(killerid, 6);
- }
- else if(Spree[killerid] == 40)//40 Kill Spree
- {
- format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
- SendClientMessageToAll(COLOR_PURPLE, string);
- SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 40 kills in a row. You earned 8 score!");
- GivePlayerScore(killerid, 8);
- }
- else if(Spree[killerid] == 50)//50 Kill Spree
- {
- format(string, sizeof(string), "%s is on a killing spree with %d kills.!", Name(killerid));
- SendClientMessageToAll(COLOR_PURPLE, string);
- SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 50 kills in a row. You earned 10 score!");
- GivePlayerScore(killerid, 10);
- }
- else if(Spree[killerid] == 60)//60 Kill Spree
- {
- format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
- SendClientMessageToAll(COLOR_PURPLE, string);
- SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 60 kills. You have earned 12 score!");
- GivePlayerScore(killerid, 12);
- }
- return 1;
- }
- stock Name(playerid)
- {
- new name[24];
- GetPlayerName(playerid, name, 24);
- return name;
- }
- stock GivePlayerScore(playerid, score)
- {
- SetPlayerScore(playerid, GetPlayerScore(playerid)+score);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement