PHP код:
#define TIMER_INTERVAL 150
new
maxPlayers;
// On gameModeInit //
maxPlayers = GetMaxPlayers();
SetTimer("HeadShot", TIMER_INTERVAL, 1);
return 1;
}
//OnePlayerDeath//
if(GetPVarInt(playerid, "Headshot") == 1)
{
SetPVarInt(playerid, "Headshot", 0);
GameTextForPlayer(playerid, "~r~Headshot", 3000, 3);
GameTextForPlayer(killerid, "~r~Headshot", 3000, 3);
}
return 1;
}
forward HeadShot();
public HeadShot()
{
new
index;
for(new playerid; playerid < maxPlayers; playerid++)
{
if(IsPlayerConnected(playerid))
{
index = GetPlayerAnimationIndex(playerid);
if(index == 1173 || index == 1175 || index == 1177 || index == 1178)
{
SetPVarInt(playerid, "Headshot", 1);
SetPlayerHealth(playerid, 0);
}
}
}
return 1;
}