24.04.2012, 13:14
Preciso Muito De Um Fs De Headshot Ja Procurei Mais Os Que Eu Achei Nгo Funcionaram =/
if(IsPlayerAimingTargetBodyPart(playerid, damagedid, 1))
{
GameTextForPlayer(damagedid, "~r~HEAD ~w~SHOT", 2000, 0);
SetPlayerHealth(damagedid, -1);
}
#define TIMER_INTERVAL 150 |
SetTimer("CheckHeadShot", TIMER_INTERVAL, 1); |
if(GetPVarInt(playerid, "Headshotted") == 1) { SetPVarInt(playerid, "Headshotted", 0); GameTextForPlayer(playerid, "Head Shot !!", 5000, 3); GameTextForPlayer(killerid, "Head Shot!!", 5000, 3); } |
forward CheckHeadShot(); public CheckHeadShot() { new index; for(new playerid; playerid < maxPlayers; playerid++) { if(IsPlayerConnected(playerid)) { index = GetPlayerAnimationIndex(playerid); if(index == 1173 || index == 1175 || index == 1177 || index == 117 { SetPVarInt(playerid, "Headshotted", 1); SetPlayerHealth(playerid, 0); } } } return 1; } |
public OnPlayerGiveDamage ( playerid , damagedid , Float: amount , weaponid ) if(IsPlayerAimingTargetBodyPart(playerid, damagedid, 1))
return GameTextForPlayer ( damagedid , "~r~HEAD ~w~SHOT" , 2000 , 0 ) , SetPlayerHealth ( damagedid , -1 ) ;