As a GM you will inevitably run into players that want to do things that are not at all what you have planned for the session/story/world. This can be a big problem, but you can choose to look at it as a big opportunity instead. Some of the best story ideas will come from your players, so it is important to be receptive to them. Remember, this is cooperative storytelling. If the idea is way off the mark for the setting, or breaks the game it is ok to say “no.” If you have to say “no,” guide and encourage the player to come up with a more viable option for the setting. If the player’s idea would be too advantageous to the character, then make your player and the character work for it.
For example, in a game set in space, a player wants to have her character modify her ship so that it has an entirely different weapons array than the standard model of that ship. Once complete, this would give the ship a huge advantage in combat versus ships of a similar type. So, instead of saying “no,” you decide to say “Yes, and you need to complete x, y, and z to get the upgrades completed.” There are a number of things that you can require of her in order to complete the upgrade, both in character and as a player. As a player, you might require her to draw you the schematics of the new layout, and power requirements. Maybe the power requirements for the new weapons are beyond what her ship’s reactor can handle, so she will have to upgrade her reactor first, or do without engines, or shields while powering the weapons. Upgrading the reactor might require a special part that only a specific trader on a distant black market trading post has. There are obviously myriad places that this could go, but the point is that by saying, “Yes, and...” you now have fuel for character-driven story that can involve the whole group.
Another way to handle the “Yes, and...” option is to give the character the benefit, but add a penalty commensurate with the bonus. The disadvantage to this is that balance is tricky with this one, and involves fewer opportunities for good roleplaying. The advantage of this tack is that it takes a lot less time on your part, and the part of the player. It also has the advantage of adding minor story arcs that can be resolved later. Say a player has heard rumors that a house in town has an unguarded magic item inside, and wants to break in. You talk with the player outside of the normal session and decide to say, “Yes, and you will have to contend with the items powerful owner tracking you down to get it back.” The long and short of it is that the character can get the item while the other characters sharpen weapons, or get drunk at the tavern, by making a successful burglary. You might have her make a few skill checks during the burglary to see if she gets caught. The penalty, since the item was unguarded, is that it belongs to a powerful being (Lich, Vampire, Dragon) who will show up later to collect it. This will probably end in violence, but there are other ways, such as bribery, to resolve the conflict. As you can see, this has the advantage of being a quick way of addressing the player’s desire for her character without taking too much time away from the scenes that you have prepared Another advantage is that the character can do what she wants without hogging the spotlight during the actual game. The disadvantage is that there are fewer opportunities for good roleplaying, and character-driven story takes a backseat to predefined scenes.
There are, of course, other ways to go about the “Yes, and...” option: hybrids, less roleplaying, more roleplaying. The point is, stop saying, “no,” to your players ideas for their characters and start saying, “Yes, and....” You and your players will get more out of it, and your players will thank you.