Raised This Month: $ Target: $400
 0% 

adding model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
alvedro
Member
Join Date: Feb 2012
Old 05-17-2012 , 12:34   Re: adding model
Reply With Quote #7

This code works for you? For me does not create the 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(PLUGINVERSIONAUTHOR
    
    
register_clcmd("say /create","CreateEnt"


public 
plugin_precache() { 
    
precache_model("models/chick.mdl"


public 
CreateEnt(id) { 
    static 
ent 
    ent 
create_entity("info_target"
    if(
ent) {
        
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 
    
}

alvedro 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 00:28.


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