[FilterScript] Weapon damage system [v1.0]
#1

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. ]
Reply
#2

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

Quote:
Originally Posted by Elbert_Hutchinson
View Post
Nice nice.
So if you put case 38: Damage = 1;
Minigun = 1hp per sec?
Per bullet.
Reply
#4

Looks nice, good work.
Reply
#5

Quote:
Originally Posted by Anzhelov
View Post
Looks nice, good work.
Thanks, and it's a weapon damage system that works .
Reply
#6

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.
Reply
#7

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.
Reply
#8

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)
Reply
#9

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?
Reply
#10

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.
Reply
#11

Updated.
Reply
#12

man this rocks , good job
Reply
#13

Thanks, any more ideas are welcome .
Reply
#14

Bumping, for anyone that needs .
Reply
#15

This is amazing. I am using it on my server.
Keep up the good work. It is really good, and no lags or bugs.
Reply
#16

Thanks .
Reply
#17

Updated; v3.
Reply
#18

Would be nice if you also could use this on rhino,hunter and rustler to
Reply
#19

Quote:
Originally Posted by cruising
Посмотреть сообщение
Would be nice if you also could use this on rhino,hunter and rustler to
Try talking to wups, maybe he can do something with OnPlayerVehicleDamage.
Reply
#20

useful fs ^^
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)