that sounds pretty interesting.
How do I set the rules for the players?
You will have to tell the players what to do. I don´t know whether there are still InGame text messages (i.e. Crysis has g_gameRules.game:SendTextMessage(TextMessageCenter, "Text in here", TextMessageToClient, player.id);. Otherwise you could send messages to the players, telling them what to do.
How do I make the ones who are infected want to attack those who are not?
Tell them what their objective is. Thats all.
How do I make the infection spread?
When a Human gets killed, he is switched to the Zombies.
if(player.team == "Zombie")then
--Nothing(ignore that case)
elseif(player.team == "Human")then
--the player needs to be switched to the Zombie team
player.team = "Zombie";
--player maybe spectator,etc.
This isnt actual code that could be used, it´s only so u get a rough idea.
I guess I have to change the victory rules of the Deathmatch or something.
Yea, but I think u´d have to change TDM, because otherwise zombies could kill each other(unless thats intended, which would be pretty funny).
Theres only one problem with all this: U´ve got 2 teams(Humans and Zombies), but if a player is in the Zombie team, then every Human player knows who he has to look out for.
You could always make it a Deathmatch mode, with 1 zombie spawning with infinite lives and all Humans with 1 life. If u die, then u have to spectate.
Hope this helped a little.