02.09.2013, 14:58
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.
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.
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;
}