Results 1 to 11 of 11
  1. #1
    kloun's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    Local Player camera flip.

    I want to make fun of my friends, flip the camera. How can you do such a thing?

  2. #2
    too much sauce's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    100
    Reputation
    10
    Thanks
    298
    Code:
    hook.Add("CalcView", "ebicprankpro", function(ply, origin, angles, fov)
    local view = {}
    view.origin = origin
    view.angles = LocalPlayer():EyeAngles() + Angle(0, 180, 0)
    view.fov = fov
    return view
    end)

  3. #3
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    Quote Originally Posted by too much sauce View Post
    Code:
    hook.Add("CalcView", "ebicprankpro", function(ply, origin, angles, fov)
    local view = {}
    view.origin = origin
    view.angles = LocalPlayer():EyeAngles() + Angle(0, 180, 0)
    view.fov = fov
    return view
    end)
    Code:
    hook.Add("CreateMove", "", function(cmd)
    	cmd:GetViewAngles().r = 180
    end)

  4. #4
    eth0s's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    1,887
    Both wrong...
    roll isn't networked and thats changing the yaw

    hook.Add("CreateMove", "", function(cmd)
    local viewangles = cmd:GetViewAngles()
    cmd:SetViewAngles(Angle(180, viewangles.y, 0))
    end)

  5. #5
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    Quote Originally Posted by eth0s View Post
    Both wrong...
    roll isn't networked and thats changing the yaw

    hook.Add("CreateMove", "", function(cmd)
    local viewangles = cmd:GetViewAngles()
    cmd:SetViewAngles(Angle(180, viewangles.y, 0))
    end)
    It doesn't matter if roll isn't networked, from what OP is saying this is only going to be used clientside. To combat the yaw changing you could just add 180 to it.

  6. #6
    eth0s's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    1,887
    Quote Originally Posted by Cyaegha View Post
    It doesn't matter if roll isn't networked, from what OP is saying this is only going to be used clientside. To combat the yaw changing you could just add 180 to it.
    where does it imply that its going to be used clientside? and im talking about cdrizas mess of code for the yaw

  7. #7
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    Quote Originally Posted by eth0s View Post
    where does it imply that its going to be used clientside? and im talking about cdrizas mess of code for the yaw
    Well the title is a big indicator. "Local Player".

  8. #8
    eth0s's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    1,887
    Quote Originally Posted by Cyaegha View Post
    Well the title is a big indicator. "Local Player".
    yea doesn't mean clientside only

  9. #9
    Chief Gooby's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    47
    Reputation
    10
    Thanks
    17
    My Mood
    Cheeky
    Quote Originally Posted by eth0s View Post
    yea doesn't mean clientside only
    LocalPlayer is client-side only. Whether OP knows that or not is unclear.

    If he plans to run this on his friends, he's going to have to use the SendLua method.
    Last edited by Chief Gooby; 12-30-2016 at 11:57 PM.

  10. #10
    Isis-abdhulla's Avatar
    Join Date
    Nov 2016
    Gender
    male
    Posts
    87
    Reputation
    10
    Thanks
    14
    pasted from lennys!!
    Last edited by Gaar; 01-06-2017 at 10:45 AM. Reason: removed link.

  11. #11
    guessjoe1's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    4
    My Mood
    Bored
    If he is just wanting to make it only client-sided for him to only see those methods should work.

    [EDIT] nevermind the first one is it's just turns the player around.
    Last edited by guessjoe1; 01-04-2017 at 01:44 PM.

Similar Threads

  1. [HELP] How do i find Local Player Pointer?
    By klofee in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 6
    Last Post: 09-20-2010, 04:44 PM
  2. [Release] Local Player Pointer
    By ipwnuuaal5 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 10
    Last Post: 09-04-2010, 03:14 PM
  3. Local PLayer Structs
    By DeadLinez in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 5
    Last Post: 07-26-2010, 11:48 AM
  4. Local Player Structs
    By UnOwN CoD3R in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 10
    Last Post: 07-16-2010, 11:40 PM
  5. [AssaultCube]Get local player entity
    By Retoxified in forum C++/C Programming
    Replies: 1
    Last Post: 04-04-2010, 10:24 PM