ULX

Author Topic: GMod/ULX Update broke groups for addons (CHAT TAGS)  (Read 3039 times)

0 Members and 1 Guest are viewing this topic.

Offline spikey_247

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
GMod/ULX Update broke groups for addons (CHAT TAGS)
« on: April 03, 2015, 05:17:36 AM »
Hello,

I hope this is in the right spot/thread.

Since the gmod update, and the ULX update to fix this, all my addons aren't working, and I have no idea why! Well, when I say my addons aren't working, let me be more specific. There is two addons that don't work, which use ULX groups.

The first is Pointshop. This uses ULX groups to allow donators (those in the donator groups) to see certain items that standard players cant see. This worked fine until the update, but now no one can see these items, even though nothing has changed in the way of groups or pointshop?

The second is chat tags. I used a basic chat tags addon before the update which again used the ULX groups to give players a chat tag depending on their group. This stopped working after the update, and yep - you guessed it - I changed nothing to do with ULX (except updating) or chat tags. So with this addon I tried to get a later version, which is when I found apple's chat tags (a better updated version of the chat tags I used before) and set this up as I should. However, this still does not work (and yes I have been restarting the server between changes and ensuring that no other addons are conflicting with them).

If anyone could help me, or let me know if there is anything that I need to change, that will be great!

I can post my whole groups file here if you need me to, but for now here is basically what my groups consist of (yes there is a user group and superadmin group etc. this is an example):

Code: [Select]
"silverdonator"
{
"allow"
{
"ulx asay"
"ulx donate"
"ulx help"
"ulx motd"
"ulx psay"
"ulx stopsounds"
"ulx thirdperson"
"ulx unvotegag"
"ulx unvotemute"
"ulx votegag"
"ulx votekick"
"ulx votemap"
"ulx votemap2"
"ulx votemute"
"xgui"
}
"can_target" "!%silverdonator"
"inherit_from" "bronzedonator"
}

I will then use silverdonator (and so on) as the group name in the addons (same as I did before the update when it worked) but it doesn't work anymore.


Thank You,

Spikey
« Last Edit: May 08, 2015, 03:27:31 PM by spikey_247 »

Offline spikey_247

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: GMod/ULX Update broke groups for addons
« Reply #1 on: April 23, 2015, 10:59:43 AM »
bump?

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: GMod/ULX Update broke groups for addons
« Reply #2 on: April 23, 2015, 12:13:02 PM »
The workaround I found was removing the category and modifying pointshop items to only be buy-able if you're in (x) group.
Once you get to know me, you'll find you'll have never met me at all.

Offline spikey_247

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: GMod/ULX Update broke groups for addons
« Reply #3 on: April 27, 2015, 08:18:24 AM »
That sounds good. I will give that a go.

What about the chat tags not working? Does anyone have a new mod to allow custom chat tags that works with this update? All I am getting now is the actual group name rather than the custom tags I supplied (such as "golddonator" rather than "GOLD". I cant change the actual group name as the tags for admin and superadmin need to show up different (STAFF and OWNER)?

Squirrel

Offline spikey_247

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: GMod/ULX Update broke groups for addons
« Reply #4 on: April 28, 2015, 07:17:09 AM »
If anyone needs it or would like to take a look at it, here is the chat tags addon (by apple) that I currently have, which is not working anymore:

SERVER SIDE:
Code: [Select]
// Server Side
// Originally Made By: TyGuy
// Edited By: Mr. Apple
AddCSLuaFile( "cl_tag.lua"  )


if SERVER then
local YOUR_VERSION = "2.57"
local PLY2 = "101"
local ADDON_NAME = "chat_prefixes"
local ADDON_ACTUAL_NAME = "apple_chat_tags"
local DOWNLOAD_LINK = "http://goo.gl/nmMI0S"
local MESSAGE_TO_SERVER = "APPLE'S CHAT TAGS"

hook.Add('PlayerInitialSpawn','PlayerInitialSpawn'..ADDON_NAME, function(ply)
if ply:IsSuperAdmin() == false then return end
http.Fetch( "https://raw.githubusercontent.com/chaos12135/gmod-development/master/branches/"..ADDON_NAME..".txt", function( body, len, headers, code )
if body == nil then return end
local body = string.Explode(" ",body)
if body[1] != "Version" then return end
if body[2] != YOUR_VERSION then
if ply:GetPData(ADDON_NAME..""..PLY2) != nil then
if ply:GetPData(ADDON_NAME..""..PLY2) != "1" then
umsg.Start(ADDON_NAME, ply)
umsg.String(YOUR_VERSION)
umsg.String(body[2])
umsg.String(ADDON_ACTUAL_NAME)
umsg.String(DOWNLOAD_LINK)
umsg.End()
end
MsgN("~"..MESSAGE_TO_SERVER.."~")
MsgC(Color(255,255,255,255),"Your Version: ",Color(255,0,0,255),YOUR_VERSION,"\n")
MsgC(Color(255,255,255,255),"Online Version: ",Color(255,0,0,255),body[2],"\n")
MsgC(Color(255,0,0,255),"OUT OF DATE","\n")
MsgN("We here at Apple Inc. strongly suggest that you keep this addon updated")
MsgN("Please go here and update: "..DOWNLOAD_LINK)
end
end
end,
function( error )
MsgN("DOESNOT WORK")
end)
end)
net.Receive( ADDON_NAME, function( length, client )
net.ReadEntity():SetPData(ADDON_NAME..""..PLY2,"1")
end )
util.AddNetworkString( ADDON_NAME )
end

CLIENT SIDE:
Code: [Select]
// Client Side
// Originally Made By: TyGuy
// Edited By: Mr. Apple

local Tags =
{
--Group    --Tag     --Color
{"superadmin", "OWNER", Color(255, 0, 0, 255) },
{"admin", "ADMIN", Color(255, 0, 50, 255) },
{"mod", "MOD", Color(255, 0, 100, 255) },
{"vipmod", "VIP MOD", Color(0, 255, 0, 255) },
{"vip", "VIP", Color(0, 255, 0, 255) },
{"platinummod", "PLATINUM MOD", Color(210, 210, 220, 255) },
{"platinumdonator", "PLATINUM", Color(210, 210, 220, 255) },
{"goldmod", "GOLD MOD", Color(255, 215, 0, 255) },
{"golddonator", "GOLD", Color(255, 215, 0, 255) },
{"silvermod", "SILVER MOD", Color(192, 192, 192, 255) },
{"silverdonator", "SILVER", Color(192, 192, 192, 255) },
{"bronzemod", "BRONZE MOD", Color(210, 105, 30, 255) },
{"bronzedonator", "BRONZE", Color(210, 105, 30, 255) }
}

hook.Add("OnPlayerChat", "Tags", function(ply, Text, Team, PlayerIsDead)
if ply:IsValid() then
for k,v in pairs(Tags) do
if ply:IsUserGroup(v[1]) then
if Team then
if ply:Alive() then
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)
else
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)
end
return true
end
if ply:IsPlayer() then
if ply:Alive() then
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)
return true
elseif !ply:Alive() then
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)
return true
end
end
end
end
end
end)




local ADDON_NAME = "chat_prefixes"
usermessage.Hook(ADDON_NAME, function(data)
local Version1 = data:ReadString()
local Version2 = data:ReadString()
local ADDON_ACTUAL_NAME = data:ReadString()
local DOWNLOAD_LINK = data:ReadString()
local Frame = vgui.Create( "DFrame" )
Frame:SetSize( 300, 150 )
Frame:Center()
Frame:SetTitle( "Addon: "..ADDON_ACTUAL_NAME.." needs updating" )
Frame:SetSizable(false)
Frame:SetDraggable(false)
Frame:ShowCloseButton( false )
Frame:MakePopup()

local FLabel = vgui.Create( "DLabel", Frame )
FLabel:Center()
FLabel:SetPos( 15, 27 )
--FLabel:SetColor(Color(255,255,255,255)) // Color
--FLabel:SetFont("default")
FLabel:SetText("The addon: "..ADDON_ACTUAL_NAME.." is outdated!")
FLabel:SizeToContents()

local FLabel2 = vgui.Create( "DLabel", Frame )
FLabel2:Center()
FLabel2:SetPos( 15, 40 )
--FLabel2:SetColor(Color(255,255,255,255)) // Color
--FLabel2:SetFont("default")
FLabel2:SetText("Please contact system administrator to update addon!")
FLabel2:SizeToContents()

local FLabel3 = vgui.Create( "DLabel", Frame )
FLabel3:Center()
FLabel3:SetPos( 15, 53 )
--FLabel3:SetColor(Color(255,255,255,255)) // Color
--FLabel3:SetFont("default")
FLabel3:SetText("Server's Version:")
FLabel3:SizeToContents()

local FLabel35 = vgui.Create( "DLabel", Frame )
FLabel35:Center()
FLabel35:SetPos( 100, 53 )
FLabel35:SetColor(Color(255,0,0,255)) // Color
--FLabel35:SetFont("default")
FLabel35:SetText(Version1)
FLabel35:SizeToContents()

local FLabel4 = vgui.Create( "DLabel", Frame )
FLabel4:Center()
FLabel4:SetPos( 15, 66 )
--FLabel4:SetColor(Color(255,255,255,255)) // Color
--FLabel4:SetFont("default")
FLabel4:SetText("Online Version:")
FLabel4:SizeToContents()

local FLabel45 = vgui.Create( "DLabel", Frame )
FLabel45:Center()
FLabel45:SetPos( 90, 66 )
FLabel45:SetColor(Color(255,0,0,255)) // Color
--FLabel45:SetFont("default")
FLabel45:SetText(Version2)
FLabel45:SizeToContents()

local FLabel5 = vgui.Create( "DLabel", Frame )
FLabel5:Center()
FLabel5:SetPos( 15, 81 )
--FLabel5:SetColor(Color(255,255,255,255)) // Color
--FLabel5:SetFont("default")
FLabel5:SetText("Addon:")
FLabel5:SizeToContents()

local FLabel55 = vgui.Create( "DButton", Frame )
FLabel55:SetSize(ScrW() * 0.025, ScrH() * 0.015)
FLabel55:Center()
FLabel55:SetPos( 52, 83 )
FLabel55:SetText("Link")
FLabel55.DoClick = function()
gui.OpenURL(DOWNLOAD_LINK)
end

local Close = vgui.Create("DButton", Frame)
Close:SetSize(ScrW() * 0.050, ScrH() * 0.025)
Close:Center()
Close:SetPos(105,120)
Close:SetText("Ok")
Close.DoClick = function()
if Checkbox:GetChecked() == true then
net.Start( ADDON_NAME )
net.WriteEntity(LocalPlayer())
net.SendToServer()
end
end

local Checkbox = vgui.Create( "DCheckBox", Frame )
Checkbox:Center()
Checkbox:SetPos( 65, 105 )
Checkbox:SetChecked( false )

local FLabel6 = vgui.Create( "DLabel", Frame )
FLabel6:Center()
FLabel6:SetPos( 85, 105 )
FLabel6:SetColor(Color(255,0,0,255)) // Color
FLabel6:SetFont("default")
FLabel6:SetText("Never show message again!")
FLabel6:SizeToContents()

local Close = vgui.Create("DButton", Frame)
Close:SetSize(ScrW() * 0.050, ScrH() * 0.025)
Close:Center()
Close:SetPos(105,120)
Close:SetText("Ok")
Close.DoClick = function()
if Checkbox:GetChecked() == true then
net.Start( ADDON_NAME )
net.WriteEntity(LocalPlayer())
net.SendToServer()
end
Frame:Close()
end
end)

For Gold donator, it should show as [GOLD] but it shows as [golddonator].

Thanks, Squirrel