Raised This Month: $ Target: $400
 0% 

Following Model - Lazy'ass'question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DaxProxy
Senior Member
Join Date: Sep 2007
Old 08-09-2010 , 06:01   Following Model - Lazy'ass'question
Reply With Quote #1

Following Model - Lazy'ass'question
I've done searching, but haven't figured out the right way to do that.
What i'm trying to do, is to get an model following player.
Basically i want to spawn model on top of an player, which will follow this player, just as it would be part of him.

Would anyone give me quick hint on where i should start?
__________________

Want ApolloRP for Counter-Strike? Show your support: http://forums.alliedmods.net/showthr...39#post1264739
DaxProxy is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 08-09-2010 , 06:07   Re: Following Model - Lazy'ass'question
Reply With Quote #2

Search for Hats.

I'm using this code, id is the player.
PHP Code:
    set_pev(iEntitypev_aimentid)
    
set_pev(iEntitypev_movetypeMOVETYPE_FOLLOW)
    
set_pev(iEntitypev_velocity, {0.00.00.0})
    
set_pev(iEntitypev_avelocity, {0.00.00.0}) 
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015
Leon M. is offline
DaxProxy
Senior Member
Join Date: Sep 2007
Old 08-09-2010 , 07:25   Re: Following Model - Lazy'ass'question
Reply With Quote #3

Ofcourse, the...hats...i'm sorry for wasting your time and amxx's bandwidth.
But thanks for the code, simple and clean.
__________________

Want ApolloRP for Counter-Strike? Show your support: http://forums.alliedmods.net/showthr...39#post1264739
DaxProxy is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-09-2010 , 07:31   Re: Following Model - Lazy'ass'question
Reply With Quote #4

Only aiment and movetype follow are required.

Also, the attached entity sticks at the center of the entity... unless you duplicate the bones of host entity's model to stick it to one point of the model... like in a hand of a player. See player bones and p_* weapon bones for example of that.
__________________

Last edited by Hunter-Digital; 08-09-2010 at 07:40.
Hunter-Digital is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 08-09-2010 , 08:04   Re: Following Model - Lazy'ass'question
Reply With Quote #5

Quote:
Originally Posted by Hunter-Digital View Post
Also, the attached entity sticks at the center of the entity
Yes, thats why i talked about hats .
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015
Leon M. is offline
DaxProxy
Senior Member
Join Date: Sep 2007
Old 08-09-2010 , 07:37   Re: Following Model - Lazy'ass'question
Reply With Quote #6

Thanks for information Hunter-Digital.
__________________

Want ApolloRP for Counter-Strike? Show your support: http://forums.alliedmods.net/showthr...39#post1264739
DaxProxy is offline
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 00:14.


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