SA-MP Forums Archive
[Include] [INC] One Shot One Kill - Support for multiple players and weapon IDs. - 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] [INC] One Shot One Kill - Support for multiple players and weapon IDs. (/showthread.php?tid=113978)

Pages: 1 2


[INC] One Shot One Kill - Support for multiple players and weapon IDs. - GTA_Rules - 17.12.2009

Hello there!

Well, this is my first include, there's not too much I can say. It's a (small) include enabling/disabling Instagib on any weaponid for anyone at any time. I made this because the SA-MP RCON function didn't satisfy me (enabling Instagib on all weapons for everyone) and because I didn't see any good scripts yet.

Important note: This script doesn't use any timers at all, so don't worry about lag.

1. What is Instagib?

It's a modus where your weapon can kill somebody with one shot, instant kill.

2. Features

Functions:
Other functions:
Callback:
Video:

Testing my SA-MP Include for Instagib

3. Downloads

v 1.0:

Instagib.inc (Sendspace)
Instagib.inc (Pastebin)
Example Filterscript (.pwn) (Sendspace)
Example Filterscript (.amx) (Sendspace)
Example Filterscript (.pwn) (Pastebin)

v 1.1:

Instagib.inc (Megaupload)
Instagib.inc (Pastebin)
ExampleFS.pwn (Megaupload)
ExampleFS.amx (Megaupload)

v 1.2 Recommended!

Instagib.inc (Megaupload)
Instagib.inc (Pastebin)
ExampleFS.pwn (Megaupload)
ExampleFS.amx (Megaupload)
ExampleFS (Pastebin)


4. How to install?

1. Download Instagib.inc and the Example filterscript (both .pwn and .amx) from one of the links provided above.
2. Place Instagic.inc into Pawno/Include
3. Place ExampleFS.pwn and ExampleFS.amx in the filterscripts folder.
4. Add 'ExampleFS' to your server.cfg.
5. Run the server!

5. Credits

- woot (aka wootcake) - He has helped me A LOT with testing and helped fixing some bugs.
- Lithirm - He has helped me testing everything.
- [TW]deather - He helped me testing as well.
- hittt - Helped me making the video.

6. I try to compile the FS but it says can't read from file Instagib.inc

There are 2 possible causes.

1. You didn't download the include or didn't put it in the correct folder (Pawno/Include)
2. Close Pawno.exe and try opening the filterscript with the one in the server folder you've put the FS and the include in.

7. Changelog

v 1.0
* Initial release.
v 1.1
* Fixed a small bug with the state of the player.
v 1.2
* Fixed some minor bugs.
* Fixed OnPlayerInstagibKill sometimes being called twice.

8. Last word

Well, I really hope you enjoy this, and there might be room for improvement, since this is my first include I've ever made. If you find any bugs, please reply here. I'll do my best fixing them.

Have fun with it.

~Matthias


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - lolumadd - 17.12.2009

Holy mother of ****! Now I can make my one shot headshot thingy

EDIT: Doesnt work for me :/


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - Marshew_DD - 17.12.2009

WOw great


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - GTA_Rules - 17.12.2009

Quote:
Originally Posted by lolumadd [cod5server.tk
]
Holy mother of ****! Now I can make my one shot headshot thingy

EDIT: Doesnt work for me :/
What doesn't? Seems to work fine here.

Quote:
Originally Posted by Marshew_DD
WOw great
Thank you.

I'll post a video today, showing some kills with Instagib.

EDIT: Comments please? :/




Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - GTA_Rules - 17.12.2009

Comments please?..


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - Retardedwolf - 17.12.2009

pawn Код:
new Weapon = GetPlayerWeapon(playerid);
                    if(IsInstagibWeapon[Weapon] == 1 || PlayerInstagibWeapon[playerid][Weapon] == 1)
                    {
                      SetPlayerHealth(i, 0);
                      CallRemoteFunction("OnPlayerInstagibKill", "iii", i, playerid, Weapon);
                    }
Doesn't it just kill if that guy has the weapon that the server has set him without shooting heads,bodies or legs?


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - woot - 17.12.2009

Sweet, using it for some things.


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - GTA_Rules - 17.12.2009

Quote:
Originally Posted by www.******.com
pawn Код:
new Weapon = GetPlayerWeapon(playerid);
                    if(IsInstagibWeapon[Weapon] == 1 || PlayerInstagibWeapon[playerid][Weapon] == 1)
                    {
                      SetPlayerHealth(i, 0);
                      CallRemoteFunction("OnPlayerInstagibKill", "iii", i, playerid, Weapon);
                    }
Doesn't it just kill if that guy has the weapon that the server has set him without shooting heads,bodies or legs?
Nope, it checks if the player's aiming in another if statement.

Quote:
Originally Posted by //exora
Sweet, using it for some things.
Thanks


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - GTA_Rules - 17.12.2009

Updated the first post with the video.

EDIT: Oh come, only 4 replies that aren't mine?! I worked hard on this..


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - Scream[SM] - 18.12.2009

OMG....FINALLY! your inc is very good, thank you very much. I've waited a very!


Re: [INC] Instagib (no timers!) - Support for multiple players and weapon IDs. - GTA_Rules - 18.12.2009

Quote:
Originally Posted by Scream[SM
]
OMG....FINALLY! your inc is very good, thank you very much. I've waited a very!
Glad you like it!


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - Retardedwolf - 18.12.2009

Can you include a video when you shoot the player's lower body and will not die by instagib please?


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - Tyain - 19.12.2009

It's looks very nice indeed!

Is checks if player that took the shot lose it health? Or just the player that her are aiming?


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - Lynn09© - 19.12.2009

Very nice.
I like the name also xD


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - GTA_Rules - 19.12.2009

Quote:
Originally Posted by www.******.com
Can you include a video when you shoot the player's lower body and will not die by instagib please?
Hm how do you mean?

Quote:
Originally Posted by 1Shot1Kill™
Very nice.
I like the name also xD
Hehe thank you.

Quote:
Originally Posted by Tyain
It's looks very nice indeed!

Is checks if player that took the shot lose it health? Or just the player that her are aiming?
If the player is aiming at the other player and he just shot a bullet, then it triggers.

EDIT: I found one bug, I'll fix it in the next version. If you have any suggestions/ideas, please post them here.
EDIT2: Fixed & released 1.1


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - Kyeno - 19.12.2009

Looking nice, sure to try it. Cheers Matthias =)


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - SpanishMan - 19.12.2009

Very nice for Rp Servers..


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - GTA_Rules - 19.12.2009

Quote:
Originally Posted by Kyeno
Looking nice, sure to try it. Cheers Matthias =)
Thanks Kyeno

Quote:
Originally Posted by SpanishMan
Very nice for Rp Servers..
I don't really see how, isn't RP without shooting? :P

Sorry if I'm wrong here, I'm a DMer.


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - Tyain - 19.12.2009

Quote:
Originally Posted by Matthias_
Quote:
Originally Posted by SpanishMan
Very nice for Rp Servers..
I don't really see how, isn't RP without shooting? :P

Sorry if I'm wrong here, I'm a DMer.
RP you can shoot, but if you get shot you have to do RP

I think that I have found a bug, if you shoot a player very close to the head but don't really shot he, he die to...

Can you fix that?


Re: [INC] One Shot One Kill - Support for multiple players and weapon IDs. - GTA_Rules - 19.12.2009

You could change the radius in IsPlayerAiming, that would fix it.