Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(CLIENT) then
- table.insert(aowl.Score.Buttons,{command="aowl joinplayerteam {UNIQUEID}",show="not_self",title="join team",group="players"})
- usermessage.Hook("aowl.score.update",function() aowl.UpdateScoreboard() end)
- return;
- end
- function aowl.UpdateTeams(v)
- timer.Simple(0.3,function() umsg.Start("aowl_join_team")
- umsg.Entity(v)
- umsg.End()end)
- end
- aowl.AddCommand("joinplayerteam",function(p,_,uid)
- uid=tonumber(uid)
- local res=easylua.FindEntity(uid)
- if(res and res:IsPlayer()) then
- p:SetAowlTeamName(res:GetAowlTeamName())
- p:SetAowlTeamColor(res:GetAowlTeamColor())
- p:PrintMessage(HUD_PRINTTALK,"Joined "..res:Name().."'s team!")
- aowl.UpdateTeams(res)
- else
- p:PrintMessage(HUD_PRINTTALK,"Invalid player!")
- end
- end)
Add Comment
Please, Sign In to add comment