10.12.2012, 14:11
I hope this does:
.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
new string[128];
PlayerInfo[killerid][pScore] = (PlayerInfo[killerid][pScore] + 1);
PlayerInfo[killerid][pCash] = PlayerInfo[killerid][pCash] + 1000;
PlayerInfo[playerid][pCash] -= 1000;
PlayerInfo[killerid][pKills] ++;
PlayerInfo[playerid][pDeaths] ++;
// Most important part: Use the SAMP functions to give score and cash to a player.
GivePlayerMoney(killerid, 1000);
SetPlayerScore(killerid, PlayerInfo[killerid][pScore]);
format(string, sizeof(string), "You killed %s and recieved $1,000!", Name(playerid));
SendClientMessage(killerid, COLOR_CYAN, string);
format(string, sizeof(string), "You've been killed by %s and lost $1,000!", Name(killerid));
SendClientMessage(playerid, COLOR_CYAN, string);
}
return 1;
}