Loooooooooolll o0
Why dont u guys see the problem, and I do? o0
Here, this is the summon code for teh little brat which I want to sqeeze with mine leg ( read : SPIDER ).
Code:
// ******************************************************************
// Credits **********************************************************
// <-Ninja_Munkey-> *************************************************
// All the people at <a href="http://www.AMXModX.org/forums" target="_blank" rel="nofollow noopener">http://www.AMXModX.org/forums</a> ******************
// ******************************************************************
// Plugin Summon Creator ********************************************
// ******************************************************************
#include <amxmodx>
#include <amxmisc>
#include <string>
#include <fun>
#include <engine>
// **************************
// Begin Plugin INT
// **************************
public plugin_precache()
{
if (file_exists("models/Summon/spider.mdl"))
precache_model("models/Summon/spider.mdl")
return PLUGIN_CONTINUE;
}
// **************************
// End Plugin INT
// **************************
// **************************
// Begin Plugin INT
// **************************
public plugin_init()
{
register_plugin("Summon Creator", "0.1.0", "<-Ninja_Munkey->")
register_clcmd("say /Summon", "SummonSpider(id)")
return PLUGIN_CONTINUE;
}
// **************************
// End Plugin INT
// **************************
// **************************
// Begin SummonSpider
// **************************
new SpiderEnt[32]
public SummonSpider(id){
// **************************
// Create Basic Entity
// **************************
SpiderEnt[id] = create_entity("info_target") // you can change info_target to env_model if it doesnt work
// **************************
// Set its classname
// **************************
entity_set_string(SpiderEnt[id], EV_SZ_classname, "summon_spider")
// **************************
// Set its Model
// **************************
entity_set_model(SpiderEnt[id], "models/summon/spider.mdl")
// **************************
// Set its origin
// **************************
new Float:origin[3]
entity_get_vector(id,EV_VEC_origin,origin);
entity_set_origin(SpiderEnt[id], origin)
// **************************
// Set some basic properties
// **************************
entity_set_int(SpiderEnt[id], EV_INT_solid, 1)
entity_set_int(SpiderEnt[id], EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_edict(SpiderEnt[id], EV_ENT_aiment, id)
// **************************
// Set to follow
// **************************
new entWeapon
entWeapon = create_entity("info_target")
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, SpiderEnt[id])
// **************************
// Set creater health & armor
// **************************
entity_set_int(SpiderEnt[id], EV_FL_armortype, 50)
entity_set_int(SpiderEnt[id], EV_FL_health, 50)
return PLUGIN_HANDLED
}
// **************************
// End SummmonSpider
// **************************
And, btw, if you use so called "avatar" system, which takes bones&animations of current player model ( avatar system works so it places a model over the current model, which acts like current model ), I think maybe ur bones are incorrect.
Well, test the code, and lemme know if it doesn't compiles/runs well ingame/etc.
__________________