18.12.2010, 22:31
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if( gTeam[ playerid ] == gTeam[ killerid ] )
{
SetPlayerDrunkLevel(playerid, 0);
GivePlayerMoney(killerid, -1000);
SetPlayerScore(killerid,GetPlayerScore(killerid)-2);
SendClientMessage(killerid, COLOR_BRIGHTRED, "You have teamkilled, you lost $1000 and 2 score");
}
else
{
new string[128];
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"You have killed %s and you gained 1000$ and 1 score",string);
SendClientMessage(killerid, COLOR_GREEN, string);
SetPlayerDrunkLevel(playerid, 0);
GivePlayerMoney(killerid,1000);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
}
return 1;
}