Raised This Month: $ Target: $400
 0% 

Ent Copying


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ingram
Veteran Member
Join Date: May 2004
Old 06-17-2004 , 17:29   Ent Copying
Reply With Quote #1

I made a plugin that should allow me to copy an ent (at least i think so)

Code:
public copyent (id,level,cid){     if (!cmd_access(id,level,cid,1))             return PLUGIN_HANDLED                 new target,bodypart, arg [64]     get_user_aiming (id,target,bodypart)     entity_get_string(target,EV_SZ_model,arg,63)     if (equal(arg,"models/player.mdl"))         return PLUGIN_HANDLED                 new entnum         new Float:arg2 [3]                 entity_get_string(target,EV_SZ_classname,arg,63)         entnum=create_entity(arg)                 entity_set_edict(entnum, EV_ENT_pContainingEntity, entity_get_edict(target, EV_ENT_pContainingEntity))                 entity_get_vector(target,EV_VEC_absmin,arg2)     entity_set_vector(entnum, EV_VEC_absmin, arg2)     entity_get_vector(target,EV_VEC_absmax,arg2)     entity_set_vector(entnum, EV_VEC_absmax, arg2)     entity_get_vector(target,EV_VEC_mins,arg2)     entity_set_vector(entnum, EV_VEC_mins, arg2)     entity_get_vector(target,EV_VEC_maxs,arg2)     entity_set_vector(entnum, EV_VEC_maxs, arg2)     entity_get_vector(target,EV_VEC_size,arg2)         entity_set_vector(entnum, EV_VEC_size, arg2)                 entity_set_int(entnum, EV_INT_movetype, entity_get_int(target, EV_INT_movetype))     entity_set_int(entnum, EV_INT_solid, entity_get_int(target, EV_INT_solid))     entity_set_int(entnum, EV_INT_modelindex, entity_get_int(target, EV_INT_modelindex))     entity_set_int(entnum, EV_INT_spawnflags, entity_get_int(target, EV_INT_spawnflags))         entity_set_int(entnum, EV_INT_flags, entity_get_int(target, EV_INT_flags))                 entity_get_string(target,EV_SZ_model,arg,63)         entity_set_string(entnum, EV_SZ_model, arg);                                 return PLUGIN_HANDLED }

the problem is it copies everything but the fact that the ent in the world (i can't move it around, also made, and u can walk through it). Anyone know the problem?
Ingram 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 14:45.


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