SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   Question (https://forum.sa-mp.com/showthread.php?t=342852)

SpiderWalk 15/05/2012 11:07 AM

Question
 
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.
pawn Code:
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

Re: Question
 
Can someone help??

Niko_boy 15/05/2012 12:54 PM

Re: Question
 
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

Re: Question
 
Quote:

Originally Posted by Niko_boy (Post 1864540)
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

Re: Question
 
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

Re: Question
 
Quote:

Originally Posted by Viniborn (Post 1864561)
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

Re: Question
 
Ex:
pawn Code:
new Float:LastArmour;

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

SpiderWalk 15/05/2012 04:35 PM

Re: Question
 
Quote:

Originally Posted by Viniborn (Post 1864588)
Ex:
pawn Code:
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

Re: Question
 
Someone know???


All times are GMT. The time now is 06:24 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.