|
Senior Member
|
01-06-2021
, 01:10
Re: Set lefthand and righthand weapon skins
|
#11
|
Quote:
Originally Posted by CrazY.
If the *_r models are the right hand ones, something like this
Code:
public event_Curwp( id )
{
new szHaveFlag[15];
get_pcvar_string( g_HaveFlags, szHaveFlag, charsmax( szHaveFlag ) )
new WeaponIdUserHandle = get_user_weapon( id );
if( has_all_flags( id, szHaveFlag ) )
{
new szLeftHand[15]
get_user_info(id, "lefthand", szLeftHand, charsmax(szLeftHand))
if (str_to_num(szLeftHand) == 1)
{
// left hand models here
switch ( WeaponIdUserHandle )
{
case CSW_M4A1: set_pev( id, pev_viewmodel2, v_m4a1 );
}
}
else
{
// right hand models here
switch ( WeaponIdUserHandle )
{
case CSW_M4A1: set_pev( id, pev_viewmodel2, v_m4a1_r );
}
}
}
return PLUGIN_CONTINUE;
}
|
It's a brand new year 2021! Applied it to server. It worked! Thank you for sparing your time to me, you are the only one who was able to really make it happen. Appreciate your life man! <3
|
|
|
|