OnPlayerShootPlayer wont damage other players
#1

Hey all, new to these forums. I've recently downloaded OPSP.inc and added #include <OPSP> so nothing wrong there. But I cant get my player to damage the other players according to the amount I set. If you could help out it would be appreciated.

Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
	new Float:Health;
	GetPlayerHealth(Target, Health);
	if(gTeam[Shooter] == TEAM_GROUP && (gTeam[Target] == TEAM_GROUP1 || gTeam[Target] == TEAM_GROUP2 || gTeam[Target] == TEAM_GROUP3))
	{
		if(GetPlayerWeapon(Shooter) == 0 && (test < 64800 && test > 28800))
		{
			HealthLost = Health-50;
			SetPlayerHealth(Target, HealthLost);
		}
		else if(GetPlayerWeapon(Shooter) == 0 && (test > 64800 || test < 28800))
		{
			HealthLost = Health-25;
			SetPlayerHealth(Target, HealthLost);
		}
		else if(GetPlayerWeapon(Shooter) == 4 && (test < 64800 && test > 28800))
		{
			HealthLost = Health-100;
			SetPlayerHealth(Target, HealthLost);
		}
		else if(GetPlayerWeapon(Shooter) == 4 && (test > 64800 || test < 28800))
		{
			HealthLost = Health-50;		
			SetPlayerHealth(Target, HealthLost);
		}
	}
	return 1;
}
Reply


Messages In This Thread
OnPlayerShootPlayer wont damage other players [SOLVED] - by Firzendxiw - 03.05.2011, 13:45
Re: OnPlayerShootPlayer wont damage other players - by [DM]Kane - 04.05.2011, 03:27
Re: OnPlayerShootPlayer wont damage other players [SOLVED] - by Firzendxiw - 04.05.2011, 03:36
Re: OnPlayerShootPlayer wont damage other players - by [DM]Kane - 04.05.2011, 04:00

Forum Jump:


Users browsing this thread: 1 Guest(s)