Advertisement
sb2014

gmod code

Feb 13th, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. function ITEM:OnUse( )
  2.     local ply = self:GetOwner( )
  3.     hook.Add("TTTBeginRound", ply:UniqueID() .. "_traitor", function()
  4.         if ply:GetRoleString() != "traitor" then
  5.             ply:SetRole(ROLE_TRAITOR)
  6.             ply:AddCredits(GetConVarNumber("ttt_credits_starting"))
  7.             ply:GetOwner( ):SetVelocity( self:GetOwner( ):GetUp( ) * 15 )
  8.         end
  9.  
  10.         hook.Remove("TTTBeginRound", ply:UniqueID() .. "_traitor")
  11.     end)
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement