Anti team-attack
#3

OR, just use the OnPlayerTakeDamage public.
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
Get the team id of the issuerid and if its the same as the teamid of the playerid, you can do
pawn Code:
if(issuerid != INVALID_PLAYER_ID)
{
new Float:health, Float:newhealth;
health = GetPlayerHealth(playerid, health);
newhealth = health += amount;
SetPlayerHealth(playerid, newhealth);
}
There could be some mistakes made this really quick, but i think it should work.
Reply


Messages In This Thread
Anti team-attack - by TheSnaKe - 09.06.2013, 11:14
Re: Anti team-attack - by Guest123 - 09.06.2013, 11:35
Re: Anti team-attack - by Facerafter - 09.06.2013, 11:51
Re: Anti team-attack - by Vince - 09.06.2013, 12:20
Re: Anti team-attack - by TheSnaKe - 09.06.2013, 12:22
Re: Anti team-attack - by Facerafter - 09.06.2013, 12:29
Re: Anti team-attack - by TheSnaKe - 09.06.2013, 12:42
Re: Anti team-attack - by Aly - 09.06.2013, 12:54
Re: Anti team-attack - by TheSnaKe - 09.06.2013, 13:10
Re: Anti team-attack - by dEcooR - 09.06.2013, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)