- Регистрация
- 26 Апр 2014
- Сообщения
- 10
- Лучшие ответы
- 0
- Репутация
- 0
Всем привет, баг заключается в том, что если на игроке есть броня, то после того, как она снимается после получения дамага и начинается сниматься ХП - резко выдаётся 250 брони. (The Godfather)
HTML:
stock SetPlayerDamage(playerid, damagedid, Float:damage, reason) {
new Float:health, Float:armour;
GetPlayerHealth(damagedid, health);
GetPlayerArmour(damagedid, armour);
if(armour > 0) {
armour -= damage;
if(armour < 0) {
health -= -armour;
if(health < 1) {
SyncInfo[damagedid][sKillerID] = playerid;
SyncInfo[damagedid][sReasonID] = reason;
}
}
Rac::SetPlayerArmour(damagedid, armour);
Rac::SetPlayerHealth(damagedid, health);
}
else if(health > 0) {
health -= damage;
if(health < 1) {
SyncInfo[damagedid][sKillerID] = playerid;
SyncInfo[damagedid][sReasonID] = reason;
}
Rac::SetPlayerArmour(damagedid, armour);
Rac::SetPlayerHealth(damagedid, health);
}
return 1;
}
Последнее редактирование: