• Print

Author Topic: Prefixes?  (Read 4109 times)

0 Members and 1 Guest are viewing this topic.

Offline mazur258

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Prefixes?
« on: October 29, 2014, 08:24:32 pm »
I have tried so many tag addons, but usually I'm just getting [Guard] or [Prisoner] in jailbreak, when I want them to be admin/mod. My config:
Code: Lua
  1. // Client Side
  2. // Originally Made By: TyGuy
  3. // Edited By: Mr. Apple
  4.  
  5. local Tags =
  6. {
  7. --Group    --Tag     --Color
  8. {"admin", "Admin", Color(0, 0, 255, 255) },
  9. {"mod", "Mod", Color(255, 0, 0, 255) },
  10. {"owner", "OWNER", Color(0, 255, 0, 255) },
  11. }
  12.  
  13. hook.Add("OnPlayerChat", "Tags", function(ply, Text, Team, PlayerIsDead)
  14.         if ply:IsValid() then
  15.                 for k,v in pairs(Tags) do
  16.                         if ply:IsUserGroup(v[1]) then
  17.                                 if Team then
  18.                                                 if ply:Alive() then
  19.                                                         chat.AddText(Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  20.                                                 else
  21.                                                         chat.AddText(Color(255, 0, 0, 255), "*DEAD*", Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  22.                                                 end
  23.                                                 return true
  24.                                 end
  25.                                 if ply:IsPlayer() then
  26.                                         if ply:Alive() then
  27.                                                 chat.AddText(Color(255, 0, 0, 255), "", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  28.                                                 return true
  29.                                         elseif !ply:Alive() then
  30.                                                 chat.AddText(Color(255, 0, 0, 255), "*DEAD* ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  31.                                                 return true
  32.                                         end
  33.                                 end
  34.                         end
  35.                 end
  36.         end
  37. end)

Edit by Megiddo: Added code tags
« Last Edit: October 30, 2014, 05:38:11 am by Megiddo »

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Re: Prefixes?
« Reply #1 on: October 30, 2014, 04:24:47 am »
That means the gamemode is setting a prefix as well
Try going through the code for that gamemode and removing the code that adds [Guard] and [Prisoner]

  • Print