Pivity

Job Help

Last read Never
#1

Hey I want to know how I can set the Viewangle and Speed of a specific Job.

Because on my Server we have a Dog Job and the Playermodel is Half the size of a regular playermodel therefore I want to adjust the camera position and maybe give the job some more Speed.

If someone knows how to do this please let me know! :)

Funny x 1
#2

I'd take a look at these:

CalcView hook (https://wiki.facepunch.com/gmod/GM:CalcView)

There is a good example at the bottom for what you need


And use player:getDarkRPVar('job') (https://wiki.darkrp.com/index.php/Functions/Player/Shared/getDarkRPVar)

Agree x 1
#3

What Justin said should work for changing the camera view.

For setting a specific speed for a job, you can use DarkRP custom job fields, specifically:

OnPlayerChangedTeam
Called when a player switches to this job.

Which you can add to your job table like so:

OnPlayerChangedTeam = function(ply, oldTeam, newTeam) end,

Inside of that inline function you can change the player's speed by using the passed ply Player object.

#4

vor the viewangle, keep in mind that calcview doesnt change stuff like the start of your physgun or toolgun beams.

If you want to make the view lower permanently try looking at ViewOffsets

Agree x 1
Users viewing this thread
Nobody