14.01.2012, 19:49
Add on top:
At command:
At OnPlayerDeath:
pawn Код:
new UsedKillCmd[MAX_PLAYERS];
pawn Код:
CMD:kill(playerid, params[])
{
UsedKillCmd[playerid] = 1;
SetPlayerHealth(playerid, 0);
return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(UsedKillCmd[playerid] == 0)
{
SendClientMessage(killerid, COLOR_GREY, " You're now a murder! ");
GivePlayerMoney(killerid, 500);
SendClientMessage(playerid, COLOR_GREY, " You have been murdered! ");
GivePlayerMoney(playerid, -500);
return 1;
}
else
{
UsedKillCmd[playerid] = 0;
return 0;
}
return 1;
}