#include <sourcemod> #include <sdktools> #include <sdkhooks> //attention: not On Plugin Start! public OnMapStart() { //first: If it is not a Official model, make sure your clients have this model. Or Add this model to download table. AddFileToDownloadsTable("models/npc/combine_soldier.mdl"); //not only .mdl files. your clients should have all the .vtf .vmt .vvd ...... files. //second: Precache this model. PrecacheModel("models/npc/combine_soldier.mdl"); } //third: set entity model when this entity spawn! public void OnEntityCreated(entity, const String:classname[]) { //Judge which entity is you need. Choose one of the following two. //1.if(entity == index) //index is the entity's index you want to change model //2.if ( StrEqual(classname, "classname")) //change "classname" to the entity's classname which you want to change model { SDKHook(entity, SDKHook_SpawnPost, Hook_EntitySpawned); } } public void Hook_EntitySpawned(entity) { if(IsValidEntity(entity)) { SetEntityModel(entity, "models/npc/combine_soldier.mdl"); } }