I’m trying to make a script where after one person says “hello newman” and the rest of the people say “hello jerry” after a second.
It works fine but I’m trying to exclude the person who said “hello newman” to begin with.
What I want to happen:
function OpenChatCommand( ply, text, Team, death)
if text == “hello newman” then
for k, v in pairs(player.GetAll()) do
v:ConCommand( “play motd/hellonm.wav”)
timer.Simple(1, HelloBack, v )
hook.Add( “PlayerSay”, “Start”, OpenChatCommand)
v:ConCommand(“say hello jerry”)
v:ConCommand( “play motd/hellojr.wav”)
I tried replacing players.GetAll() (and of course separating the sound commands from it) with string.ToTable(string.replace(table.toString(player.GetAll(),"", false),ply,""))) but according to the wiki mirror it would mess up the player names by separating every letter from eachother.
I can’t use table.remove because according to the wiki It only takes numerical values for removal.
Is there an easier/more effective way to do this?