03.05.2011, 13:45
(
Последний раз редактировалось Firzendxiw; 04.05.2011 в 04:00.
Причина: Solved
)
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; }