GSC View Models Cycler

BullyWiiPlaza

Modder
Messages
214
Reaction score
174
Points
818
This script cycles through different view models. As you might know, every weapon class has a different view model in first person perspective. Other players cannot see the change but if you get a killcam in first person they will. Basically, this is a first person only thing.
Code:
toggleViewModelCycler()
{
    self.viewModelCycler = self invertAndPrint("View Model Cycler", self.viewModelCycler);
  
    if(self.viewModelCycler)
    {
        self thread viewModelCycler();
    }
    else
    {
        self notify("stopViewModelCycler");
    }
}

viewModelCycler()
{
    level endon("game_ended");
    self endon("stopViewModelCycler");
    self endon("disconnect");
  
    viewModels = strTok("c_mul_mp_cordis_assault_viewhands|c_chn_mp_pla_longsleeve_viewhands|c_usa_mp_isa_assault_viewhands|c_mul_mp_pmc_longsleeve_viewhands|c_usa_mp_fbi_longsleeve_viewhands|c_usa_mp_seal6_longsleeve_viewhands|iw5_viewmodel_usa_sog_standard_arms|iw5_viewmodel_vtn_nva_standard_arms|c_mul_mp_cordis_lmg_viewhands|c_chn_mp_pla_armorsleeve_viewhands|c_usa_mp_isa_lmg_viewhands|c_mul_mp_cordis_shotgun_viewhands|c_usa_mp_isa_shotgun_viewhands|c_mul_mp_pmc_shortsleeve_viewhands|c_usa_mp_seal6_shortsleeve_viewhands|c_mul_mp_cordis_smg_viewhands|c_usa_mp_isa_smg_viewhands|c_usa_mp_fbi_shortsleeve_viewhands|c_mul_mp_cordis_sniper_viewhands|c_usa_mp_isa_sniper_viewhands", "|");

    while(true)
    {
        randomViewModelIndex = randomInt(viewModels.size);
        randomViewModel = viewModels[randomViewModelIndex];
        self setViewModel(randomViewModel);
      
        wait 0.2;
    }
}
Note:
You need the invertAndPrint function.
Video:

Credits:
Liam (I believe he "discovered" the setViewModel() function)
BullyWiiPlaza (For player view models and the script itself)

Enjoy :grinning:
 
Last edited:
Top