forked from CFC-Servers/cfc_chat_transit
Revert player count logic
This commit is contained in:
parent
adf0e09caf
commit
a01fd1cbc8
@ -13,7 +13,7 @@ ChatTransit.PlayerConnect = (data) =>
|
||||
Data:
|
||||
SteamName: name
|
||||
SteamId: steamId and SteamIDTo64 steamId
|
||||
PlayerCountCurrent: ChatTransit.PlayerCount
|
||||
PlayerCountCurrent: player\GetCount! + 1
|
||||
PlayerCountMax: game\MaxPlayers!
|
||||
|
||||
ChatTransit.PlayerInitialSpawn = (ply) =>
|
||||
|
@ -12,7 +12,7 @@ ChatTransit.PlayerDisconnected = (data) =>
|
||||
Data:
|
||||
SteamName: ply and ply\Nick! or name
|
||||
SteamId: ply and ply\SteamID64! or SteamIDTo64 steamId
|
||||
PlayerCountCurrent: ChatTransit.PlayerCount
|
||||
PlayerCountCurrent: player\GetCount! - 1
|
||||
PlayerCountMax: game\MaxPlayers!
|
||||
Content: reason
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
gameevent.Listen "player_connect"
|
||||
gameevent.Listen "player_disconnect"
|
||||
|
||||
with ChatTransit
|
||||
.PlayerCount = 0
|
||||
.TrackPlayerCountConnected = ->
|
||||
.PlayerCount = .PlayerCount + 1
|
||||
|
||||
.TrackPlayerCountDisconnected = ->
|
||||
.PlayerCount = .PlayerCount - 1
|
||||
|
||||
hook.Add "player_connect", "CFC_ChatTransit_PlayerCountTracker", .TrackPlayerCountConnected
|
||||
hook.Add "player_disconnect", "CFC_ChatTransit_PlayerCountTracker", .TrackPlayerCountDisconnected
|
Loading…
Reference in New Issue
Block a user