Register for your free account! | Forgot your password?

Go Back   elitepvpers > World of Warcraft > WoW Addons
You last visited: Today at 05:27

  • Please register to post and access all features, it's quick, easy and FREE!


Need help with lua script

Old   #1
elite*gold: 0
Join Date: Feb 2018
Posts: 1
Received Thanks: 0
Exclamation Need help with lua script

Hello there,

I need help with a lua script, I would like to add color into PlayerFrame aswell same as TargetFrame and FocusFrame.

In the code below it already have class color in health bar and color behind name of target and focus, not player frame.
(red marked text is the code I tried to implement without any success)

local frame = CreateFrame("FRAME")
frame:RegisterEvent("PLAYER_FRAME_CHANGED")<- Not sure about this one, tried many different texts.

local function eventHandler(self, event, ...)
if UnitIsPlayer("target") then
c = RAID_CLASS_COLORS[select(2, UnitClass("target"))]
TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
if UnitIsPlayer("focus") then
c = RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
if UnitIsPlayer("player") then
c = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
PlayerFrameNameBackground:SetVertexColor(c.r, c.g, c.b)


frame:SetScript("OnEvent", eventHandler)

for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground, PlayerFrameNameBackground}) do
BarTextures:SetTexture("Interface\\TargetingFrame\ \UI-StatusBar")

rbkz is offline  

classcolor in playerframe

« Previous Thread | Next Thread »

Similar Threads
hilfe bei lua script/ need help with lua script
Hi leute ich versuche ein script in für mein Iphone zu schreiben und könnte ein bisschen hilfe von einem Experten gebrauchen können also wenn jemand...
2 Replies - General Coding
[LUA] need help in decrypting / encrypting lua
The title pretty much says it all but ill explain a bit more as to what Im in need, basically I have decompiled a script using this website, i've got...
7 Replies - General Coding
[Realase]Décripteur de fichier lua ressource 7.3 /Décripteur resource file lua 7.3
5 Replies - Rappelz Private Server
Sehr weit geführte locale_.lua (locale_big5.lua)
Abend^^ Habe hier mal selber eine locale_.lua übersetzt! Ich habe mich von anderen localen inspirieren lassen habe sie aber bis auf 6 Zeilen selber...
50 Replies - Metin2 PServer Guides & Strategies

All times are GMT +1. The time now is 05:27.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.