Sprite at the head of a NPC
Hello, I have trouble putting a sprite on top of the head of a NPC
I pulled the following error: Bad client in R_AttachTentToPlayer() PHP Code: PHP Code:
|
Re: Sprite at the head of a NPC
help pliz
|
Re: Sprite at the head of a NPC
Take a look at this thread: https://forums.alliedmods.net/showthread.php?t=3229
I think TE_PLAYERATTACHMENT (124) only works on actual players, which is why the error says "Bad client." The code in the above link would work, except the sprite will be attached to the origin of the other entity, not above it. Something like this should work (I tested it on a player, except I used FM_PlayerPostThink instead of FM_Think): Code:
This is assuming your non-player entity moves and thinks. If it doesn't move, then there's no need to constantly update its position. If it doesn't think, you can probably make it think with something like Code:
If that doesn't update fast enough, you'd have to hook something like FM_AddToFullPack and update the origin there, which would potentially be more processor intensive. |
| All times are GMT -4. The time now is 22:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.