PDA

View Full Version : Question


SpiderWalk
15/05/2012, 11:07 AM
Hello.Today I create Perk system.I have 1 question.I made perk name Maximal Armour.And how to set this.When Shooter shoot the target(Other player).To take damage on armour 0.5 percent of full armour(When Shooter shoot target to take from target just 0.5 percent of full armour)

I trying to use this public but I dont have idea how to script it.

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(perk[playerid][MaxArmour] == 1)
{

}
return 1;
}


PS:My english is little bad when i am explaing

SpiderWalk
15/05/2012, 12:47 PM
Can someone help??

Niko_boy
15/05/2012, 12:54 PM
what is it supposed to do ? i read ur first post thrice didnt understood,
+ I really wanna know what u actualy tryna do and help you out.

SpiderWalk
15/05/2012, 01:00 PM
what is it supposed to do ? i read ur first post thrice didnt understood,
+ I really wanna know what u actualy tryna do and help you out.

Look.I made perk system.Also I made one perk named Maximal Armour based on Crysis 2.IF you know Maximal Armour from Crysis then you will know what I want to do.If not then I will explain again.When player shot other player.He will take damage just 0.5 per cent of full armour.And I dont know how to create that to take damage just 0.5 damage with all weapons...how??

ViniBorn
15/05/2012, 01:06 PM
You can store the old armour on each shot, and after, calculate the new armour and set it.

SpiderWalk
15/05/2012, 01:17 PM
You can store the old armour on each shot, and after, calculate the new armour and set it.

????What you say I don`t understand :)

ViniBorn
15/05/2012, 01:23 PM
Ex:

new Float:LastArmour;

//OnPlayerGiveDamage
LastArmour*= 0.05;
SetPlayerArmour(ID,LastArmour);

SpiderWalk
15/05/2012, 04:35 PM
Ex:

new Float:LastArmour;

//OnPlayerGiveDamage
LastArmour*= 0.05;
SetPlayerArmour(ID,LastArmour);


I try it.But it`s not working :(

SpiderWalk
15/05/2012, 04:59 PM
Someone know???