Raised This Month: $ Target: $400
 0% 

Creating an entity with a model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Prajch
Senior Member
Join Date: Dec 2007
Location: anger++
Old 01-07-2008 , 15:06   Creating an entity with a model
Reply With Quote #1

I've never done this before, but I'm trying to create an entity where the player is aiming and give it a model. Right now all I'm seeing is the implode effect. I feel like I'm missing something really basic...

Code:
#include <amxmodx> #include <amxmisc> #include <engine>   #define PLUGIN "Radioactive Waste" #define AUTHOR "Harman" #define VERSION "1.0"   new isotopeModel[] = "models/chromegibs.mdl" new aimVector[3]   public plugin_precache() {      precache_model(isotopeModel) }   public plugin_init() {      register_plugin(PLUGIN, AUTHOR, VERSION)      register_clcmd("waste", "radiate") }   public radiate(id) {      new isotopeEnt = create_entity("info_target")      entity_set_string(isotopeEnt,EV_SZ_classname,"isotope")      get_user_origin(id, aimVector, 3) //where the player is aiming      entity_set_origin(isotopeEnt, aimVector)      entity_set_model(isotopeEnt, isotopeModel)            message_begin(MSG_BROADCAST,SVC_TEMPENTITY) //implosion effect      write_byte(TE_IMPLOSION)      write_coord(aimVector[0])      write_coord(aimVector[1])      write_coord(aimVector[2])      write_byte(100) //radius      write_byte(50)  //count      write_byte(25)  //lifetime      message_end()            client_print(id, print_chat, "Test")            return PLUGIN_HANDLED }
Prajch 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 11:12.


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