Raised This Month: $51 Target: $400
 12% 

how to set player's entity size?


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

Quote:
Originally Posted by Devil259 View Post
Explain what do you mean by "size".

Hitbox size ?
Model size ?
Collision size ?
if i do it→entity_set_size(ent, Float:{-50.0, -50.0, -36.0}, Float:{50.0, 50.0, 36.0})
It will reset to entity_set_size(ent, Float:{-16.0, -16.0, -36.0}, Float:{16.0, 16.0, 36.0})
Leech_v2 is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 03-27-2012 , 17:53   Re: how to set player's entity size?
Reply With Quote #12

Quote:
Originally Posted by bboygrun View Post
You have to register FM_SetSize and then put the new size.
Code:
register_forward(FM_SetSize,			"fw_PlayerSetSize")

public fw_PlayerSetSize(id)
{
	if (!is_user_alive(id)) return

	new button = pev(id, pev_button)

	if (button & IN_DUCK)
		entity_set_size(id, {-16.0, -16.0, -18.0}, {16.0, 16.0, 2.0})
	else
		entity_set_size(id, {-16.0, -16.0, -36.0}, {16.0, 16.0, -16.0})

}
Leech_v2 is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 03-28-2012 , 07:18   Re: how to set player's entity size?
Reply With Quote #13

FM_SetSize is called each new round.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 03-30-2012 , 08:30   Re: how to set player's entity size?
Reply With Quote #14

Quote:
Originally Posted by Devil259 View Post
FM_SetSize is called each new round.
how to use it……
Leech_v2 is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 03-30-2012 , 17:40   Re: how to set player's entity size?
Reply With Quote #15

Use it like you did, but don't check if pev_buttons contains IN_DUCK flag. AFAIK, CS already know that model size decrease when player's ducking.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 03-31-2012 , 08:43   Re: how to set player's entity size?
Reply With Quote #16

Quote:
Originally Posted by Devil259 View Post
Use it like you did, but don't check if pev_buttons contains IN_DUCK flag. AFAIK, CS already know that model size decrease when player's ducking.
work false...
Code:
public fw_SetSize(id)
{
	if (!is_user_connected(id)) return
	new Float:min[3], Float:max[3]
	min[0]=-50.0, min[1]=-50.0, min[2]=-36.0
	max[0]=50.0, max[1]=50.0, max[2]=0.0
	entity_set_size(id, min, max)
	set_pev(id, pev_mins, min)
	set_pev(id, pev_maxs, max)
	set_pev(id, pev_size, min, max)
	engfunc(EngFunc_SetSize, id, min, max)
}
Leech_v2 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 18:16.


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