12.03.2011, 22:10
hi,
im using the OnPlayerShootPlayer include with this code in my gamemode:
I want that u die instantly if hit by a sniper, no matter how much life or armor u got.
This works just perfectly as long as i shoot a player from a low distance.
As soon as a shoot a player from a longer distance it does not work anymore.
Could someone pls help me? PLs tell me what could be the problem.
regards, BlackWolf120.
im using the OnPlayerShootPlayer include with this code in my gamemode:
pawn Код:
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
new Float:H[2];
GetPlayerHealth(target, H[0]);
GetPlayerArmour(target,H[1]);
if(GetPlayerWeapon(shooter) == 34)//this is a sniper
{
if(H[1] > 0) return SetPlayerArmour(target,0);
SetPlayerHealth(target, H[0]-100);
}
return 1;
}
This works just perfectly as long as i shoot a player from a low distance.
As soon as a shoot a player from a longer distance it does not work anymore.
Could someone pls help me? PLs tell me what could be the problem.
regards, BlackWolf120.