Raised This Month: $ Target: $400
 0% 

Attaching entity to player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LynX
Veteran Member
Join Date: Oct 2004
Old 03-20-2005 , 17:16   Attaching entity to player
Reply With Quote #1

I would need a help around here. You see - I'm trying to make that player has an entity which is stick to him and follows him all the time untill I delete it with an other function. I already looked in Ludwig Vans Kamikazi plugin but that didn't help out.
So, I'm requesting a code snippet which would show me how to do it.
Thanks!

P.S.

If I set that entitys model - would it replace players model? If it will - that's awsome
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 03-20-2005 , 17:43  
Reply With Quote #2

look in HL SDK for player attachments it tells u how to do it in there
Freecode is offline
Jinto
Member
Join Date: Jun 2004
Location: Seattle, WA
Old 03-20-2005 , 22:45  
Reply With Quote #3

Well. Set the movetype of the entity to MOVETYPE_FOLLOW. and set aiment to the entity you want it to follow.

And if your trying to replace the player model in esf this method does work. Just is very ugly in adv melee. I have yet to find a legit way of changing the player models. So I use this method.

You also gotta hide the player by making them render invisible. ( DO NOT USE set_user_visibility ).
Jinto is offline
Send a message via ICQ to Jinto Send a message via AIM to Jinto Send a message via MSN to Jinto Send a message via Yahoo to Jinto
LynX
Veteran Member
Join Date: Oct 2004
Old 03-21-2005 , 00:21  
Reply With Quote #4

Yep - trying to change model...
I know that refreshing bug in advanced melee. But say - when I set player invisible - doesn't kRenderFXNone grows big when turbo on?

Can you please show me the code snippet coz I didn't understood it well
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Jinto
Member
Join Date: Jun 2004
Location: Seattle, WA
Old 03-21-2005 , 06:04  
Reply With Quote #5

Yes.
Oh and another quick note. the player becomes visible again right when he starts swooping. so you will have to keep him invisible.

And turbo is a model not a render effect.

Code:
new player_avatar = create_entity( "env_model" );
	
entity_set_int( player_avatar, EV_INT_movetype, MOVETYPE_FOLLOW );
entity_set_edict( player_avatar, EV_ENT_aiment, id );
	
entity_set_model( player_avatar, "<playermodel>" );
It will automatically assume the players animations.
Jinto is offline
Send a message via ICQ to Jinto Send a message via AIM to Jinto Send a message via MSN to Jinto Send a message via Yahoo to Jinto
LynX
Veteran Member
Join Date: Oct 2004
Old 03-21-2005 , 07:27  
Reply With Quote #6

Thanks man!!!!!

I sent you PM. Please answer on it...

Your the best!
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Reply



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 13:59.


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