I am making an announcement system and I need to get what an admin says in the message section for it to show up on other players screens. So far I have only figured out how to make arg[3] show up but I also all args after that to show up to. Anyway for this to be possible?
Code:
if string.find(text, “announce”) then
text = string.split(text, “announce”)
text = string.split(text[2], " ")
if text[2] == “1” then
mod.announce1()
elseif text[2] == “2” then
mod.announce2()
elseif text[2] == “3” then
mod.announce3()
elseif text[2] == “4” then
mod.announce4(text[3], name)
end
end
if string.find(text, “announce”) then
text = string.split(text, “announce”)
text = string.split(text[2], " ")
if text[2] == “1” then
mod.announce1()
elseif text[2] == “2” then
mod.announce2()
elseif text[2] == “3” then
mod.announce3()
elseif text[2] == “4” then
mod.announce4(text[3], name)
end
end
text = 'announce 1 amogus sus' -- only thing i can come up with
text = text:split(' ')
local second = text[2]
table.remove(text, 1)
table.remove(text, 2)
text = text:concat(' ')
print(text) -- amogus sus