Change how the default weapon is picked:
Main function:
Code:
level.scr_inf_sur_force_weapon = toLower( getdvarx( "scr_inf_sur_force_weapon", "string", "winchester1200_mp;winchester1200_reflex_mp;winchester1200_grip_mp" ) );
level.scr_inf_sur_force_weapon = strtok( level.scr_inf_sur_force_weapon, ";" );
if ( level.scr_inf_sur_force_weapon != "" )
level.survivorWeapon = level.scr_inf_sur_force_weapon[ randomInt( level.scr_inf_sur_force_weapon.size ) ];
getSurvivorLoadout function:
Code:
survivorWeapon = level.survivorWeapon
// Give start ammo for Survivor weapon and switch to it
self giveWeapon( survivorWeapon );
if( self.getsSurvivorAmmo == true ) {
self giveStartAmmo( survivorWeapon );
} else {
self setWeaponAmmoClip( survivorWeapon, 0 );
self setWeaponAmmoStock( survivorWeapon, 0 );
}
self setSpawnWeapon( survivorWeapon );
self switchToWeapon( survivorWeapon );
That will randomly pick a weapon from the force weapon list, and give it to all players. It will be different each round, or each new map, but the same for each and every player.
All I did was move the method to pick the random weapon from the getSurvivorLoadout() function to the main() function. And create a level scruct for the force weapon, and make that the weapon each player gets.