Raised This Month: $ Target: $400
 0% 

Creating Entity Help(Searched none work.)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ninja_Munkey
Junior Member
Join Date: Jun 2005
Old 06-08-2005 , 10:18   Creating Entity Help(Searched none work.)
Reply With Quote #1

Okay first of all here is the code I am using.
Code:
// ******************************************************************
// Credits **********************************************************
// <-Ninja_Munkey-> *************************************************
// All the people at http://www.AMXModX.org/forums ******************
// ******************************************************************
// 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
// **************************
public SummonSpider(id){

// **************************
// Create Basic Entity
// **************************
new entid
entid = create_entity("summoned_spider")

// **************************
// Set its classname
// **************************
entity_set_string(entid, EV_SZ_classname, "summon_spider")

// **************************
// Set its Model
// **************************
entity_set_model(entid, "models/summon/spider.mdl")

// **************************
// Set its origin
// **************************
new Float:origin[3]
entity_get_vector(id,EV_VEC_origin,origin);
entity_set_origin(entid, origin)

// **************************
// Set some basic properties
// **************************
entity_set_int(entid, EV_INT_solid, 1)
entity_set_int(entid, EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_edict(entid, 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, entid)

// **************************
// Set creater health & armor
// **************************
	entity_set_int(entid, EV_FL_armortype, 50)
	entity_set_int(entid, EV_FL_health, 50)
}
// ************************** 
// End SummmonSpider
// **************************
I have the model set and everything, yet it still doesn't show up, what am I doing wrong?
Ninja_Munkey is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode