if string.find bug?


function CallForGood(ply, say, teamsay)
         if string.find(say, "*simulation") == 1 and ply:Team() == 3 or (ply:Team() == 4) or (ply:Team() == 5) or (ply:Team() == 6) then
            ply:EmitSound(Sound("/scientist/simulation.wav"),500)
         end
end

That’s the code I’m using. After a few commands it will start to play the sound no matter what you put in the chat

[LUA]function CallForGood(ply, say, teamsay)
if string.find(say, “*simulation”) == 1 and ( ply:Team() == 3 or ply:Team() == 4 or ply:Team() == 5 or ply:Team() == 6 ) then
ply:EmitSound(Sound("/scientist/simulation.wav"),500)
end
end[/LUA]

You need to keep the teams in the one bracket, or else if someone is in team 4, 5 or 6 it’ll play it.

Thank you! Seems to work right now