1. Post #1

    January 2012
    154 Posts
    Code:
    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

  2. Post #2
    Ruzza's Avatar
    December 2011
    1,137 Posts
    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

    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.

  3. Post #3

    January 2012
    154 Posts
    Thank you! Seems to work right now