Advertisement
81_DrizZle

Untitled

Jun 22nd, 2019
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. function ITEM:OnEquip(ply, modifications)
  2.     hook.Add("TTTBeginRound", ply:UniqueID() .. "_detective", function()
  3.         if ply:GetRoleString() ~= "detective" then
  4.             ply:SetRole(ROLE_DETECTIVE)
  5.             ply:AddCredits(GetConVarNumber("ttt_credits_starting"))
  6.         end
  7.  
  8.         if SERVER then
  9.             ply:PS_TakeItem(self.ID)
  10.         end
  11.  
  12.         hook.Remove("TTTBeginRound", ply:UniqueID() .. "_detective")
  13.     end)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement