10.12.2011, 16:15
oi gente eu queria incrementar no filterscript de headshot do pepe,para que somente as armas de fogo dessem headshot,e as arma branca n,blz,aki ta o sistema,como eu faзo pra arrumar pra todas as armas derem head shot,menos as arma branca n? vlws
vlws,espero ajuda pq nao sei faze isso flws
pawn Код:
#include <a_samp>
#define TIMER_INTERVAL 150
new maxPlayers;
public OnFilterScriptInit()
{
maxPlayers = GetMaxPlayers();
SetTimer("CheckHeadShot", TIMER_INTERVAL, 1);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPVarInt(playerid, "Headshotted") == 1)
{
SetPVarInt(playerid, "Headshotted", 0);
GameTextForPlayer(playerid, "~r~Headshotted", 3000, 3);
GameTextForPlayer(killerid, "~r~Headshott", 3000, 3);
}
return 1;
}
forward CheckHeadShot();
public CheckHeadShot()
{
new index;
for(new playerid; playerid < maxPlayers; playerid++)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerWeapon(playerid) == 34 )
{
index = GetPlayerAnimationIndex(playerid);
if(index == 1173 || index == 1175 || index == 1177 || index == 1178)
{
SetPVarInt(playerid, "Headshotted", 1);
SetPlayerHealth(playerid, 0);
}
}
}
}
return 1;
}