[FilterScript] BanBat (BanHammer) - 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)
+--- Thread: [FilterScript] BanBat (BanHammer) (
/showthread.php?tid=461580)
BanBat (BanHammer) -
SchurmanCQC - 02.09.2013
This is a simple filterscript where, if you're (RCON) admin, you can do '/banbat.' If you hit someone with this 'BanBat,' it will ban them.
Now, this filterscript is insanely fun. If you'd like to use this just to hit your players for no reason, modify the script to launch the player 10 feet away or something. I will not be held accountable for bans that happen by accident, or for fun (no reason) using my filterscript.
You need ZCMD to compile this.
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
new BBMode[MAX_PLAYERS];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("Schurman's BanBat - OnFilterScriptInit()");
return 1;
}
public OnFilterScriptExit()
{
print("Schurman's BanBat - OnFilterScriptExit()");
return 1;
}
#else
main(){}
#endif
CMD:banbat(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if(BBMode[playerid] == 0)
{
BBMode[playerid] = 1;
GivePlayerWeapon(playerid, 5, 999);
SendClientMessage(playerid, -1, "You have been given a BanBat!");
}
else if(BBMode[playerid] == 1)
{
BBMode[playerid] = 0;
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, -1, "Your BanBat has been taken away!");
}
} else return SendClientMessage(playerid, -1, "You are not RCON admin!");
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID
&& BBMode[issuerid] == 1
&& weaponid == 5
&& IsPlayerAdmin(issuerid))
{
new
allString[128],
banName[MAX_PLAYER_NAME],
adminName[MAX_PLAYER_NAME];
GetPlayerName(playerid, banName, sizeof (banName));
GetPlayerName(issuerid, adminName, sizeof (adminName));
format(allString, sizeof(allString), "{FF6347}BanBat{FFFFFF} - {FF6347}%s{FFFFFF} has been banned by {FF6347}%s{FFFFFF}!", banName, adminName);
SendClientMessageToAll(-1, allString);
BanEx(playerid, "BanBat ban");
}
return 1;
}
This script has not been tested due to lack of free time, so if someone could test this on a willing volunteer and report back with the details, it will be appreciated.
Re : BanBat (BanHammer) -
Matnix - 02.09.2013
Ahahahah, can be funny nice idea. I'll test it.
Re: BanBat (BanHammer) -
DanishHaq - 02.09.2013
Great idea haha, nice.
Re: BanBat (BanHammer) -
SchurmanCQC - 02.09.2013
Thanks. Matnix, did you get around to testing it yet?
Re : BanBat (BanHammer) -
Matnix - 02.09.2013
Yeah - I've tested it and it's seems to work perfectly.
Re: BanBat (BanHammer) -
Pottus - 02.09.2013
You should use OnPlayerGiveDamage() instead and use a hammer "Ban Hammer"
Re: BanBat (BanHammer) -
xF4Life - 02.09.2013
Nice FS
Re: BanBat (BanHammer) -
XxBaDxBoYxX - 02.09.2013
Loooool
rep+
Re: BanBat (BanHammer) -
Yves - 03.09.2013
going to love this lol thanks for it great work mate.
Re: BanBat (BanHammer) -
devil shill - 06.09.2013
Does remind me of the kick gun but nice idea keep going mate !