Anti-Lag Shoot Problem
#1

I use this script for anti-lag system:
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount)
{
	new Float:health, Float:armour;
	GetPlayerHealth(damagedid, health);
	GetPlayerArmour(damagedid, armour);

	if(armour == 0.0) // No armour, just take health
	{
	    health -= amount;
	    if(health < 0.0) health = 0;
	}
	else // There is armour, take what is needed
	{
	    if(armour-amount < 0.0) // Health needs to be taken
	    {
	        health -= (amount - armour);
	        armour = 0;
	    }
	    else armour -= amount;
	}

	SetPlayerHealth(damagedid, health);
	SetPlayerArmour(damagedid, armour);
	return 1;
}
When i kill somebody with Deagle it takes 2x damage, i read as I need to put on OnPlayerSpawn :
Код:
SetPlayerTeam(playerid, 4);
Ok, i put this and when i kill somebody damage is good but the CallBack OnPlayerDeath doesn't call. In server log when i kill show like that:
Код:
[death] Awesome. died 255
instead of
Код:
[kill] Awesome. killed Jadooze Desert Eagle
Reply


Messages In This Thread
Anti-Lag Shoot Problem - by Petry - 29.09.2013, 07:09
Re: Anti-Lag Shoot Problem - by Petry - 30.09.2013, 11:19
Re: Anti-Lag Shoot Problem - by Stereotype - 30.09.2013, 11:31
Re: Anti-Lag Shoot Problem - by Jefff - 30.09.2013, 15:22
Re: Anti-Lag Shoot Problem - by Pottus - 30.09.2013, 16:10
Re: Anti-Lag Shoot Problem - by Jefff - 30.09.2013, 16:17
Re: Anti-Lag Shoot Problem - by Pottus - 30.09.2013, 16:23
Re: Anti-Lag Shoot Problem - by Jefff - 30.09.2013, 16:25
Re: Anti-Lag Shoot Problem - by Pottus - 30.09.2013, 16:26

Forum Jump:


Users browsing this thread: 2 Guest(s)