Guest User

Untitled

a guest
Apr 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. if(CLIENT) then
  2. table.insert(aowl.Score.Buttons,{command="aowl joinplayerteam {UNIQUEID}",show="not_self",title="join team",group="players"})
  3. usermessage.Hook("aowl.score.update",function() aowl.UpdateScoreboard() end)
  4. return;
  5. end
  6. function aowl.UpdateTeams(v)
  7. timer.Simple(0.3,function() umsg.Start("aowl_join_team")
  8. umsg.Entity(v)
  9. umsg.End()end)
  10. end
  11. aowl.AddCommand("joinplayerteam",function(p,_,uid)
  12. uid=tonumber(uid)
  13. local res=easylua.FindEntity(uid)
  14. if(res and res:IsPlayer()) then
  15. p:SetAowlTeamName(res:GetAowlTeamName())
  16. p:SetAowlTeamColor(res:GetAowlTeamColor())
  17. p:PrintMessage(HUD_PRINTTALK,"Joined "..res:Name().."'s team!")
  18. aowl.UpdateTeams(res)
  19. else
  20. p:PrintMessage(HUD_PRINTTALK,"Invalid player!")
  21. end
  22. end)
Add Comment
Please, Sign In to add comment