Get/Set Score
#4

Quote:
Originally Posted by [xB]Lordz
Посмотреть сообщение
You could create a variable when player enters the duel and when he dies, give score to the killer.
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;
}
MEGA EDIT: Just a simple question. Is it correct that this
pawn Код:
PlayerInfo[killerid][Duels]++;
will add + 1 to my duel scoring?
Reply


Messages In This Thread
Get/Set Score - by kbalor - 23.09.2012, 04:11
Re: Get/Set Score - by YourLord - 23.09.2012, 04:16
Re: Get/Set Score - by Lordzy - 23.09.2012, 04:29
Re: Get/Set Score - by kbalor - 23.09.2012, 12:56

Forum Jump:


Users browsing this thread: 2 Guest(s)