sorry for my english Virus
i'm gonna try to explain my idea
the thing is to put a Variable on the player who "hit" the target (i will keep the Example with player X,Y and Z )
you will OnPlayerTakeDamage to mark the player who Hit the targer with a variable (player Y)
exmple :
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
//we gonna say that the variable name is Var[ MAX_PLAYERS ] ( but this codes are just a small exmple they are not complete)
Var[issuerid] = 1;
return 1;
}
then you will use OnPlayerDeath , to use a funtion on the player who killed the target
when the player die , you will check who killed him and cancel the variable on the killer ( because the killer won't need to get the same thing as the assistant ) and after you cancel the variable of the killer, you will check , all the players who hit the Target before the Target died.
exmple :
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
//set the variable of the killer to 0
Var[killerid] = 0;
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (Var[i] >= 1)
{
SendClientMessage(i, COLOR, "you have helped to kill an enemy");//just put the things you wanna add to the assistant there
}
}
}
The codes wont work because you will need to work much more on them , but i'm just giving an idea to make you know how you can proceed