10.10.2016, 23:46
ai uma coisa й que quando o jogador nгo e agredido por uma arma de fogo e esta com colete perderб a vida ! Entгo seria melhor uma verificaзгo unica de funзгo !
PHP Code:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
if(antigod == 1)
{
if(damagedid != INVALID_PLAYER_ID)
{
if(CHECANDO[damagedid] == 0)
{
if(MORTO[damagedid] == 0)
{
if(weaponid != 34)
{
CHECANDO[damagedid] = 1; // nгo dar bugs na hora de checar o player
static Float:Health,Float:Armour;
GetPlayerHealth(damagedid, Health);
GetPlayerArmour(damagedid, Armour);
SetTimerEx("CheckArmourHealth", GetPlayerPing(damagedid)+300, false, "iii", damagedid, Armour, Health);
}
}
}
}
}
return 1;
}
/////////////////////////////////////////////////////////////////////////
forward CheckArmourHealth(playerid, Float:OldArmour, Float:OldHealth);
public CheckArmourHealth(playerid, Float:OldArmour, Float:OldHealth)
{
static Float:Health,Float:Armour;
GetPlayerArmour(playerid, Armour);
GetPlayerHealth(playerid, Health);
if((Armour >= OldArmour || Armour == OldArmour) && MORTO[playerid] == 0)
{
hits[playerid]++;
if(hits[playerid] >= WARNINGSKICK) return KickPlayer(playerid, "Armour/Health H4CK");
}
CHECANDO[playerid] = 0;
return 1;
}