mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-07 00:03:21 +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");
|
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);
|
TeleportEntity(bot_client_id, vPos, NULL_VECTOR, NULL_VECTOR);
|
||||||
|
|
||||||
SetEntityModel(bot_client_id, model); //set entity model to custom survivor model
|
SetEntityModel(bot_client_id, model); //set entity model to custom survivor model
|
||||||
return bot_user_id;
|
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))) {
|
if((client = GetClientOfUserId(client))) {
|
||||||
//PrintToServer("client %d %N",client,client);
|
//PrintToServer("client %d %N",client,client);
|
||||||
SetEntityMoveType(client, MOVETYPE_NONE);
|
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 }));
|
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, view_as<float>({ 0.0, 0.0, 0.0 }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <jutils>
|
#include <jutils>
|
||||||
#include <left4dhooks>
|
#include <left4dhooks>
|
||||||
#include <sceneprocessor>
|
#include <sceneprocessor>
|
||||||
#include <feedthetrolls>
|
#include <ftt>
|
||||||
#include <multicolors>
|
#include <multicolors>
|
||||||
|
|
||||||
#undef REQUIRE_PLUGIN
|
#undef REQUIRE_PLUGIN
|
||||||
|
@ -27,6 +27,9 @@ public Plugin myinfo =
|
||||||
url = ""
|
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
|
//plugin start
|
||||||
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) {
|
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) {
|
||||||
if(late) {
|
if(late) {
|
||||||
|
@ -133,6 +136,7 @@ public void Event_CarAlarm(Event event, const char[] name, bool dontBroadcast) {
|
||||||
int client = GetClientOfUserId(event.GetInt("userid"));
|
int client = GetClientOfUserId(event.GetInt("userid"));
|
||||||
if(client) {
|
if(client) {
|
||||||
PrintToChatAll("%N has alerted the horde!", client);
|
PrintToChatAll("%N has alerted the horde!", client);
|
||||||
|
FakeClientCommandEx(client, "sm_swarm #%d", client);
|
||||||
}
|
}
|
||||||
//Ignore car alarms for autopunish
|
//Ignore car alarms for autopunish
|
||||||
lastButtonUser = -1;
|
lastButtonUser = -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue