07.09.2013, 20:28
Quote:
ahhh , valee ahora entiendo xDDD (es lo que tiene 4s sin mover un dedo en scripts xDD)
y una ъltima cosa, como se hacнa para que cuando disperen a la cabeza muera directamente? |
pawn Код:
Sistema de headshot by:[EdX]Sparrow
#include <samp>
#define TIMER_INTERVAL 150
new
maxPlayers;
public OnFilterScriptInit()
{
maxPlayers = GetMaxPlayers();
SetTimer("CheckHeadShot", TIMER_INTERVAL, 1);
print("\n----------------------------------");
print(" System by: [EdX]Sparrow");
print("----------------------------------\n");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPVarInt(playerid, "Headshotted") == 1)
{
SetPVarInt(playerid, "Headshotted", 0);
GameTextForPlayer(playerid, "~r~Headshotted Porra!", 3000, 3);
GameTextForPlayer(killerid, "~r~Headshott Porra!", 3000, 3);
}
return 1;
}
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 == 1178)
{
SetPVarInt(playerid, "Headshotted", 1);
SetPlayerHealth(playerid, 0);
}
}
}
return 1;
}