Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add( "OnPlayerChangedTeam", "RemovePianoNoPianist", function( ply, oteam, nteam )
- local ENTITY = ents.FindByClass( "gmt_instrument_piano" )
- if oteam == TEAM_PIANIST then
- print("You're no longer a pianist.")
- for k, v in pairs(ENTITY) do
- if v:CPPIGetOwner() == ply then
- v:Remove()
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement