SA-MP Forums Archive
[Include] weapon-config.inc - Damage system with many features - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] weapon-config.inc - Damage system with many features (/showthread.php?tid=563387)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


weapon-config.inc - Damage system with many features - Slice - 15.02.2015

This is an include that provides a more consistent and responsive damage system with many new features.

It's pretty much plug-and-play if you don't have any filterscripts that interfere with the health or death events.

Demo server

Code:
HostName: Slice's test server
Address:  ulclan.com:1234
Players:  0 / 100
Ping:     42
Mode:     Slice's test gm
Map:      San Andreas
Features
Download

GitHub: https://github.com/oscar-broman/samp-weapon-config


Re: weapon-config.inc - Damage system with many features - Skully82 - 15.02.2015

Another Awesome Relases Of You,Slice!
Amazing work,Well done


Re: weapon-config.inc - Damage system with many features - Abagail - 15.02.2015

Second. Great release! Hopefully this will end the era of health hacking in SA-MP.


Respuesta: weapon-config.inc - Damage system with many features - Adoniiz - 15.02.2015

Nice release, Slice. I like the anti hh. thanks


Re: weapon-config.inc - Damage system with many features - Admigo - 15.02.2015

Looks nice


Re: weapon-config.inc - Damage system with many features - Ritzy2K - 15.02.2015

Nice... its gonna help a lot specially to tdm dm...and cnr..


Re: weapon-config.inc - Damage system with many features - GiamPy. - 15.02.2015

I like it.


Re: weapon-config.inc - Damage system with many features - Crayder - 15.02.2015

Great! Love it!


Re: weapon-config.inc - Damage system with many features - Abagail - 15.02.2015

That is some very complex, and lengthy code. How long did it take you to write the include?


Re: weapon-config.inc - Damage system with many features - Slice - 15.02.2015

It took quite a while to develop, since I didn't stop until the animations looked perfect! Though I still have some more things I want to add.

Binaries will be officially released for SKY soon.

In the mean time, try this: http://server.ulclan.com/SKY.so


Re: weapon-config.inc - Damage system with many features - PT - 15.02.2015

The health bar bigger is because the knife bug?

Nice work dude!


Re: weapon-config.inc - Damage system with many features - PaulDinam - 15.02.2015

Using wide screen fix mod for gta sa will cause this:



Re: weapon-config.inc - Damage system with many features - Slice - 15.02.2015

How exactly does wide screen need to be fixed?

Either way, is there a way to detect that mode by reading the camera mode or vectors?


Re: weapon-config.inc - Damage system with many features - PaulDinam - 15.02.2015

I don't think so, this is an old ASI mod for GTA.


Re: weapon-config.inc - Damage system with many features - Kyle - 15.02.2015

Quote:
Originally Posted by Slice
View Post
How exactly does wide screen need to be fixed?

Either way, is there a way to detect that mode by reading the camera mode or vectors?
GetPlayerCameraAspectRatio.

Will return 0.0000 for WIDESCREEN and 0.333333 for NON-WIDESCREEN.


Re: weapon-config.inc - Damage system with many features - Slice - 15.02.2015

He's talking about some CLEO, which by the way makes you impossible to hit on non-lagcomp servers and fucks up rocket launcher shoot vectors.

I suppose the aspect ratio should be another value for it. Could someone look into that?


Re: weapon-config.inc - Damage system with many features - PaulDinam - 15.02.2015

1.776470 is returned when using this CLEO mod, you think perhaps you could modify the include to detect whether a player is using it or not?


Re: weapon-config.inc - Damage system with many features - Crayder - 15.02.2015

Since you create a custom bar, I think you could add a define for the color. Like WC_HEALTH_COLOR. By default it'd be the normal color.

Or, you could use this color array and set the bar to (floatround(health)-1).

pawn Code:
new RGY[100] =
{
    0xFF0000FF,0xFF0500FF,0xFF0A00FF,0xFF0F00FF,0xFF1400FF,0xFF1900FF,0xFF1E00FF,0xFF2300FF,0xFF2800FF,0xFF2D00FF,
    0xFF3300FF,0xFF3800FF,0xFF3D00FF,0xFF4200FF,0xFF4700FF,0xFF4C00FF,0xFF5100FF,0xFF5600FF,0xFF5B00FF,0xFF6000FF,
    0xFF6600FF,0xFF6B00FF,0xFF7000FF,0xFF7500FF,0xFF7A00FF,0xFF7F00FF,0xFF8400FF,0xFF8900FF,0xFF8E00FF,0xFF9300FF,
    0xFF9900FF,0xFF9E00FF,0xFFA300FF,0xFFA800FF,0xFFAD00FF,0xFFB200FF,0xFFB700FF,0xFFBC00FF,0xFFC100FF,0xFFC600FF,
    0xFFCC00FF,0xFFD100FF,0xFFD600FF,0xFFDB00FF,0xFFE000FF,0xFFE500FF,0xFFEA00FF,0xFFEF00FF,0xFFF400FF,0xFFF900FF,
    0xFFFF00FF,0xF9FF00FF,0xF4FF00FF,0xEFFF00FF,0xEAFF00FF,0xE4FF00FF,0xDFFF00FF,0xDAFF00FF,0xD5FF00FF,0xD0FF00FF,
    0xCAFF00FF,0xC5FF00FF,0xC0FF00FF,0xBBFF00FF,0xB6FF00FF,0xB0FF00FF,0xABFF00FF,0xA6FF00FF,0xA1FF00FF,0x9CFF00FF,
    0x96FF00FF,0x91FF00FF,0x8CFF00FF,0x87FF00FF,0x82FF00FF,0x7CFF00FF,0x77FF00FF,0x72FF00FF,0x6DFF00FF,0x68FF00FF,
    0x62FF00FF,0x5DFF00FF,0x58FF00FF,0x53FF00FF,0x4EFF00FF,0x48FF00FF,0x43FF00FF,0x3EFF00FF,0x39FF00FF,0x34FF00FF,
    0x2EFF00FF,0x29FF00FF,0x24FF00FF,0x1FFF00FF,0x1AFF00FF,0x14FF00FF,0x0FFF00FF,0x0AFF00FF,0x05FF00FF,0x00FF00FF
};
100 colors, fade from green to yellow to red.





Edit: My server keeps crashing, is it because it is 0.3.7? Also, the bar is pretty wide (tall).


Re: weapon-config.inc - Damage system with many features - Slice - 16.02.2015

0.3.7 is not supported by SKY yet. I'll deal with it as fast as I can.

Could you attach gdb to the process and print a backtrace of the crash?


Re: weapon-config.inc - Damage system with many features - Crayder - 16.02.2015

Quote:
Originally Posted by Slice
View Post
0.3.7 is not supported by SKY yet. I'll deal with it as fast as I can.

Could you attach gdb to the process and print a backtrace of the crash?
It only crashes when I'm in game, and I can't connect to the server (or even query it) while gdb is attached. Lol, alternative?


EDIT: ALso, I can't run the server from the gdb console. It says server.cfg could not be run (and I get the intro stuff).