Welcome.
Such a pleasant thing, not wants to change skin player on the opposite team on subject Chameleon ( Warcraft )
First there was terrible lag in the capture of the Subject player ( Ping jumps) added
PHP Code:
if ( is_user_alive( id ) )
If suddenly that, then the Usual start of the game-changes the skin
On Server Start-up-no.
Also tried to leave only
PHP Code:
if ( g_MOD == GAME_CSTRIKE )
still doesn't change
All Function
PHP Code:
// Function changes your skin for ITEM_MOLE and Chameleon
public SHARED_ChangeSkin( id, iFlag )
{
// Don't change a bots model - it just confuses the bots!
if ( is_user_alive( id ) )
{
return;
}
new szSkin[32];
// Reset the user's model
if ( iFlag == SKIN_RESET && p_data_b[id][PB_SKINSWITCHED] )
{
if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
{
cs_reset_user_model( id );
}
else if ( g_MOD == GAME_DOD )
{
dod_clear_model( id );
}
p_data_b[id][PB_SKINSWITCHED] = false;
}
// Switch the user's skin to the opposing team
else if ( iFlag == SKIN_SWITCH )
{
new iTeam = get_user_team( id );
// For Counter-Strike or Condition Zero
if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
{
new iModelNum = random_num( 0, 3 );
// Condition Zero has one more model!
if ( g_MOD == GAME_CZERO )
{
iModelNum = random_num( 0, 4 );
}
// Save which skin we're going to use
if ( iTeam == TEAM_CT )
{
add( szSkin, 31, SKIN_T[iModelNum] );
}
else
{
add( szSkin, 31, SKIN_CT[iModelNum] );
}
cs_set_user_model( id, szSkin );
}
// For Day of Defeat
else if ( g_MOD == GAME_DOD )
{
new iModelNum = random_num( 0, 1 );
if ( iTeam == ALLIES )
{
add( szSkin, 31, SKIN_AXIS[iModelNum] );
}
else
{
// Then we should use a British model
if ( dod_get_map_info( MI_ALLIES_TEAM ) == 1 )
{
add( szSkin, 31, SKIN_BRIT[0] );
}
// Otherwise use American model
else
{
add( szSkin, 31, SKIN_ALLIES[iModelNum] );
}
}
dod_set_model( id, szSkin );
}
p_data_b[id][PB_SKINSWITCHED] = true;
}
return;
}