[FilterScript] Flashbang filterscript by CaveDweller
#1

Flashbang

Overview
This filterscript allows the grenade in San Andreas to double-up as an incendiary flashbang. When a grenade detonates near a player, they will be temporarily blinded and disoriented. They will take some damage (30% of the normal amount) from the grenade, and if the grenade detonates too close to them then there is a chance that they will die. Flashbangs will damage vehicles in the same way that normal grenades do.

This script is a good, fun script to install on deathmatch servers, where the use of a flashbang can give a tactical advantage to a player, or on roleplay servers, where police can use it to defuse tough situations.

Demonstration
[ame="http://www.youtube.com/watch?v=nZzEd6vnvzQ"]Flashbang Demo[/ame]

Usage
To use the script, simply take the .pwn into your /filterscripts/ folder. Open it in Pawno and hit F5 to compile it. When ingame, type /flashbang and throw it - it will affect all nearby players, both friend and foe! You will need YSI to install this as it uses y_commands.

Download
Licensing and Maintenance
I will attempt to provide support for this script however I cannot guarantee it. The script is released under the MIT license so you are free to do as you please with it - if anyone makes a significant improvement/modification to the script then I will incorporate that into the original, with their permission.
Reply
#2

Small update, went from this:
pawn Code:
case 1:
{
        SetPlayerDrunkLevel(playerid, 10000);
}
case 2:
{
        SetPlayerDrunkLevel(playerid, 8000);
}
case 3:
{
        SetPlayerDrunkLevel(playerid, 6000);
}
case 4:
{
        SetPlayerDrunkLevel(playerid, 4000);
}
case 5:
{
        SetPlayerDrunkLevel(playerid, 2000);
}
case 6:
{
        SetPlayerDrunkLevel(playerid, 0);
        FlashbangSwayLevel[playerid] = -1;
}
to this:

pawn Code:
case 1 .. 6:
{
        SetPlayerDrunkLevel(playerid, 10000 - (2000 * (FlashbangSwayLevel[playerid] - 1)));
        if (FlashbangSwayLevel[playerid] == 6)
                FlashbangSwayLevel[playerid] = -1;
}
Always follow the DRY principle!
Reply
#3

EPIC EPIC EPIC!!! Good job bro
Reply
#4

Quote:
Originally Posted by HitterHitman
View Post
EPIC EPIC EPIC!!! Good job bro
Thanks. Feel free to make any suggestions you have in mind.
Reply
#5

Great script, well done.
Reply
#6

*******
Reply
#7

Pretty well done, nice idea..
Reply
#8

nice keep going its really cool
Reply
#9

- Can't you make this fs don't lose heath when we thrown that grenade??
Reply
#10

Quote:
Originally Posted by DuongNghia
View Post
- Can't you make this fs don't lose heath when we thrown that grenade??
Yes, I can, but then the player will take no damage from any explosions at all.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)