Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --You will of course need to call getCount() if you want this to work :D
- local function getCount()
- if (SERVER) then
- hook.Add( "TTTBeginRound", "NumberOfTypes", function()
- local TCount = 0
- local DCount = 0
- local ICount = 0
- for k, v in pairs( player.GetAll() ) do
- if v:IsTraitor() and v:Alive() then
- TCount=TCount+1
- elseif v:IsDetective() and v:Alive() then
- DCount=DCount+1
- elseif v:Alive() then
- ICount=ICount+1;
- end
- end
- timer.Simple( .5, function()
- PrintMessage( HUD_PRINTTALK, "Traitors: "..TCount )
- PrintMessage( HUD_PRINTTALK, "Detectives: "..DCount )
- PrintMessage( HUD_PRINTTALK, "Innocents: ".. ICount )
- end )
- end )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement