Poll

Where any of these somewhat interesting or "cool"?

Yes, thank you :)
7 (100%)
No, do better next time :(
0 (0%)

Total Members Voted: 7

Author Topic: Player Chat Tags  (Read 60578 times)

0 Members and 1 Guest are viewing this topic.

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #15 on: February 12, 2013, 04:36:41 PM »
I knew how to do everything except the extra brackets, thank you for all your concern and i hope to get addons from you again!  :) :) :) :)

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #16 on: February 12, 2013, 05:34:01 PM »
I know i might sound annoying but its just cause i suck at lua (LAWL) can you make something that changes name and text color, sort of like this
[Owner] Greg: Hello.  So if you could make me a lua like this that would be great, i could also pay you if you want ( that's how much i respect you) Thank You.
« Last Edit: February 12, 2013, 05:36:15 PM by datgregofag »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags
« Reply #17 on: February 13, 2013, 08:54:09 PM »
I know i might sound annoying but its just cause i suck at lua (LAWL) can you make something that changes name and text color, sort of like this
[Owner] Greg: Hello.  So if you could make me a lua like this that would be great, i could also pay you if you want ( that's how much i respect you) Thank You.

okay it will be 20 dollars for my next work, Nah JK man. I do all of my things for free, except for any MySQL scripts. Anyways, I do this because of my love for lua, and I used to be like you at one time, and I feel it would be very unfair for my to charge for something like this.

Also so how do you want it...
You want people to change it in the middle of the game(i hope you don't want it like that :( ), or do you want it to be one set color that can't be changed unless you open up the script.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #18 on: February 14, 2013, 04:32:27 AM »
I want it so you change color when you open the script, and will this script that you will right change the name color AND text to two different colors.or just one color for both name and text. Like my name will be red and what I write will be green, something like that. Thanks for being so kind and helping me out. Bye.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags
« Reply #19 on: February 14, 2013, 07:55:15 PM »
In the script itself, it will tell you wish color you can change.

https://mega.co.nz/#!XA00lZLa!EgHfYjwFXUumS4Mli6abQU9jVzx90D4ZleuiX-F8uUo
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #20 on: February 15, 2013, 12:11:53 PM »
can you make it so that each group has their own name and text color. Hehe

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags
« Reply #21 on: February 15, 2013, 03:47:33 PM »
can you make it so that each group has their own name and text color. Hehe

they do have their own name and colour :/

Code: [Select]
{
--Group    --Tag     --Color
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) }
}

just change the Tag and the Colour to what you want it to be.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #22 on: February 15, 2013, 08:21:51 PM »
Well when i play they have their own rank color but text and name is all the same throughout all ranks.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags
« Reply #23 on: February 16, 2013, 01:47:54 AM »
Well when i play they have their own rank color but text and name is all the same throughout all ranks.

Remember to delete the old addon's, and use the new one I gave you

https://mega.co.nz/#!XA00lZLa!EgHfYjwFXUumS4Mli6abQU9jVzx90D4ZleuiX-F8uUo

You also may want to rename the folder to chat_tags or something like that.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #24 on: February 16, 2013, 05:51:31 AM »
Here ill show you the problem. Its like this
[Owner] Greg: Hello
then i want it to change text and name color for admin but its still the same except the rank changes color
[Admin] Greg: Hello
See how the RANK only changes color but the text and name stays the same.
i will put my script below and if you can change it so that there is a different name and text color for each group ( except guest). TY Just make it any colors and then ill adjust it.

This is CL TAG lua file.
Code: [Select]
// Cleint Side apple :p

local Tags =
{
--Group    --Tag     --Color
{"admin", "Admin ", Color(220, 180, 0, 255) },
{"superadmin", "Owner ", Color(0, 0, 255, 255) },
{"operator", "Operator ", Color(173, 255, 47, 255) },
{"vip", "VIP ", Color(255, 255, 0, 255) },
{"respected", "Respected ", Color(221, 160, 221, 255) },
{"user", "Guest ", Color(255, 255, 255, 255) }
}

hook.Add("OnPlayerChat", "Tags", function(ply, strText)
for k,v in pairs(Tags) do
if ply:IsPlayer() then
if ply:IsUserGroup(v[1]) then
local nickteam = team.GetColor(ply:Team())
// ----------------------Leave This Alone----------------------------Leave this alone-----------------This will be be Name Colour-------Leave this alone-----------------This is the text colour---------
chat.AddText(Color(255, 255, 255, 255), "[", v[3], v[2], Color(255, 255, 255, 255), "] ", Color(255, 0, 0, 255), ply:Nick(), Color(255, 255, 255, 255), ": ", Color(255, 255, 0, 255), strText)
return true
end
end
end
end )

The ranks are only for the ranks but how do i add more text and name colors to each group (except guest).

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags
« Reply #25 on: February 16, 2013, 02:14:25 PM »
Here ill show you the problem. Its like this
[Owner] Greg: Hello
then i want it to change text and name color for admin but its still the same except the rank changes color
[Admin] Greg: Hello
See how the RANK only changes color but the text and name stays the same.
i will put my script below and if you can change it so that there is a different name and text color for each group ( except guest). TY Just make it any colors and then ill adjust it.

This is CL TAG lua file.
Code: [Select]
// Cleint Side apple :p

local Tags =
{
--Group    --Tag     --Color
{"admin", "Admin ", Color(220, 180, 0, 255) },
{"superadmin", "Owner ", Color(0, 0, 255, 255) },
{"operator", "Operator ", Color(173, 255, 47, 255) },
{"vip", "VIP ", Color(255, 255, 0, 255) },
{"respected", "Respected ", Color(221, 160, 221, 255) },
{"user", "Guest ", Color(255, 255, 255, 255) }
}

hook.Add("OnPlayerChat", "Tags", function(ply, strText)
for k,v in pairs(Tags) do
if ply:IsPlayer() then
if ply:IsUserGroup(v[1]) then
local nickteam = team.GetColor(ply:Team())
// ----------------------Leave This Alone----------------------------Leave this alone-----------------This will be be Name Colour-------Leave this alone-----------------This is the text colour---------
chat.AddText(Color(255, 255, 255, 255), "[", v[3], v[2], Color(255, 255, 255, 255), "] ", Color(255, 0, 0, 255), ply:Nick(), Color(255, 255, 255, 255), ": ", Color(255, 255, 0, 255), strText)
return true
end
end
end
end )

The ranks are only for the ranks but how do i add more text and name colors to each group (except guest).

I'm really not understanding what is the problem here. You can already do that, look

// ----------------------Leave This Alone----------------------------Leave this alone-----------------This will be be Name Colour-------Leave this alone-----------------This is the text colour---------
         chat.AddText(Color(255, 255, 255, 255), "[", v[3], v[2], Color(255, 255, 255, 255), "] ", Color(255, 0, 0, 255), ply:Nick(), Color(255, 255, 255, 255), ": ", Color(255, 255, 0, 255), strText)


What I just colour'd red, is the place you change the text color, and what I colour'd blue is where you can change the name colour.
« Last Edit: February 16, 2013, 02:18:12 PM by chaos13125 »
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #26 on: February 16, 2013, 03:58:42 PM »
Yeah but how do i make each individual rank have their own name and text color.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags
« Reply #27 on: February 16, 2013, 11:10:51 PM »
Yeah but how do i make each individual rank have their own name and text color.

yeah... i have no clue what you mean now... I've helped you on everything...
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline datgregofag

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Player Chat Tags
« Reply #28 on: February 17, 2013, 04:18:55 PM »
Like admins has a rank color of purple a name color red and text color blue
owner has a rank color of red and name color of yellow and text color green
sort of like that except for all my ranks
i have ranks
owner
admin
operator
VIP
respected
user(i dont want any colors for user)

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player Chat Tags
« Reply #29 on: February 17, 2013, 07:40:50 PM »
Like admins has a rank color of purple a name color red and text color blue
owner has a rank color of red and name color of yellow and text color green
sort of like that except for all my ranks
i have ranks
owner
admin
operator
VIP
respected
user(i dont want any colors for user)


Like I said, you can. You just need to learn the very basic of lua. It's all right there. Everything is setup for you, you just need to change the color yourself.


// Cleint Side apple :p

local Tags =
{
--Group    --Tag     --Color
{"admin", "Admin ", Color(220, 180, 0, 255), Color(255, 0, 0, 0)  },
{"superadmin", "Owner ", Color(0, 0, 255, 255) , Color(255, 0, 0, 0)  },
{"operator", "Operator ", Color(173, 255, 47, 255), Color(255, 0, 0, 0)  },
{"vip", "VIP ", Color(255, 255, 0, 255), Color(255, 0, 0, 0)  },
{"respected", "Respected ", Color(221, 160, 221, 255), Color(255, 0, 0, 0)  },
{"user", "Guest ", Color(255, 255, 255, 255), Color(255, 0, 0, 0) }
}

hook.Add("OnPlayerChat", "Tags", function(ply, strText)
   for k,v in pairs(Tags) do
      if ply:IsPlayer() then
      if ply:IsUserGroup(v[1]) then
         local nickteam = team.GetColor(ply:Team())
// ----------------------Leave This Alone----------------------------Leave this alone-----------------This will be be Name Colour-------Leave this alone-----------------This is the text colour---------
         chat.AddText(Color(255, 255, 255, 255), "[", v[3], v[2], Color(255, 255, 255, 255), "] ", Color(255, 0, 0, 255), ply:Nick(), Color(255, 255, 255, 255), ": ", v[4], strText)
         return true
      end
      end
   end
end )


Red = Change group color
Green = Change player color
Blue = Change text color




ALSO
I'm sorry, but I can't put it in [ code ] tag. If I do the color disappears.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.