Raised This Month: $32 Target: $400
 8% 

how to set player's entity size?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 03-26-2012 , 17:48   how to set player's entity size?
Reply With Quote #1

entity_set_size(id, Float:{-50.0, -50.0, -36.0}, Float:{50.0, 50.0, 36.0})

……
Leech_v2 is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 03-26-2012 , 17:51   Re: how to set player's entity size?
Reply With Quote #2

You can change the hitboxes of the player to match those of the model (if the model is bigger/smaller) by using pev_modelindex and asigning it the value that you get from precache_model()... but I dunno if it also sets the collision box, AFAIK you can't change the collision box's size of a player... maybe that new RAGE module can do something, I dunno.
__________________
Hunter-Digital is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-26-2012 , 17:54  
Reply With Quote #3

Quote:
Originally Posted by Hunter-Digital View Post
You can change the hitboxes of the player to match those of the model (if the model is bigger/smaller) by using pev_modelindex and asigning it the value that you get from precache_model()... but I dunno if it also sets the collision box, AFAIK you can't change the collision box's size of a player... maybe that new RAGE module can do something, I dunno.
Do you have to constantly set that pev or is it like a 1 time thing per mapchange
Doc-Holiday is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 03-26-2012 , 21:12   Re: how to set player's entity size?
Reply With Quote #4

Quote:
Originally Posted by Doc-Holiday View Post
Do you have to constantly set that pev or is it like a 1 time thing per mapchange
Once after you apply the model I belive, I never tested it myself tough.
__________________
Hunter-Digital is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 03-27-2012 , 05:18   Re: how to set player's entity size?
Reply With Quote #5

Quote:
Originally Posted by Hunter-Digital View Post
You can change the hitboxes of the player to match those of the model (if the model is bigger/smaller) by using pev_modelindex and asigning it the value that you get from precache_model()... but I dunno if it also sets the collision box, AFAIK you can't change the collision box's size of a player... maybe that new RAGE module can do something, I dunno.
can i make an entity to set size?
Leech_v2 is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 03-27-2012 , 06:29   Re: how to set player's entity size?
Reply With Quote #6

To set the right hitbox of a model, you have to set g_ulModelIndexPlayer offset (491) on model index.
e.g.
Code:
new g_iModel; public plugin_precache( ) {      g_iModel = precache_model( "models/player/mymodel/mymodel.mdl" ); } const g_ulModelIndexPlayer = 491; const XO_PLAYER = 5; // set the model set_pdata_int( id, g_ulModelIndexPlayer, g_iModel, XO_PLAYER );
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 03-27-2012 at 06:29.
Devil259 is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 03-27-2012 , 09:12   Re: how to set player's entity size?
Reply With Quote #7

Quote:
Originally Posted by Devil259 View Post
To set the right hitbox of a model, you have to set g_ulModelIndexPlayer offset (491) on model index.
e.g.
Code:
new g_iModel; public plugin_precache( ) {      g_iModel = precache_model( "models/player/mymodel/mymodel.mdl" ); } const g_ulModelIndexPlayer = 491; const XO_PLAYER = 5; // set the model set_pdata_int( id, g_ulModelIndexPlayer, g_iModel, XO_PLAYER );
I just need a big size for the model......
Leech_v2 is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 03-27-2012 , 12:05   Re: how to set player's entity size?
Reply With Quote #8

Explain what do you mean by "size".

Hitbox size ?
Model size ?
Collision size ?
__________________
You can do anything you set your mind to, man.

Devil259 is offline
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 03-27-2012 , 13:38   Re: how to set player's entity size?
Reply With Quote #9

You have to register FM_SetSize and then put the new size.
__________________
bboygrun is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 03-27-2012 , 14:06   Re: how to set player's entity size?
Reply With Quote #10

You can't change the model size. You have to edit the model itself.
hleV is offline
Reply


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 02:55.


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