Why do not I see the MODEL that I also set up on CT?
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "Player Models"
#define VERSION "1.0b"
#define AUTHOR "CheezPuff"
new const g_szModelsCT[ ] = "models/player/CTSkin/CTSkin.mdl"; // Counte-Terrorists Model
new const g_szModelsT[ ] = "models/player/TSkin/TSkin.mdl"; // Terrorists Model
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "fw_spawn", 1);
}
public plugin_precache()
{
precache_model( g_szModelsCT );
precache_model( g_szModelsT );
}
public fw_spawn( Index )
{
if( !is_user_alive( Index ) || is_user_bot( Index ) )
return;
if( cs_get_user_team( Index ) == CS_TEAM_CT )
{
cs_set_user_model( Index, "g_szModelsCT" );
}
if( cs_get_user_team( Index ) == CS_TEAM_T )
{
cs_set_user_model( Index, "g_szModelsT" );
}
else cs_reset_user_model( Index );
}