Код:
#include <a_samp>
#define RED 0xF20000FF
new Rampage[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Rampage[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new str[256];
Rampage[playerid] = 0;
Rampage[killerid]++;
if(Rampage[killerid] == 5) {
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Rampage Reward: You have been given $500!");
GivePlayerMoney(killerid,500);
}
else if(Rampage[killerid] == 10) {
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Rampage Reward: You have been given $1000!");
GivePlayerMoney(killerid,1000);
}
else if(Rampage[killerid] == 15){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Rampage Reward: You have been given $1500!");
GivePlayerMoney(killerid,1500);
}
else if(Rampage[killerid] == 20){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Rampage Reward: You have been given $2000!");
GivePlayerMoney(killerid,2000);
}
else if(Rampage[killerid] == 25){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Rampage Reward: You have been given $2500!");
GivePlayerMoney(killerid,2500);
}
else if(Rampage[killerid] == 30){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Rampage Reward: You have been given $3000!");
GivePlayerMoney(killerid,3000);
}
else if(Rampage[killerid] == 35){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Rampage Reward: You have been given $3500!");
GivePlayerMoney(killerid,3500);
}
}