[FilterScript] [0.3d R2] Realistic weapon bullet damage
#1

Hey guys... i got this idea about this when 0.3d got released... when callback OnPlayerTakeDamage came up i was able to do this... currently this is UNTESTED code but according to my maths and my knowledge of sa-mp this should work fine...

Info
Basicly what it does is making killing easier... good for deathmach servers and stuff... sniper rifles and country rifles has instant kill so its good for quickscoping (also knowing that its almost imposible)

All red texts are outdated!

How it works?
Well i am going to tell you what i thinked by lowest value, biggest damage

100/1 = 100 right?
so what it does is
SetPlayerHealth(playerid,health-100);
well when value is 2
100/2 = 50
SetPlayerHealth(playerid,health-50);
thats how it works


How it works since Release 2?
Well simply added enums and varriables, where weapon id was invalid its added as invalid...
now it browses trough varriable weapon damage and adds it to player...

How to add it?
Just open server.cfg
add in filterscripts line "rbd" and you are done
ofc without ""
Where to get it?
Releases:
R2.3_02 (Mistakes Edit / Clean Script) http://pastebin.com/CbAmjT9h
R2.3 (Mistakes Edit / Outdated)http://pastebin.com/kHBeqw9A
R2.2 (Mistakes edit / Outdated) http://pastebin.com/Gavy5rvZ
R2.1 (Mistakes edit / Outdated) http://pastebin.com/y0MgFdUh
R2 (Script Rewrite / Outdated) http://pastebin.com/U15qYWBZ
R1 (Outdated) http://pastebin.com/G287T9ng

Mirrors? Only R2.3.1! (without 1 pragma tabsize warning what has R2.3)
Zip File : http://www.speedyshare.com/files/304...lletdamage.zip
Rar File : http://www.speedyshare.com/files/304...lletdamage.rar


EDIT 1: Spraycan damage updated.
EDIT 2: Release 2 Added (Outdated)
EDIT 2: Release 2.1 Added (Outdated)
EDIT 2: Release 2.2 Added (Outdated)
EDIT 2: Release 2.3 Added (Up to date (Re-Scripted))
Reply
#2

Untested? Then why didn't you test it?
Reply
#3

i had issues with hamachi... couldn't make others see the server
Reply
#4

Ingenuous! Plus 1 Rep
Reply
#5

ty, i hope this helps!
Reply
#6

Quote:
Originally Posted by [WSF]ThA_Devil
Посмотреть сообщение
i had issues with hamachi... couldn't make others see the server
Yeah he said the SA-MP client isn't set to show 0.3d servers yet and it's only for scripting.

Quote:
Originally Posted by Kalcor
Notes:
- This release is for scripting only.
- More features and models will be added throughout the RC phase.
Also the math to this makes no sense to me, what you should do is. For example the

Max Damage = 100.0
Player Damage = 100.0
Normal Katana Damage = 2 (i think)
Katana = 1

(100.0+2)-(100.0/1)=
102.0-100.0=2.0

Edit:
NVM without returning 0 the additional 2 damage is applied my bad... man I'm not thinking aha
Reply
#7

Quote:
Originally Posted by TheLazySloth
Посмотреть сообщение
Yeah he said the SA-MP client isn't set to show 0.3d servers yet and it's only for scripting.
Still... work has been put in this... work it or not... we'll know that later
Reply
#8

Quote:
Originally Posted by TheLazySloth
Посмотреть сообщение
Yeah he said the SA-MP client isn't set to show 0.3d servers yet and it's only for scripting.



Also the math to this makes no sense to me, what you should do is. For example the

Max Damage = 100.0
Player Damage = 100.0
Normal Katana Damage = 2 (i think)
Katana = 1

(100.0+2)-(100.0/1)=
102.0-100.0=2.0

You need to change it to

Код:
#define katana 100.0 // for instant kill

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
#pragma unused amount new
Float: health, Float: pDamage;
GetPlayerHealth(playerid,health); if(issuerid != INVALID_PLAYER_ID) {
if(weaponid == 8 || weaponid == 9) {
pDamage = health-Katana; SetPlayerHealth(playerid, pDamage);
}
} return 0; // so the damage doesn't effect the player any further.
}
So its plain and simple...

Player Damage = 23.0
Katana = 1

23.0-100.0=-77.0(Dead)
Well.. didn't thinked about this but still... this is maths... it makes sense only for me? xD

Explaining script a bit:
First
Lowest value, biggest hit
100/1 = 100 right?
so what it does is
SetPlayerHealth(playerid,health-100);
well when value is 2
100/2 = 50
SetPlayerHealth(playerid,health-50);
thats how it works
Reply
#9

did you test it already?
Reply
#10

Awesome 100% works Great
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)