Raised This Month: $ Target: $400
 0% 

Using model skins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
YankoNL
Junior Member
Join Date: Dec 2018
Old 06-04-2021 , 06:37   Re: Using model skins
Reply With Quote #8

I don't know how you can do it in clasic mode, but in zp50 works with those lines added in the weapon plugin.
Code:
Weapon_OnDeploy(const iItem, const iPlayer, const iClip, const iAmmoPrimary, const iMode)
{
	#pragma unused iClip, iAmmoPrimary, iMode
	
	static iszViewModel;
	if (iszViewModel || (iszViewModel = engfunc(EngFunc_AllocString, MODEL_VIEW)))
	{
		set_pev_string(iPlayer, pev_viewmodel2, iszViewModel);
	}
	
	static iszPlayerModel;
	if (iszPlayerModel || (iszPlayerModel = engfunc(EngFunc_AllocString, MODEL_PLAYER)))
	{
		set_pev_string(iPlayer, pev_weaponmodel2, iszPlayerModel);
	}
	
	// Cancel any reload in progress.
	set_pdata_int(iItem, m_fInReload, 0, extra_offset_weapon);
	set_pdata_int(iItem, m_iModeChange, 0, extra_offset_weapon);

	new hclass = zpnm_get_user_human_class(iPlayer);
	
	// Apply woman and man hands submodel
	// Man
	if(hclass == 0)
	{
		set_pev(iItem, pev_body, 0)
	}
	if(hclass == 1)
	{
		set_pev(iItem, pev_body, 0)
	}
	if(hclass == 2)
	{
		set_pev(iItem, pev_body, 0)
	}

	// Woman
	if(hclass == 3)
	{
		set_pev(iItem, pev_body, 1)
	}
	if(hclass == 4)
	{
		set_pev(iItem, pev_body, 1)
	}
	if(hclass == 5)
	{
		set_pev(iItem, pev_body, 1)
	}

	set_pdata_string(iPlayer, m_szAnimExtention * 4, ANIM_EXTENSION, -1, extra_offset_player * 4);
	
	set_pdata_float(iItem, m_flTimeWeaponIdle, WEAPON_TIME_DELAY_DEPLOY, extra_offset_weapon);
	set_pdata_float(iPlayer, m_flNextAttack, WEAPON_TIME_DELAY_DEPLOY, extra_offset_player);
	
	// Deploy with default weapon settings
	Weapon_DefaultDeploy(iItem, iPlayer, MODEL_VIEW, MODEL_PLAYER, ANIM_DUMMY, ANIM_EXTENSION);
}
YankoNL is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode