mirror of
https://github.com/JezuzLizard/t6-fastfile-mods.git
synced 2025-06-10 11:17:59 -05:00
Add player model pack mod, add gitignore
This commit is contained in:
47
mp_player_model_pack/scripts/mp/_pmp_main.gsc
Normal file
47
mp_player_model_pack/scripts/mp/_pmp_main.gsc
Normal file
@ -0,0 +1,47 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
|
||||
main()
|
||||
{
|
||||
replaceFunc( maps\mp\teams\_teams::set_player_model, ::set_player_model_override );
|
||||
}
|
||||
|
||||
set_player_model_override( team, weapon )
|
||||
{
|
||||
weaponclass = getweaponclass( weapon );
|
||||
bodytype = "default";
|
||||
|
||||
switch ( weaponclass )
|
||||
{
|
||||
case "weapon_sniper":
|
||||
bodytype = "rifle";
|
||||
break;
|
||||
case "weapon_cqb":
|
||||
bodytype = "spread";
|
||||
break;
|
||||
case "weapon_lmg":
|
||||
bodytype = "mg";
|
||||
break;
|
||||
case "weapon_smg":
|
||||
bodytype = "smg";
|
||||
break;
|
||||
}
|
||||
|
||||
self detachall();
|
||||
self setmovespeedscale( 1 );
|
||||
self setsprintduration( 4 );
|
||||
self setsprintcooldown( 0 );
|
||||
|
||||
possible_models = game[ "characters" ][ team ];
|
||||
|
||||
if ( isDefined( possible_models ) && possible_models.size > 0 )
|
||||
{
|
||||
model = random( possible_models );
|
||||
self setModel( model[ "body_model" ] );
|
||||
self setViewModel( model[ "view_model" ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
self [[ game["set_player_model"][team][bodytype] ]]();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user