23.09.2012, 04:29
You could create a variable when player enters the duel and when he dies, give score to the killer.
Example:
Example:
pawn Код:
new InDuel[MAX_PLAYERS];
CMD:duel(playerid,params[])
{
InDuel[playerid]=1;
return 1;
}
public OnPlayerDeath(playerid,killerid,reason)
{
if(InDuel[killerid] == 1) //Checking whether the killer is in duel.
{
SetPlayerScore(killerid)(GetPlayerScore(killerid)+1; //Gives +1 score.
}
if(InDuel[playerid] == 0)
{
SendClientMessage(playerid, 0xFF0000, "You Lost!");
}
return 1;
}