mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 21:43:22 +00:00
Minor cleanup
This commit is contained in:
parent
24dbfa8bfa
commit
96279f8cd2
4 changed files with 10 additions and 2 deletions
Binary file not shown.
Binary file not shown.
|
@ -207,7 +207,10 @@ stock int SpawnSurvivor(const float vPos[3], const float vAng[3], const char[] m
|
|||
}
|
||||
SetClientName(bot_client_id, spawn_minigun ? "MinigunBot" : "HoldoutBot");
|
||||
|
||||
SetEntProp(bot_client_id, Prop_Send, "m_fFlags", GetEntProp(bot_client_id, Prop_Send, "m_fFlags") | FL_FROZEN);
|
||||
CreateTimer(0.1, Timer_Move, bot_user_id);
|
||||
TeleportEntity(bot_client_id, vPos, NULL_VECTOR, NULL_VECTOR);
|
||||
|
||||
SetEntityModel(bot_client_id, model); //set entity model to custom survivor model
|
||||
return bot_user_id;
|
||||
}
|
||||
|
@ -247,10 +250,11 @@ void AvoidCharacter(int type, bool avoid) {
|
|||
}
|
||||
}
|
||||
|
||||
Action TimerMove(Handle timer, any client) {
|
||||
Action Timer_Move(Handle timer, any client) {
|
||||
if((client = GetClientOfUserId(client))) {
|
||||
//PrintToServer("client %d %N",client,client);
|
||||
SetEntityMoveType(client, MOVETYPE_NONE);
|
||||
SetEntProp(client, Prop_Send, "m_fFlags", GetEntProp(client, Prop_Send, "m_fFlags") | FL_FROZEN);
|
||||
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, view_as<float>({ 0.0, 0.0, 0.0 }));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <jutils>
|
||||
#include <left4dhooks>
|
||||
#include <sceneprocessor>
|
||||
#include <feedthetrolls>
|
||||
#include <ftt>
|
||||
#include <multicolors>
|
||||
|
||||
#undef REQUIRE_PLUGIN
|
||||
|
@ -27,6 +27,9 @@ public Plugin myinfo =
|
|||
url = ""
|
||||
};
|
||||
|
||||
//TODO: Make bots target player. Possibly automatic . See https://i.jackz.me/2021/05/NVIDIA_Share_2021-05-05_19-36-51.png
|
||||
//TODO: Friendly trolling VS punishment trolling
|
||||
|
||||
//plugin start
|
||||
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) {
|
||||
if(late) {
|
||||
|
@ -133,6 +136,7 @@ public void Event_CarAlarm(Event event, const char[] name, bool dontBroadcast) {
|
|||
int client = GetClientOfUserId(event.GetInt("userid"));
|
||||
if(client) {
|
||||
PrintToChatAll("%N has alerted the horde!", client);
|
||||
FakeClientCommandEx(client, "sm_swarm #%d", client);
|
||||
}
|
||||
//Ignore car alarms for autopunish
|
||||
lastButtonUser = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue