mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-07 12:23:20 +00:00
ftt: Record activator of marked ban
This commit is contained in:
parent
509e70b235
commit
cddecefa81
4 changed files with 11 additions and 14 deletions
|
@ -71,9 +71,8 @@ enum struct Troll {
|
|||
}
|
||||
if(this.flagNames == null) this.flagNames = new ArrayList(MAX_TROLL_FLAG_LENGTH);
|
||||
int index = this.flagNames.PushString(name);
|
||||
index = RoundFloat(Pow(2.0, float(index)));
|
||||
if(defaultOn)
|
||||
this.defaultFlags |= 1 << index;
|
||||
this.defaultFlags |= (1 << index);
|
||||
return index;
|
||||
}
|
||||
|
||||
|
@ -81,7 +80,6 @@ enum struct Troll {
|
|||
return this.flagNames != null && this.flagNames.Length > 0;
|
||||
}
|
||||
|
||||
|
||||
bool IsFlagActive(int client, trollFlag flag) {
|
||||
if(ActiveTrolls[client] > 0 && IsTrollActive(client, this.name) && this.activeFlagClients[client] >= 0) {
|
||||
return this.activeFlagClients[client] & view_as<int>(flag) != 0;
|
||||
|
@ -132,9 +130,8 @@ ArrayList categories;
|
|||
static int categoryID = -1;
|
||||
|
||||
void ResetClient(int victim, bool wipe = true) {
|
||||
if(wipe) {
|
||||
if(wipe) //TODO: Remove legacy system, including this:
|
||||
ActiveTrolls[victim] = 0;
|
||||
}
|
||||
SetEntityGravity(victim, 1.0);
|
||||
SetEntPropFloat(victim, Prop_Send, "m_flLaggedMovementValue", 1.0);
|
||||
SDKUnhook(victim, SDKHook_WeaponCanUse, Event_ItemPickup);
|
||||
|
@ -143,7 +140,6 @@ void ResetClient(int victim, bool wipe = true) {
|
|||
SDKUnhook(wpn, SDKHook_Reload, Event_WeaponReload);
|
||||
}
|
||||
|
||||
|
||||
int SetupTroll(const char[] name, const char description[128], int mods, bool flagsMultiselectable = false, int defaultFlags = 0) {
|
||||
if(mods == 0) {
|
||||
ThrowError("Troll \"%s\" has no flags defined.", name);
|
||||
|
@ -161,6 +157,7 @@ int SetupTroll(const char[] name, const char description[128], int mods, bool fl
|
|||
trollKV.SetValue(name, i);
|
||||
return i++;
|
||||
}
|
||||
|
||||
// Gets the Troll enum struct via name
|
||||
// Returns index of troll enum
|
||||
int GetTroll(const char[] name, Troll troll) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue