Entity won't spawn
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:
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. |
Re: Entity won't spawn
Didn't understand well, but there's something that I can't understand.
Why are you Spawning "info_target" entities? That's totally useless, mod just does this PHP Code:
|
Re: Entity won't spawn
Why doesn't it appear at all then? If I comment out DispatchSpawn, it just does nothing, the entity is never created or at least visible.
Although if I do leave DispatchSpawn there it tries to precache c4 models and sounds and because I unprecached them it crashes the server. Are you sure it does ONLY that? |
Re: Entity won't spawn
You should use entity_set_model or Engfunc_SetModel to set a model.
|
Re: Entity won't spawn
Should I leave out DispatchSpawn then? I personally never used it, but ot_207 did in his nade API and it works fine so no idea what I'm doing wrong.
Edit: Thanks, it seems to work (even without DispatchSpawn) although it just lies where I spawned it instead of falling to the ground due to the velocity (I spawn the entity with the "drop" command and it's just midair so no gravity is applied, maybe because it has no movetype defined?) Edit2: Workaround: PHP Code:
|
Re: Entity won't spawn
If you want to imitate original weapon drop velocity, just use this imitation:
PHP Code:
|
| All times are GMT -4. The time now is 09:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.