03.03.2013, 07:17
(
Последний раз редактировалось Fernado Samuel; 04.10.2013 в 17:50.
)
Removed
public OnPlayerShootPlayer(shooter,target,Float:damage)
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
new Float:HP;
GetPlayerHealth(target, HP); // Here we will take the player current health
if(GetPlayerWeapon(shooter) == 34) SetPlayerHealth(target, HP-100); // This will kill the target from 1 shoot
return 1;
}
Damage(playerid, Float:health, Float:armour, Float:damage)
{
armour -= damage; //Will decrease
if(armour <= 0.0) //if armour is lower or equal to 0.0 do..
{
armour = 0.0;
health -= damage;
if(health <= 0.0) health = 0.0;
}
SetPlayerHealth(playerid, health);
SetPlayerArmour(playerid, armour);
}
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
switch(GetPlayerWeapon(Shooter)) //Switchs shooters weaponid
{
case 34: {
HealthAdjust(Target, HealthLost, ArmourLost, 35.0); } //Default weapon damage + your custom damage
}