Kill assist help
#1

I want to make a kill assist,any ideas on how to start?
Reply
#2

pawn Код:
new assist[MAX_PLAYERS] = INVALID_PLAYER_ID;

public OnPlayerGiveDamage(playerid, damageid, Float:amount, weaponid, bodypart)
{
       if(GetPlayerTeam(playerid) != GetPlayerTeam(damageid)) return 0;

      assist[damageid] = playerid;
      return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
      if(assist[playerid] != killerid && assist[playerid] != INVALID_PLAYER_ID)
      {
            SendClientMessage(assist[playerid], -1, "+500$ for assist");
            assist[playerid] = INVALID_PLAYER_ID;
      }
      return 1;
}
Just an simple example. You can use arraysfor multiple assists.
Reply
#3

Alright i will try to make one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)