09.10.2015, 17:21
Код:
I am using this under OnPlayerTakeDamage.
new Float:HP,Float:A;
GetPlayerHealth(playerid, HP);
GetPlayerArmour(playerid,A);
if(A > 0.0)
{
switch(weaponid)
{
case 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,42: SetPlayerArmour(playerid, A-amount);
}
}
if(A <= 0.0)
{
switch(weaponid)
{
case 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,42: SetPlayerHealthEx (playerid, HP-amount);
}
}
Код:
SetPlayerHealthEx(playerid,Float:NewHealth)
{
new Float:A;
GetPlayerArmour(playerid,A);
if(NewHealth > 99 && A <= 0.0 && JustSpawned[playerid] == 0 && onduty[playerid] == 0 && pInfo[playerid][GodMode] == 0 ) NewHealth = 99;
if(NewHealth <= 0.0) NewHealth = 0.0;
return SetPlayerHealth(playerid,NewHealth);
}
Kindly Help me to fix that Thanks.

