28.05.2009, 20:27
pawn Код:
#include <a_samp>
new gTeam[MAX_PLAYERS];
#define TEAM_COP 21
#define COLOR_COP 0x3C26C7AA
#define COLOR_BRIGHTRED 0xFF0000AA
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[killerid] == TEAM_COP)
{
new string[40];
string[0] = GetPlayerWantedLevel(playerid) * 1000;
GivePlayerMoney(killerid, string[0]);
SetPlayerWantedLevel(playerid, 0);
format(string, sizeof string, "You killed a criminal and earned %d$!", string[0]);
SendClientMessage(killerid, COLOR_COP, string);
}
else
{
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
SendClientMessage(killerid, COLOR_BRIGHTRED, "Your wanted level is increased!");
}
return 1;
}