head shoot system
#1

Hola , estoy con el sistema de headshot pero nose porquй pero no funciona,

pawn Код:
#define TIMER_INTERVAL 150
new maxPlayers;
OnFilterScriptInit:
pawn Код:
public OnFilterScriptInit()
{
fogueo = 0;
maxPlayers = GetMaxPlayers();
SetTimer("CheckHeadShot", TIMER_INTERVAL, 1);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
if(fogueo == 1)
{
if(GetPVarInt(playerid, "Headshotted") == 1)
{
SetPVarInt(playerid, "Headshotted", 0);
}
}
return 1;
}

forward CheckHeadShot();

public CheckHeadShot()
{
if(fogueo == 1)
{
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;
}
Aparte de eso tengo un comando que activa "fogueo".

la cosa es que pawn no me da ningun error pero cuando activo "fogueo" y doy en la cabeza no muere xDDD
Reply


Messages In This Thread
head shoot system - by Porta0123 - 08.09.2013, 13:53
Respuesta: head shoot system - by Braun - 08.09.2013, 14:00
Respuesta: head shoot system - by oOFotherOo - 08.09.2013, 14:04
Re: head shoot system - by Porta0123 - 08.09.2013, 14:12
Respuesta: head shoot system - by Braun - 08.09.2013, 14:16
Re: head shoot system - by Porta0123 - 08.09.2013, 14:21
Respuesta: head shoot system - by Braun - 08.09.2013, 14:29
Re: head shoot system - by Porta0123 - 08.09.2013, 14:41
Respuesta: head shoot system - by Braun - 08.09.2013, 14:49
Re: head shoot system - by Porta0123 - 08.09.2013, 14:51

Forum Jump:


Users browsing this thread: 1 Guest(s)