[FilterScript] Custom Damages w/ Bodyparts
#1

Custom Damages w/ Bodyparts
This filterscript allows you to set custom damage values for any weapon you choose by their ID. If you do not add the weapon into the code, it will deal no damage. This prevents any sort of hacker spawning in super over-powered weapons, EX: a minigun, and using it to their advantage.

Link:
http://pastebin.com/Q7Td1ibz
Reply
#2

See Tip 2 in my post in this thread.

EDIT:
You also forgot to uncomment this:
Код:
//#define FILTERSCRIPT
EDIT 2:
If you are using the same code for different cases, use this:
Код:
switch(...) {
    case 3, 4, 5, 6, 7, 8, 9: {
        ...
    }
}
If it doesn't matter what bodypart is hit, you can replace the bodypart switch with a single statement.
Reply
#3

Quote:
Originally Posted by Freaksken
Посмотреть сообщение
See Tip 2 in my post in this thread.

EDIT:
You also forgot to uncomment this:
Код:
//#define FILTERSCRIPT
EDIT 2:
If you are using the same code for different cases, use this:
Код:
switch(...) {
    case 3, 4, 5, 6, 7, 8, 9: {
        ...
    }
}
Fixed TIP 2 on the other code. For your EDIT 2, I'm not using the code in the case that I feel I want a quick way to edit certain damage values per the weapon. Easier in the long run so I don't have to rewrite it entirely if I choose to change it again. Thanks for your indept tips though! VERY helpful.
Reply
#4

Quote:
Originally Posted by oSAINTo
Посмотреть сообщение
Fixed TIP 2 on the other code.
What I meant was that Tip 2 also applies here. Tip 3 as well.

Oh and you don't need to use OnFilterScriptExit when there is nothing in it.
Reply
#5

Quote:
Originally Posted by Freaksken
Посмотреть сообщение
What I meant was that Tip 2 also applies here. Tip 3 as well.

Oh and you don't need to use OnFilterScriptExit when there is nothing in it.
I will work on these tomorrow. Thank you for the help! Very much appreciated.
Reply
#6

Quote:
Originally Posted by Freaksken
Посмотреть сообщение
Код:
switch(...) {
    case 3, 4, 5, 6, 7, 8, 9: {
        ...
    }
}
why not

Код:
switch(...) {
    case 3 .. 9: {
        ...
    }
}
Reply
#7

Quote:
Originally Posted by Satori_Komeiji
Посмотреть сообщение
why not

Код:
switch(...) {
    case 3 .. 9: {
        ...
    }
}
That would be even better indeed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)