I'm trying to make a plugin where only the CTs model gets changed to models/player/smith/smith.mdl
here is my code
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "MS CT Mdoels"
#define VERSION "1.0"
#define AUTHOR "owned"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD", "set_players_models", "a")
}
public plugin_precache(){
precache_model("models/player/smith/smith.mdl");
return PLUGIN_CONTINUE;
}
public set_players_models(){
new i;
new players[32], ingame;
get_players(players,ingame);
for(i=1;i<=ingame;i++){
if(cs_get_user_team(i) == CS_TEAM_CT){
cs_set_user_model(i,"smith");
}
}
return PLUGIN_CONTINUE;
}
it doesn't work for me, i've only tried it locally alone.
__________________