I am messing around with some pointshop items and came up with the idea that people can purchase an item to auto call out bodies when they find them
[code]
ITEM.Name = 'Auto Call detective'
ITEM.Price = 500
ITEM.Model = 'models/props_junk/garbage_glassbottle003a.mdl'
ITEM.NoPreview = true
function ITEM:OnEquip(ply)
hook.Add("TTTBodyFound", ply:UniqueID() .. "_autoFindBody", function(finder, deadply, rag)
if ply:GetRoleString() != "traitor" or ply:GetRoleString() != "detective" then
deadply:ConCommand("ttt_confirm_death 1")
finder:ConCommand("ttt_call_detective 1")
end
end)
end
function ITEM:OnHolster(ply)
hook.Remove("TTTBodyFound", ply:UniqueID() .. "_autoFindBody")
end
[/code]
I have tried variations of person calling the commands as well as multiple variations of the ConCommand and RunCommand the ttt_call_detective gets ran and an alert gets sent stating "the body must be confirmed before you can call detective" and haven't been able to confirm death in everything ive tried.
Any help would be very much appreciated.
Sorry, you need to Log In to post a reply to this thread.