22.09.2013, 12:52
My question might sound noobish, but I've been trying to work this problem out, testing it but the result is negative, It doesn't work, I'm trying to make like a system when-ever you get hit by a sniper you will get killed automatically
Code
When I press KEY_FIRE, the bullet hits me but it doesn't kill me or the player even though my sniper scope is aiming towards the target
Code
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
if(weaponid == 34 && pInfo[issuerid][pVIP] >= 2)
{
SetPlayerHealth(playerid, 0);
GameTextForPlayer(issuerid, "Sniper Kill!", 2600, 4);
}
}
return 1;
}