I looked at the example in the documentation, and tried this:
Code:
#include <amxmodx>
#include <engine>
// Addon to make some windows unbreakable in simi_valley and add banker models
public plugin_init()
{
register_plugin( "Model Test", "v1", "BALOPAIN" )
set_task(1.0,"setup")
}
public plugin_precache()
{
precache_model( "models/mecklenburg/banker.mdl" )
}
public setup()
{
//create a basic entity
new entid = create_entity("info_target")
//set its classname
entity_set_string(entid, EV_SZ_classname, "some_guy")
//set its model
entity_set_model(entid, "models/mecklenburg/banker.mdl")
new Float:Vec[3] = { 268.0, 2886.0, 196.0 }
//set its origin
entity_set_origin(entid, Vec)
//set some basic properties
entity_set_int(entid, EV_INT_solid, 1)
entity_set_int(entid, EV_INT_movetype, 6)
/*****************************************
//create the weapon - thanks to pimp_daddy!
new entWeapon = create_entity("info_target")
entity_set_string(entWeapon, EV_SZ_classname, weapString)
//set to follow
entity_set_int(entWeapon, EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_int(entWeapon, EV_INT_solid, SOLID_NOT)
entity_set_edict(entWeapon, EV_ENT_aiment, entid)
entity_set_model(entWeapon, "models/p_m4.mdl")
//*********************************************
*/
}
I commented out the weapon section, because it had an error on weapString (guessing that is cstrike module)
But the problem is, the main model does not show up in game...did I do something wrong?
__________________