Is that correct? Where to download class_name of a model?
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#define PLUGIN "test"
#define VERSION "1.0"
#define AUTHOR "xxx"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /create","CreateEnt")
}
public plugin_precache() {
precache_model("models/chick.mdl")
return PLUGIN_CONTINUE
}
public CreateEnt(id) {
static ent
ent = create_entity("info_target")
entity_set_string(ent,EV_SZ_classname,"chick") // put your entity classname here...
entity_set_model(ent,"models/chick.mdl") // put your entity model path here (you should precache it first)
entity_set_int(ent,EV_INT_solid,SOLID_NOT) // don't make it solid
entity_set_int(ent,EV_INT_movetype,MOVETYPE_NONE) // don't move
static Float:origin[3]
entity_get_vector(id,EV_VEC_origin,origin) // get origin of the player
entity_set_vector(ent,EV_VEC_origin,origin) // set player origin to entity
}