Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hook.Add("chatMessage", "playerslist", function(msg, client)
- if msg ~= "!players" then return end
- if bit32.band(client.Permissions, 0x40) == 0x40 then
- local msg = ""
- -- you have to loop through Client.ClientList do find the client that is controlling the character, or use Util.FindClientCharacter(character)
- -- Loop through alive players
- for player in Client.ClientList do
- if player.Character.IsHuman then
- msg = msg .. "\n" .. "[Alive]: " .. player.Character.Name .. "\n" .. "[Nickname]: " .. player.Name .. "\n" .. "[SteamID]: " .. player.SteamID .."\n"
- end
- end
- -- Now loop through dead ones
- for character in Character.CharacterList do
- if character.IsHuman and character.IsDead and not character.IsBot then
- msg = msg .. "\n" .. "[Dead]: " .. character.Name .. "\n"
- end
- end
- print(msg)
- return true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement