You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/lua.cpp
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,15 @@
9
9
IServer* Server;
10
10
int iSlot = 0;
11
11
std::unordered_map<int, IClient*> pClients;
12
+
voidFreeID(int playerSlot)
13
+
{
14
+
auto it = pClients.find(playerSlot);
15
+
if ( it != pClients.end() )
16
+
{
17
+
pClients.erase(playerSlot);
18
+
}
19
+
}
20
+
12
21
boolLua::Hooks::OnSetSignonState(IClient* cl, int state, int spawncount) // Return true to block it. You would need to block SIGNONSTATE_PRESPAWN to block it from spawning the player.
13
22
{
14
23
if (Lua::PushHook("PlayerQueue:OnSetSignonState"))
@@ -25,6 +34,9 @@ bool Lua::Hooks::OnSetSignonState(IClient* cl, int state, int spawncount) // Ret
25
34
if ( g_Lua->GetType(-1) != GarrysMod::Lua::Type::Nil )
0 commit comments