Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode/*
compiled/*
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

7 changes: 6 additions & 1 deletion Todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ TODO:
Track what teams robots are on and move players to the non robot team when they join the server mid round

Add menus for volunteers to select from a list of robots, taken robots will be grayed out or not shown in the list. First come first serve
Menu style will be 1 - > 9 with Scout, Soldier, Pyro, Demo, Heavy, Engineer, Medic, Spy, with each having different types to pick from.
Menu style will be 1 - > 9 with Scout, Soldier, Pyro, Demo, Heavy, Engineer, Medic, Spy, with each having different types to pick from.

storage:
- turn target into targetlist in storage plugin? ... maybe?
needed in command too so it would be duplicate code
unless command gets setup in main-plugin too?
43 changes: 31 additions & 12 deletions beagro.sp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <sourcemod>
#include <tf2_stocks>
#include <tf2attributes>
#include <berobot>

#define PLUGIN_VERSION "1.0"

Expand Down Expand Up @@ -58,6 +59,13 @@ public OnPluginStart()
SetFailState("Failed to create call: CBasePlayer::EquipWearable");

delete hTF2;

AddRobot("Agro", "Pyro", CreateAgro);
}

public void OnPluginEnd()
{
RemoveRobot("Agro");
}

public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
Expand Down Expand Up @@ -185,45 +193,56 @@ public Action:Command_GiantPyro(client, args)
decl String:arg1[32];
if (args < 1)
{
arg1 = "@me";
arg1[0] = '\0';
}
else GetCmdArg(1, arg1, sizeof(arg1));

CreateAgro(client, arg1);
return Plugin_Handled;
}

public void CreateAgro(int client, char target[32])
{
int targetFilter = 0;
if (target[0] == '\0')
{
target = "@me";
targetFilter = COMMAND_FILTER_NO_IMMUNITY;
}

new String:target_name[MAX_TARGET_LENGTH];
new target_list[MAXPLAYERS], target_count;
new bool:tn_is_ml;

if ((target_count = ProcessTargetString(
arg1,
target,
client,
target_list,
MAXPLAYERS,
COMMAND_FILTER_ALIVE|(args < 1 ? COMMAND_FILTER_NO_IMMUNITY : 0),
COMMAND_FILTER_ALIVE|targetFilter,
target_name,
sizeof(target_name),
tn_is_ml)) <= 0)
{
ReplyToTargetError(client, target_count);
return Plugin_Handled;
return;
}
for (new i = 0; i < target_count; i++)
{
if(!g_IsAgro[target_list[i]]){

if(!g_IsAgro[target_list[i]]){
g_IsAgro[target_list[i]] = true;
MakeGiantPyro(target_list[i]);
}else
MakeGiantPyro(target_list[i]);
}
else
{

g_IsAgro[target_list[i]] = false;
PrintToChat(target_list[i], "1. You are no longer Giant Agro!");
TF2_RegeneratePlayer(target_list[i]);
}


}
if (g_IsAgro[client])EmitSoundToAll(SPAWN);
return Plugin_Handled;
}

MakeGiantPyro(client)
Expand Down
56 changes: 37 additions & 19 deletions bearray.sp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <sourcemod>
#include <tf2_stocks>
#include <tf2attributes>
#include <berobot>

#define PLUGIN_VERSION "1.0"

Expand Down Expand Up @@ -50,6 +51,13 @@ public OnPluginStart()
SetFailState("Failed to create call: CBasePlayer::EquipWearable");

delete hTF2;

AddRobot("Array Seven", "Medic", CreateArraySeven);
}

public void OnPluginEnd()
{
RemoveRobot("Array Seven");
}

public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
Expand Down Expand Up @@ -153,53 +161,63 @@ public Action:RemoveModel(client)
AcceptEntityInput(client, "SetCustomModel");
}
}

public Action:Command_GiantMedic(client, args)
{
decl String:arg1[32];
if (args < 1)
{
arg1 = "@me";
arg1[0] = '\0';
}
else GetCmdArg(1, arg1, sizeof(arg1));

CreateArraySeven(client, arg1);
return Plugin_Handled;
}

public void CreateArraySeven(int client, char target[32])
{
int targetFilter = 0;
if (target[0] == '\0')
{
target = "@me";
targetFilter = COMMAND_FILTER_NO_IMMUNITY;
}

new String:target_name[MAX_TARGET_LENGTH];
new target_list[MAXPLAYERS], target_count;
new bool:tn_is_ml;

if ((target_count = ProcessTargetString(
arg1,
target,
client,
target_list,
MAXPLAYERS,
COMMAND_FILTER_ALIVE|(args < 1 ? COMMAND_FILTER_NO_IMMUNITY : 0),
COMMAND_FILTER_ALIVE|targetFilter,
target_name,
sizeof(target_name),
tn_is_ml)) <= 0)
{
ReplyToTargetError(client, target_count);
return Plugin_Handled;
return;
}
for (new i = 0; i < target_count; i++)
{
if(!g_IsArraySeven[target_list[i]]){

g_IsArraySeven[target_list[i]] = true;
MakeGiantMedic(target_list[i]);


if(!g_IsArraySeven[target_list[i]]){

g_IsArraySeven[target_list[i]] = true;
MakeGiantMedic(target_list[i]);

}else{
}else{

g_IsArraySeven[target_list[i]] = false;
PrintToChat(target_list[i], "1. You are no longer Giant ArraySeven!");
TF2_RegeneratePlayer(target_list[i]);
}

g_IsArraySeven[target_list[i]] = false;
PrintToChat(target_list[i], "1. You are no longer Giant ArraySeven!");
TF2_RegeneratePlayer(target_list[i]);
}
}
if (g_IsArraySeven[client])EmitSoundToAll(SPAWN);
return Plugin_Handled;
}

MakeGiantMedic(client)
{
TF2_SetPlayerClass(client, TFClass_Medic);
Expand Down
61 changes: 39 additions & 22 deletions bebearded.sp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <sourcemod>
#include <tf2_stocks>
#include <tf2attributes>
#include <berobot>

#define PLUGIN_VERSION "1.0"

Expand Down Expand Up @@ -50,6 +51,13 @@ public OnPluginStart()
SetFailState("Failed to create call: CBasePlayer::EquipWearable");

delete hTF2;

AddRobot("Bearded Expense", "Heavy", CreateBearded);
}

public void OnPluginEnd()
{
RemoveRobot("Bearded Expense");
}

public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
Expand Down Expand Up @@ -157,54 +165,63 @@ public Action:RemoveModel(client)
AcceptEntityInput(client, "SetCustomModel");
}
}

public Action:Command_SuperHeavyweightChamp(client, args)
{
decl String:arg1[32];
if (args < 1)
{
arg1 = "@me";
arg1[0] = '\0';
}
else GetCmdArg(1, arg1, sizeof(arg1));

CreateBearded(client, arg1);
return Plugin_Handled;
}

public void CreateBearded(int client, char target[32])
{
int targetFilter = 0;
if (target[0] == '\0')
{
target = "@me";
targetFilter = COMMAND_FILTER_NO_IMMUNITY;
}

new String:target_name[MAX_TARGET_LENGTH];
new target_list[MAXPLAYERS], target_count;
new bool:tn_is_ml;

if ((target_count = ProcessTargetString(
arg1,
target,
client,
target_list,
MAXPLAYERS,
COMMAND_FILTER_ALIVE|(args < 1 ? COMMAND_FILTER_NO_IMMUNITY : 0),
COMMAND_FILTER_ALIVE|targetFilter,
target_name,
sizeof(target_name),
tn_is_ml)) <= 0)
{
ReplyToTargetError(client, target_count);
return Plugin_Handled;
return;
}
for (new i = 0; i < target_count; i++)
{


if(!g_IsBearded[target_list[i]]){

g_IsBearded[target_list[i]] = true;
MakeBearded(target_list[i]);

}else
{

g_IsBearded[target_list[i]] = false;
PrintToChat(target_list[i], "1. You are no longer Giant Bearded Expense!");
PrintToChat(target_list[i], "2. You will turn back by changing class or dying!");
TF2_RegeneratePlayer(target_list[i]);
}
{
if(!g_IsBearded[target_list[i]]){
g_IsBearded[target_list[i]] = true;
MakeBearded(target_list[i]);

}else
{
g_IsBearded[target_list[i]] = false;
PrintToChat(target_list[i], "1. You are no longer Giant Bearded Expense!");
PrintToChat(target_list[i], "2. You will turn back by changing class or dying!");
TF2_RegeneratePlayer(target_list[i]);
}


}
if (g_IsBearded[client])EmitSoundToAll(SPAWN);
return Plugin_Handled;
}

MakeBearded(client)
Expand Down
Loading