SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/05/2012, 11:07 AM   #1
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default 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 is offline   Reply With Quote
Old 15/05/2012, 12:47 PM   #2
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Question

Can someone help??
SpiderWalk is offline   Reply With Quote
Old 15/05/2012, 12:54 PM   #3
Niko_boy
High-roller
 
Niko_boy's Avatar
 
Join Date: Aug 2010
Location: Somewhere i belong
Posts: 1,337
Reputation: 138
Default 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.
__________________
nope[IMG]http://*******/1r0SOkH_[/IMG]
•••[CLOSED]LCS•Freeroam•DM•Stunts•••AutoArena [0.3z][No SkinShot][sixtytiger.com]Want a decent Attack Defend Gamemode?
N/A176.31.229.148:7830Get This! Attack-Defend(v2.3.1)
Niko_boy is offline   Reply With Quote
Old 15/05/2012, 01:00 PM   #4
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Question

Quote:
Originally Posted by Niko_boy View Post
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??
SpiderWalk is offline   Reply With Quote
Old 15/05/2012, 01:06 PM   #5
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,313
Reputation: 720
Default Re: Question

You can store the old armour on each shot, and after, calculate the new armour and set it.
__________________



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Old 15/05/2012, 01:17 PM   #6
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Question

Quote:
Originally Posted by Viniborn View Post
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
SpiderWalk is offline   Reply With Quote
Old 15/05/2012, 01:23 PM   #7
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,313
Reputation: 720
Default Re: Question

Ex:
pawn Code:
new Float:LastArmour;

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



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Old 15/05/2012, 04:35 PM   #8
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Question

Quote:
Originally Posted by Viniborn View Post
Ex:
pawn Code:
new Float:LastArmour;

//OnPlayerGiveDamage
LastArmour*= 0.05;
SetPlayerArmour(ID,LastArmour);
I try it.But it`s not working
SpiderWalk is offline   Reply With Quote
Old 15/05/2012, 04:59 PM   #9
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Question

Someone know
SpiderWalk is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Question] 1 very important question... Master_Gangster Help Archive 4 02/03/2011 07:36 PM
[QUESTION/HELP] DCMD Question Larsey123IsMe Help Archive 23 18/01/2011 04:30 PM
Question regarding playerid (noob question!) Mattjones17 Help Archive 5 27/10/2010 04:21 PM
Data type question.. (and mac address question) DarrenReeder Help Archive 2 21/10/2010 08:20 PM
Hello all i got one question (very easy to answer J.I.C question) SAMPfan109 General 0 06/03/2010 04:43 PM


All times are GMT. The time now is 09:23 AM.


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