How to add game modes?

How do I add such as “deatmatch” and “team detmatch” on the same map? User can choose the mode.

Thanks for replying

If (gamemode = dm)
execute
dm();

(Not a real script)

We’d need more information to help you.

How do I create a team vs. team mode?. For example: red team vs. team blue in the game ( first person shoter).

That’s simple game logic man.

if(gameMode == team)
AssignPlayers();
Start_Game();
return;

if (gameMode == dm)
//do stuff

if(gameMode == ctf)
//do stuff

in the different game modes you define the various AI behaviours and rules, but thats what Amaz1ng and 2dfxman1 said

and the variable gameMode is set by the GUI elements

Sark, in some way, you will need to think about “modes” as different levels.
Not only the GUI may change but the goals to achieve too… and for that, as alonzo says, the rules and behaviours must change.

Before starting a game, you will need to make a game flow to see more clear the horizon to go.

We could make a few for you although you would have to pay us.

Cheers
The Non-Super Hero
Khelton