Raised This Month: $ Target: $400
 0% 

Entity won't spawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-11-2014 , 17:28   Entity won't spawn
Reply With Quote #1

I use precache control by joaquimandrade: https://forums.alliedmods.net/showpo...3&postcount=41 to block some useless precached files.

For some reason this code causes problems:

PHP Code:
new iEntity create_entity"info_target" )
entity_set_stringiEntityEV_SZ_classname"tossed_knife" )
        
new 
FloatfVecAngles]
entity_get_vectoridEV_VEC_anglesfVecAngles )
        
new 
FloatfVAngles], FloatfVecVelocity]
entity_get_vectoridEV_VEC_v_anglefVAngles )
        
        
engfuncEngFunc_MakeVectorsfVAngles )
global_getglb_v_forwardfVAngles )
        
fVecVelocity[0] = fVAngles] * 350
fVecVelocity
[1] = fVAngles] * 350
fVecVelocity
[2] = fVAngles] * 350
        
new FloatfVecOrigin]
entity_get_vectoridEV_VEC_originfVecOrigin )
entity_set_originiEntityfVecOrigin )
entity_set_vectoriEntityEV_VEC_velocityfVecVelocity )
        
entity_set_stringiEntityEV_SZ_modelDEFAULT_WMODEL )
entity_set_intiEntityEV_INT_iuser1iCurrentKnife )

DispatchSpawniEntity 
It tries to precache c4 files (DispatchSpawn to be exact), which causes crash because they're unprecached. If I precache them, the entity doesn't get spawned anyway or at least I can't see it.

Am I doing anything wrong? That code is mainly by ot_207, I'm trying to create an entity for my knife API but it won't work :/

DEFAULT_WMODEL is models/w_backpack.mdl and it's precached.

Last edited by Backstabnoob; 05-11-2014 at 17:32.
Backstabnoob is offline
 


Thread Tools
Display Modes

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 09:35.


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