Resize player

A script to resize yourself.
http://s3.garrysmod.org/img/cache/7/3/0/2/8/cc71fc7518cfd3ff24e155d6518c143a.jpghttp://s3.garrysmod.org/img/cache/7/3/0/2/8/475fdf430257c3a607f36a97658fa367.jpghttp://s3.garrysmod.org/img/cache/7/3/0/2/8/6fb96266d8042cb698d92cf845625703.jpg

http://www.garrysmod.org/img/?t=dll&id=73028

A very simple script to show how to use Hull sizes and View offsets.
As the models are only scaled clientside, bullet damages will not work properly, but you can fix it using custom models.
I didn’t tested this script in multiplayer, but it should work.

Feel free to use it in any custom script or gamemode.

It’s like this?
http://www.facepunch.com/showthread.php?t=715014

The only difference between this and Kogitsune’s one is that Kogitsune’s is a stool.
But yeah, this could be useful.

Hmm, yeah it’s almost the same thing.
(I just didn’t saw this stool before <.<)

The main purpose is a really simple code reuseable by developers.
I think this feature can be really funny, but actually, it’s not used at all.

:smiley: :angel:

I bet the hit boxes stay in the same places.

They do because we can’t change those without custom models.

Try reading the first post next time.

Did you forget that garry put in Player.SetHull, Player.SetHullDuck etc?

That’s what makes the player bigger and smaller, the collision becomes bigger and smaller, but the hit boxes do not. So bullets will not hit correctly.

I think Player:TraceHullAttack() can work.
Hitboxes are defined in the Model file, and, as you can see here, model scale is a clientside function.

YOu mean the view the players will see the targets model? No that’s the SetModelScale.

The hull affects only physical collisions ( world, entities ).

Anything that is a trace depends on the hitbox, which can be greatly more complex than the rectangular hull and made of up multiple pieces. Bullets, line traces - they all use the hitbox.

Hull traces might use the hull instead - they sound like they do, but I haven’t tested to see.

[lua] Lua_run_cl for k, v in pairs(ents.GetAll()) do v:SetModelScale(Vector(.5,.5,.5)) end[/lua]
in console.

Seems to do the exact same thing…

You don’t understand this. The hull changes how the player collides with the world. So, with a small hull you can duck under stuff you could never duck under before, and a larger hull can prevent you from fitting through doorways.

That’s what this does.

Ok I get it, makes sense.