Good evening (in germany),
so I'm back in lua since I was about 3 months complete away from "coding" and I want to work on my addon but there is a problem I can't solve...
There is a Thread that helped me out but somehow not. What I am trying to do is:
I have config:
local aadmins = {"superadmin",
"admin"}
local ausers = {
"operator"}
local testv = true
local testvg = true
local clri = Color(255,0,0)
local clri2 = Color(0,236,227)
and my script:
if testv == true and table.HasValue(aadmins,LocalPlayer():GetUserGroup()) then
chat.AddText(clri, "english")
elseif testv == true and table.HasValue(ausers,LocalPlayer():GetUserGroup()) then
chat.AddText(clri2, "english 999")
end
if testvg == true and table.HasValue(aadmins, LocalPlayer():GetUserGroup()) then
chat.AddText(clri, "german")
elseif testvg == true and table.HasValue(ausers,LocalPlayer():GetUserGroup()) then
chat.AddText(clri2, "german 999")
end
btw. in the config testv is for the english text and testvg is for the german text. I do that because I didn't know another solution to choose in the config between german and english. That's why I wrote in the script testv == true.
The text should be english and german because I set both vars in the config true but somehow it's not working... I hope you understand what I'm trying to do if not please let me know.
Thanks in advance!
Kind regards,
lvxye
Please don't use so much HasValue's
I forgot to say that my script is running in a button.DoClick function
Sorry, you need to Log In to post a reply to this thread.