Raised This Month: $ Target: $400
 0% 

Change player size


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-25-2013 , 10:36   Change player size
Reply With Quote #1

Hello, i saw somewhere that this is impossible but there are many things what should be impossible but are possible now with some trick.

Anyway here is code:
PHP Code:
public plugin_init() register_forward(FM_SetAbsBox,"i_sizeupdate")
public 
i_sizeupdate(id)
{
    static 
Float:a[3], Float:b[3]
    if(
id == // its me :)
    
{
        
a[0] = -5.0a[1] = -5.0a[2] = -10.0;
        
b[0] = 5.0b[1] = 5.0b[2] = 10.0;
        
engfunc(EngFunc_SetSize,id,a,b)
        
        
set_pev(id,pev_mins,a)
        
set_pev(id,pev_maxs,b)
        
set_pev(id,pev_absmin,a)
        
set_pev(id,pev_absmax,b)
        
dllfunc(DLLFunc_SetAbsBox,id)
    }

Anyway the game will crash just after game has starded ( I can also see my map for a sec )
What is the problem or what i am doing here anyway?
I dont understand it at all, i found this somewhere in this forum.

And as always, thanks!
.Dare Devil. is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 05-25-2013 , 11:51   Re: Change player size
Reply With Quote #2

Good to see this thread, i also want to make something like this.
It would be really cool If someone can make it possible.
11922911 is offline
liran530
Junior Member
Join Date: Jan 2012
Old 05-25-2013 , 13:49   Re: Change player size
Reply With Quote #3

i think because the model is big the players cant to see the player in small i think you need to create special model to this option i only think i dont sure but this can to be the answer

sorry for my bad english if you dont understand me i say to you what i am think with google translate
liran530 is offline
bcKq
Member
Join Date: Dec 2012
Location: Tczew, Poland
Old 05-25-2013 , 19:08   Re: Change player size
Reply With Quote #4

PHP Code:
public plugin_init() register_forward(FM_SetAbsBox,"i_sizeupdate"
public 
i_sizeupdate(id

    if(!
is_user_alive(id) || !is_user_connected(id)) return PLUGIN_CONTINUE;

    static 
Float:a[3], Float:b[3
    if(
id == // its me :) 
    

        
a[0] = -5.0a[1] = -5.0a[2] = -10.0
        
b[0] = 5.0b[1] = 5.0b[2] = 10.0
        
engfunc(EngFunc_SetSize,id,a,b
         
        
set_pev(id,pev_mins,a
        
set_pev(id,pev_maxs,b
        
set_pev(id,pev_absmin,a
        
set_pev(id,pev_absmax,b
        
dllfunc(DLLFunc_SetAbsBox,id
    } 

Maybe Baby
bcKq is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-25-2013 , 19:25   Re: Change player size
Reply With Quote #5

Why don't you supercede ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-26-2013 , 04:58   Re: Change player size
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
Why don't you supercede ?
Wont help it. still same situation.
.Dare Devil. is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-26-2013 , 05:56   Re: Change player size
Reply With Quote #7

Only thing i've managed to do is following code, unfortunately it has no effect, can see wanted sizes in server_frame and PreThink, but collisions remain the same as default.
Anyway, if someone find a way, there are still lot of places where values are hardcoded, see SetupVisibility in client.cll for example.

Spoiler



Also, when sending SetSize in SetObjectCollisionBox (or AbsBox, that one calls the other one), server is crashing (infinite loop i would say), that's because SetSize calls AbsBox, but even trying to disable the hook (with bool variable or using DisableHamForward) to get rid of recursivity, server is crashing.
Have no other idea.

Also, hooking SetSize seems to only takes effect when crouched.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 16:17.


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