09.03.2013, 11:32
(
Последний раз редактировалось HitnKill; 15.03.2013 в 10:50.
)
Quote:
the problem is sometimes a player who damages another one like this, it won't be synced on their screen and only the person you damaged's screen. to be honest, it's more practical (imo) to just detect if a player did < 3 or so damage with any shootable, and IsPlayerInRangeOfPoint.
|
It all depends on what the person want to do, an example if the player who give the damage see he give a weapon butt attack and the player who receive this damage a fire by an Desert Eagle, you cant cancel the damage at this Desert Eagle (you can SetHP but if you setHP < Damage its very bad visually). I think your system is not perfectly but i know with the sync SAMP we cant to do a system perfect sync but i want just detect this anims its better i think.
Quote:
It's simple, default damage or default in singleplayer butt attack is 2.64, which makes my code is to convert that damage you want.
Sorry for my bad english, i'm Argentinan. |
PHP код:
switch(weaponid)
{
case 15: amount = 12;
case 4: amount = 40;
case 5: amount = 12;
case 22: amount = 18;
case 28: amount = 8;
case 29: amount = 10;
case 32: amount = 9;
case 33: amount = 40;
case 34: amount = 50;
}
armour = armour - amount;
if(armour < 0.0)
{
health += armour;
if(health <= 0.0)
{
health = 0.0;
}
armour = 0.0;
}
SetPlayerHealthTakeDamage(playerid, health); // My Func change this
SetPlayerArmourTakeDamage(playerid, armour); // My Func change this
}