Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. hook.Add( "OnPlayerChangedTeam", "RemovePianoNoPianist", function( ply, oteam, nteam )
  2. local ENTITY = ents.FindByClass( "gmt_instrument_piano" )
  3.  
  4. if oteam == TEAM_PIANIST then
  5. print("You're no longer a pianist.")
  6. for k, v in pairs(ENTITY) do
  7. if v:CPPIGetOwner() == ply then
  8. v:Remove()
  9. end
  10. end
  11. end
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement