mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 21:43:22 +00:00
ftt: merge meow into honk
This commit is contained in:
parent
8e1dc263ad
commit
509e70b235
4 changed files with 17 additions and 11 deletions
Binary file not shown.
|
@ -353,8 +353,10 @@ void DisableTroll(int client, const char[] troll) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCategory(const char[] newCat) {
|
public void SetCategory(const char[] newCat) {
|
||||||
categoryID = categories.PushString(newCat);
|
categoryID = categories.FindString(newCat);
|
||||||
|
if(categoryID == -1)
|
||||||
|
categoryID = categories.PushString(newCat);
|
||||||
}
|
}
|
||||||
void GetCategory(int category, char[] buffer, int size) {
|
void GetCategory(int category, char[] buffer, int size) {
|
||||||
categories.GetString(category, buffer, size);
|
categories.GetString(category, buffer, size);
|
||||||
|
|
|
@ -147,7 +147,9 @@ public Action L4D2_OnEntityShoved(int client, int entity, int weapon, float vecD
|
||||||
}
|
}
|
||||||
public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs) {
|
public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs) {
|
||||||
if(sArgs[0] == '@') return Plugin_Continue;
|
if(sArgs[0] == '@') return Plugin_Continue;
|
||||||
if(IsTrollActive(client, "Honk")) {
|
static Troll honkTroll;
|
||||||
|
if(!honkTroll.id) GetTroll("Honk / Meow", honkTroll);
|
||||||
|
if(honkTroll.IsActive(client) && honkTroll.activeFlagClients[client] & 1) {
|
||||||
static char strings[32][7];
|
static char strings[32][7];
|
||||||
int words = ExplodeString(sArgs, " ", strings, sizeof(strings), 5);
|
int words = ExplodeString(sArgs, " ", strings, sizeof(strings), 5);
|
||||||
for(int i = 0; i < words; i++) {
|
for(int i = 0; i < words; i++) {
|
||||||
|
@ -379,14 +381,16 @@ public Action SoundHook(int[] clients, int& numClients, char sample[PLATFORM_MAX
|
||||||
lastButtonUser = -1;
|
lastButtonUser = -1;
|
||||||
}else if(numClients > 0 && entity > 0 && entity <= MaxClients) {
|
}else if(numClients > 0 && entity > 0 && entity <= MaxClients) {
|
||||||
if(StrContains(sample, "survivor\\voice") > -1) {
|
if(StrContains(sample, "survivor\\voice") > -1) {
|
||||||
if(IsTrollActive(entity, "Honk")) {
|
static Troll honkTroll;
|
||||||
strcopy(sample, sizeof(sample), "player/footsteps/clown/concrete1.wav");
|
if(!honkTroll.id) GetTroll("Honk / Meow", honkTroll);
|
||||||
|
if(honkTroll.IsActive(entity)) {
|
||||||
|
if(honkTroll.activeFlagClients[entity] & 1)
|
||||||
|
strcopy(sample, sizeof(sample), "player/footsteps/clown/concrete1.wav");
|
||||||
|
else
|
||||||
|
strcopy(sample, sizeof(sample), "custom/meow1.mp3");
|
||||||
return Plugin_Changed;
|
return Plugin_Changed;
|
||||||
} else if(IsTrollActive(entity, "Vocalize Gag")) {
|
} else if(IsTrollActive(entity, "Vocalize Gag")) {
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
} else if(IsTrollActive(entity, "Meow")) {
|
|
||||||
strcopy(sample, sizeof(sample), "custom/meow1.mp3");
|
|
||||||
return Plugin_Changed;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ void SetupTrolls() {
|
||||||
Trolls[index].AddFlag("Biles", true);
|
Trolls[index].AddFlag("Biles", true);
|
||||||
Trolls[index].AddFlag("Molotovs", true);
|
Trolls[index].AddFlag("Molotovs", true);
|
||||||
Trolls[index].AddFlag("Pipebombs", true);
|
Trolls[index].AddFlag("Pipebombs", true);
|
||||||
|
|
||||||
SetupTroll("No Pickup", "Prevents a player from picking up ANY (new) item. Use ThrowItAll to make them drop", TrollMod_Constant);
|
SetupTroll("No Pickup", "Prevents a player from picking up ANY (new) item. Use ThrowItAll to make them drop", TrollMod_Constant);
|
||||||
SetupTroll("UziRules", "Picking up a weapon gives them a UZI instead", TrollMod_Constant);
|
SetupTroll("UziRules", "Picking up a weapon gives them a UZI instead", TrollMod_Constant);
|
||||||
SetupTroll("Primary Disable", "Player cannot pickup any weapons, only melee/pistols", TrollMod_Constant);
|
SetupTroll("Primary Disable", "Player cannot pickup any weapons, only melee/pistols", TrollMod_Constant);
|
||||||
|
@ -37,8 +36,9 @@ void SetupTrolls() {
|
||||||
SetupTroll("iCantSpellNoMore", "Chat messages letter will randomly changed with wrong letters", TrollMod_Constant);
|
SetupTroll("iCantSpellNoMore", "Chat messages letter will randomly changed with wrong letters", TrollMod_Constant);
|
||||||
SetupTroll("No Profanity", "Replaces some words with random phrases", TrollMod_Constant);
|
SetupTroll("No Profanity", "Replaces some words with random phrases", TrollMod_Constant);
|
||||||
SetupTroll("Vocalize Gag", "Prevents player from sending any vocalizations (even automatic)", TrollMod_Constant);
|
SetupTroll("Vocalize Gag", "Prevents player from sending any vocalizations (even automatic)", TrollMod_Constant);
|
||||||
SetupTroll("Honk", "Honk", TrollMod_Constant);
|
index = SetupTroll("Honk / Meow", "Honk", TrollMod_Constant, false);
|
||||||
SetupTroll("Meow", "Makes the player meow", TrollMod_Constant);
|
Trolls[index].AddFlag("Honk", true);
|
||||||
|
Trolls[index].AddFlag("Meow", false);
|
||||||
|
|
||||||
SetCategory("Health");
|
SetCategory("Health");
|
||||||
SetupTroll("Damage Boost", "Makes a player take more damage than normal", TrollMod_Constant);
|
SetupTroll("Damage Boost", "Makes a player take more damage than normal", TrollMod_Constant);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue