03.12.2013, 22:27
este codigo de aki?
Код:
function DamagePlayer(playerid,i) { new Float:Health; GetPlayerHealth(i,Health); if(Health >= 1.0 && Health <= 10.0) SetPlayerHealth(i,5.0); if(PInfo[playerid][ZPerk] == 18) { if(PInfo[i][SPerk] != 5) { if(Health <= 10.0 && Health > 0.0) MakeProperDamage(i); else SetPlayerHealth(i,Health-7.0); } else { if(Health <= 10.0 && Health > 0.0) MakeProperDamage(i); else SetPlayerHealth(i,Health-9.0); } GetPlayerHealth(playerid,Health); if(Health >= 100.0) SetPlayerHealth(playerid,100.0); else SetPlayerHealth(playerid,Health+6.0); } else if(PInfo[i][SPerk] == 5) { GetPlayerHealth(i,Health); if(PInfo[playerid][ZPerk] == 1) { if(Health <= 10.0 && Health > 0.0) MakeProperDamage(i); else SetPlayerHealth(i,Health-7.0); } else SetPlayerHealth(i,Health-4.0); } else { GetPlayerHealth(i,Health); if(PInfo[playerid][ZPerk] == 1) { if(Health <= 10.0 && Health > 0.0) MakeProperDamage(i); else SetPlayerHealth(i,Health-10.0); } else if(PInfo[playerid][ZPerk] != 18.0) { if(Health <= 10.0 && Health > 0.0) MakeProperDamage(i); else SetPlayerHealth(i,Health-7.0); } } GetPlayerHealth(i,Health); if(Health <= 5) { PInfo[playerid][Kills]++; GivePlayerXP(playerid); InfectPlayer(i); } return 1; } function MakeProperDamage(playerid) { new Float:Health; GetPlayerHealth(playerid,Health); if(Health <= 10.0 && Health >= 5.0) SetPlayerHealth(playerid,4.0); else if(Health <= 5.0 && Health > 0.0) SetPlayerHealth(playerid,1.0); GetPlayerHealth(playerid,Health); return 1; }