[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:
- Inst::OnPlayerConnect(playerid) - This function has to be used in OnPlayerConnect for the script to function correctly.
- Inst::OnPlayerKeyStateChange(playerid, newkeys, oldkeys) - This function has to be used in OnPlayerKeyStateChange for the script to function correctly.
- Inst::OnPlayerSpawn(playerid) - This function has to be used in OnPlayerSpawn for the script to function correctly.
- SetInstagibForPlayer(playerid, weaponid, bool:Enabled) - This function sets instagib for one player, on one weaponid, use true if you want it enabled, false if you want it disabled.
- SetInstagibForAll(weaponid, bool:Enabled) - This function sets instagib every connected player, on one weaponid, use true if you want it enabled, false if you want it disabled.
- GetWeaponInstagib(weaponid) - You can use this function to know wheter a weapon has Instagib or not. returns true if it does. False if it doesn't.
- GetPlayerInstagib(playerid, weaponid) - You can use this function to know wheter a player has Instagib enabled for a specific weapon or not. returns true if it does. False if it doesn't.
Other functions:
- IsValidWeapon(weaponid) - Returns true if it's a valid weapon, false if it isn't.
- IsPlayerAiming(playerid, aimid) - Not my function. Returns true it he's aiming, false if he's not.
Callback:
- OnPlayerInstagibKill(playerid, killerid, weaponid) - This callback is called when somebody kills another player using a weapon with Instagib enabled.
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:
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:
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.