hello im new to lua, in fact this is the first lua code I have modded more than just adding a bunch of zeros on a rocket launcher’s damge…
So I’m editing DarkRP for a news job. I want the NEWS_TEAM to be the only one to use the “/advert” command. So i have tryed to edit the code but i got stuck in the cl_init.lua
if GetGlobalInt("alltalk") == 0 then
if string.sub(text, 1, 2) == "//" or string.sub(string.lower(text), 1, 4) == "/ooc" or string.sub(string.lower(text), 1, 4) == "/a" then
HearMode = "talk through OOC"
elseif string.sub(string.lower(text), 1, 7) == "/advert" and ply:Team() == TEAM_NEWS then
HearMode = "advert"
end
end
Thanks for anyone who helps.