Help in kill assist
#10

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
Reply


Messages In This Thread
Help in kill assist - by Virus. - 31.01.2013, 16:44
Re: Help in kill assist - by FUNExtreme - 31.01.2013, 16:51
Re: Help in kill assist - by Virus. - 31.01.2013, 16:53
Re: Help in kill assist - by Virus. - 01.02.2013, 05:47
Re: Help in kill assist - by Virus. - 01.02.2013, 16:42
Re: Help in kill assist - by thefatshizms - 01.02.2013, 16:44
Re: Help in kill assist - by Virus. - 01.02.2013, 16:58
Re : Help in kill assist - by Amine_Mejrhirrou - 01.02.2013, 17:11
Re: Help in kill assist - by Virus. - 01.02.2013, 17:14
Re : Help in kill assist - by Amine_Mejrhirrou - 01.02.2013, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)