Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Notes
- --getID gets innocents and detectives
- --autodeadgive runs getID till there is either 1 D or 1 I alive
- --Never tested, may need to be edited a bit :D
- --Notes
- local function getID()
- if (SERVER) then
- local ICount = 0
- local DCount = 0
- for k, v in pairs( player.GetAll() ) do
- if v:IsInnocent() and v:Alive() then
- ICount=ICount+1
- elseif v:IsDetective() and v:Alive() then
- DCount=DCount+1
- end
- end
- end
- local function autodeadgive()
- while true do
- getID()
- if ICount or DCount = 1 then
- ulx playsound deadgive.mp3
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement