19.05.2011, 20:11
Ex:
AK-47: 30
M4: 31
Eagle: 24
MP5: 29
AK-47: 30
M4: 31
Eagle: 24
MP5: 29
pawn Код:
public CheckHeadShot()
{
new index;
for(new playerid; playerid < maxPlayers; playerid++)
{
if(IsPlayerConnected(playerid))
{
index = GetPlayerAnimationIndex(playerid);
if(index == 1173 || index == 1175 || index == 1177 || index == 1178)
{
if(GetPlayerWeapon(playerid) == 31 || GetPlayerWeapon(playerid) == 30 || GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon(playerid) == 29)
{
SetPVarInt(playerid, "Headshotted", 1);
SetPlayerHealth(playerid, 0);
}
}
}
}
return 1;
}