Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( trace.Entity:IsPlayer() ) then
- local alpha = math.Clamp(255 - ( (255 / fadeDistance) * ( LocalPlayer():GetPos():Distance( trace.Entity:GetPos() ) ) ), 0, 255);
- -- Get the x and y position.
- local x, y = self:GetScreenCenterBounce();
- -- Draw the player's name.
- y = self:DrawInformation(trace.Entity:Name(), "ChatFont", x, y, team.GetColor( trace.Entity:Team() ), alpha);
- -- Check if the player is in a clan.
- if (trace.Entity:GetNetworkedString("cider_Clan") != "") then
- y = self:DrawInformation("Clan: "..trace.Entity:GetNetworkedString("cider_Clan"), "ChatFont", x, y, Color(255, 255, 255, 255), alpha);
- end;
- -- Draw the player's job.
- y = self:DrawInformation("Job: "..trace.Entity:GetNetworkedString("cider_Job"), "ChatFont", x, y, Color(255, 255, 255, 255), alpha);
- elseif ( ValidEntity( trace.Entity:GetNetworkedEntity("cider_Player") ) ) then
- local player = trace.Entity:GetNetworkedEntity("cider_Player");
- -- Check if the player is alive.
- if ( player:Alive() and player != LocalPlayer() ) then
- local alpha = math.Clamp(255 - ( (255 / fadeDistance) * ( LocalPlayer():GetPos():Distance( trace.Entity:GetPos() ) ) ), 0, 255);
- -- Get the x and y position.
- local x, y = self:GetScreenCenterBounce();
- -- Draw the player's name.
- y = self:DrawInformation(player:Name(), "ChatFont", x, y, team.GetColor( player:Team() ), alpha);
- -- Check if the player is in a clan.
- if (player:GetNetworkedString("cider_Clan") != "") then
- y = self:DrawInformation("Clan: "..player:GetNetworkedString("cider_Clan"), "ChatFont", x, y, Color(255, 255, 255, 255), alpha);
- end;
- -- Draw the player's job.
- y = self:DrawInformation("Job: "..player:GetNetworkedString("cider_Job"), "ChatFont", x, y, Color(255, 255, 255, 255), alpha);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement