error 025 function heading differs from prototype
public OnPlayerGiveDamage(playerid,damagedid,Float:amount,weaponid,bodypart)
{
if( weaponid == 0 ) return 0;
if( bodypart == 9 && !IsPlayerInAnyVehicle( damagedid ) ) // HEAD
SetPlayerHealth( damagedid, 0 );
if( bodypart == 7 || bodypart == 8 ) // LEGS
{
new Float:armour;
GetPlayerArmour(damagedid, armour);
if(armour <= 0)
{
new Float:health;
GetPlayerHealth(damagedid,health);
SetPlayerHealth(damagedid, health-10.0);
}
}
if( bodypart == 3 ) // TORSO/CHEST
{
new Float:armour;
GetPlayerArmour(damagedid, armour);
if(armour <= 0)
{
new Float:health;
GetPlayerHealth(damagedid,health);
SetPlayerHealth(damagedid, health-20.0);
}
}
return 1;
}
Hogy tudom ezt megcsinálni?
