--------------------------------------------------------------------------------------------------------------- Spawning Favorites with Prefs Tutorial Made from code by BadShot --------------------------------------------------------------------------------------------------------------- This tutorial will spawn a player with thier last selected Favorite armor and weapons. It has a check to make sure the chosen armor exists on the server (incase thier saved favorites are from another server), otherwise spawns in the defaults. Step #1 Make a file called Modprefs and add this code to the new file. $Host::SpawnFavorites = 0; // enable spawn favorites ? // 0 = false or first option, 1 = true or second option. Step #2 Place this file in the mod folder next to the scripts. add the exec("Modprefs.cs"); to the top of the server.cs Step #3 // ------------------------------------------ // DefaultGame.cs // ------------------------------------------ In function DefaultGame::playerSpawned, Replace this line: %game.equip(%player); with this: %client = %player.client; %size = $NameToInv[%client.favorites[0]]; if (%client.race $= "Bioderm") %armor = %size @ "Male" @ %client.race @ Armor; else %armor = %size @ %client.sex @ %client.race @ Armor; if ((!(isObject(%armor))) || (!($Host::SpawnFavorites))) %game.equip(%player); else { for(%i =0; %i<$InventoryHudCount; %i++) %client.setInventoryHudItem($InventoryHudData[%i, itemDataName], 0, 1); buyFavorites(%client); if (%client.player.weaponCount > 0) %player.selectWeaponSlot( 0 ); } If you want to force people to spawn in a default armor, but base thier spawn weapons on thier favorites, replace buyFavorites(%client) with buyDeployableFavorites(%client). To change the default armor to something other then light, in player.cs find the line $defaultPlayerArmor = "Light"; and change it to what you want. To modify the default weapons loaded, edit DefaultGame::equip in defaultGame.cs.