SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 09/08/2011, 07:01 PM   #1
Darnell
Gangsta
 
Darnell's Avatar
 
Join Date: Jul 2010
Posts: 824
Reputation: 35
Default Weapon damage system [v3.0]

Weapon damage system v3

* My first filterscript, be nice.
* Add credits if you are using this script on your gamemode.

================================================== ====================

Quote:
Version 1
Adds damage to weapons, doesn't edit the damage itself.


Version 2
Edits the damage by your choice.

Version 3
Upgraded detection of hitting to textdraw.
================================================== ====================

* Has a detection if you shot the target and if the target got shot. [ Upgraded in version 3 to TextDraw ]
How to edit the weapon damage by yourself :
Quote:
The code itself :
pawn Code:
case [weaponid]: Damage = [damage];
Example for a tec9 that does 55 damage.
pawn Code:
case 31: Damage = 55;
Example for a tec9 & a micru UZI, both do 55 damage.
pawn Code:
case 31,28: Damage = 25;
================================================== ====================
OnPlayerShootPlayer - REQUIRED.

Code :
Quote:
Version 1
adf.ly
pastebin
Version 2
adf.ly
pastebin
Version 3
adf.ly
pastebin
================================================== ====================
CREDITS :
wups - OPSP
Spenzo / Darnell (me) - for this filterscript .



================================================== ====================

[ case 31: Damage = 50; , then tec9 will do 50 will deal 50 health points per bullet. ]

Last edited by Darnell; 21/08/2011 at 11:04 AM. Reason: Updating.
Darnell is offline   Reply With Quote
Old 09/08/2011, 07:06 PM   #2
Elbert_Hutchinson
Big Clucker
 
Elbert_Hutchinson's Avatar
 
Join Date: May 2011
Location: In Mai Signature
Posts: 54
Reputation: 0
Default Re: Weapon damage system [v1.0]

Nice nice.
So if you put case 38: Damage = 1;
Minigun = 1hp per sec?
__________________




Elbert_Hutchinson is offline   Reply With Quote
Old 09/08/2011, 07:06 PM   #3
Darnell
Gangsta
 
Darnell's Avatar
 
Join Date: Jul 2010
Posts: 824
Reputation: 35
Default Re: Weapon damage system [v1.0]

Quote:
Originally Posted by Elbert_Hutchinson View Post
Nice nice.
So if you put case 38: Damage = 1;
Minigun = 1hp per sec?
Per bullet.
Darnell is offline   Reply With Quote
Old 09/08/2011, 07:32 PM   #4
Anzhelov
Huge Clucker
 
Join Date: Dec 2010
Posts: 250
Reputation: 8
Default Re: Weapon damage system [v1.0]

Looks nice, good work.
Anzhelov is offline   Reply With Quote
Old 09/08/2011, 07:36 PM   #5
Darnell
Gangsta
 
Darnell's Avatar
 
Join Date: Jul 2010
Posts: 824
Reputation: 35
Default Re: Weapon damage system [v1.0]

Quote:
Originally Posted by Anzhelov View Post
Looks nice, good work.
Thanks, and it's a weapon damage system that works .
Darnell is offline   Reply With Quote
Old 09/08/2011, 07:39 PM   #6
0ne
Gangsta
 
Join Date: Sep 2009
Posts: 539
Reputation: 0
Default Re: Weapon damage system [v1.0]

I doubt this will work, since there aren't any real defines of weapon damage only scripted, you can't actually change the guns damage, samp's scripting isn't made very accurate so theres like 2% or more chance that your code can get bypassed. There is just no possible way to do this swift and accurate atm, and all sa-mp devs can say is script it yourself.
0ne is offline   Reply With Quote
Old 09/08/2011, 07:41 PM   #7
Darnell
Gangsta
 
Darnell's Avatar
 
Join Date: Jul 2010
Posts: 824
Reputation: 35
Default Re: Weapon damage system [v1.0]

Quote:
Originally Posted by 0ne View Post
I doubt this will work, since there aren't any real defines of weapon damage only scripted, you can't actually change the guns damage, samp's scripting isn't made very accurate so theres like 2% or more chance that your code can get bypassed. There is just no possible way to do this swift and accurate atm, and all sa-mp devs can say is script it yourself.
Well, it works, and it's tested ingame.
Darnell is offline   Reply With Quote
Old 09/08/2011, 07:48 PM   #8
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Posts: 1,216
Reputation: 141
Default Re: Weapon damage system [v1.0]

Quote:
Originally Posted by Darnell View Post
Well, it works, and it's tested ingame.
No no no, it doesn't change the weapon damage. It just adds the damage, to the damage done.

Here's how it should be done, if you want it like that.
http://pastebin.com/DGH9nH7a

(It sets your health to the one without default damage, then adds the damage done by the gun)
wups is offline   Reply With Quote
Old 09/08/2011, 09:19 PM   #9
Chenjiang
Little Clucker
 
Join Date: Nov 2010
Posts: 24
Reputation: 0
Default AW: Weapon damage system [v1.0]

How accurate is this?
Can you damage people through walls, like with other Damage-Scripts?
How many resources does it use, wouldn't it cause massive lag to a weaker server?
Chenjiang is offline   Reply With Quote
Old 09/08/2011, 09:31 PM   #10
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Posts: 1,216
Reputation: 141
Default Re: AW: Weapon damage system [v1.0]

Quote:
Originally Posted by Chenjiang View Post
How accurate is this?
Can you damage people through walls, like with other Damage-Scripts?
How many resources does it use, wouldn't it cause massive lag to a weaker server?
Absolutely not. No damage through walls, and I doubt any lag would be caused by this script.
wups 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
[Include] Car damage system - Damage a car without a driver! The_Moddler Includes 68 30/03/2012 01:38 AM
Weapon damage!! BlackWolf120 Help Archive 4 13/03/2011 12:27 AM
Weapon Damage Scarface~ Help Archive 4 27/08/2010 07:05 PM
Weapon damage vection Help Archive 7 23/08/2010 09:11 AM


All times are GMT. The time now is 09:19 PM.


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