Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local seatpos = Vector(0,0,0)
- local nextt = CurTime()
- local function Vehicles_DevThink()
- if(DEVMODE && DEV_SEATPOS && nextt < CurTime()) then
- local mul = 1
- if(player.GetByID(1):KeyDown(IN_SPEED)) then
- mul = 3
- elseif(player.GetByID(1):KeyDown(IN_DUCK) || player.GetByID(1):KeyDown(IN_WALK)) then
- mul = .5
- end
- if(player.GetByID(1):KeyDown(IN_FORWARD)) then
- print("Moving forward")
- seatpos.y = seatpos.y + 1 * mul
- GAMEMODE.CARSEAT:SetPos(GAMEMODE.CAR:LocalToWorld(seatpos))
- elseif(player.GetByID(1):KeyDown(IN_BACK)) then
- print("Moving back")
- seatpos.y = seatpos.y - 1 * mul
- GAMEMODE.CARSEAT:SetPos(GAMEMODE.CAR:LocalToWorld(seatpos))
- elseif(player.GetByID(1):KeyDown(IN_MOVELEFT)) then
- print("Moving left")
- seatpos.x = seatpos.x + 1 * mul
- GAMEMODE.CARSEAT:SetPos(GAMEMODE.CAR:LocalToWorld(seatpos))
- elseif(player.GetByID(1):KeyDown(IN_MOVERIGHT)) then
- print"Moving right"
- seatpos.x = seatpos.x - 1 * mul
- GAMEMODE.CARSEAT:SetPos(GAMEMODE.CAR:LocalToWorld(seatpos))
- elseif(player.GetByID(1):KeyDown(IN_JUMP)) then
- print("Moving up")
- seatpos.z = seatpos.z + 1 * mul
- GAMEMODE.CARSEAT:SetPos(GAMEMODE.CAR:LocalToWorld(seatpos))
- elseif(player.GetByID(1):KeyDown(IN_ALT2)) then
- print("Moving down")
- seatpos.z = seatpos.z - 1 * mul
- GAMEMODE.CARSEAT:SetPos(GAMEMODE.CAR:LocalToWorld(seatpos))
- elseif(player.GetByID(1):KeyDown(IN_ATTACK)) then
- print(seatpos)
- DEV_SEATPOS = false
- seatpos = Vector(0,0,0)
- end
- nextt = CurTime() + .2
- end
- end
- hook.Add("Think", "VehicleMod_DevThink", Vehicles_DevThink)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement