1. function LookingDirection()
    local controllable = netuser.playerClient.controllable
    local char = controllable:GetComponent( "Character" )

    local forward = char.forward -- This should be a forward vector.
    local pitch = char.eyesPitch -- You can use angles if you'd prefer
    local yaw = char.eyesYaw -- You can use angles if you'd prefer

    -- Convert unit circle angle to compass angle.
    -- Known error: char.eyesYaw randomly returns a String value and breaks output
    local direction = (yaw+90)%360

    return direction
    end
     
  2. Because your function doesnt get a netuser.
     
  3. Wulf

    Wulf Community Admin

    Are you developing for Legacy or Experimental? The wiki is for Legacy, and you posted under Experimental.
     
  4. Experimental? sorry didn't know wiki was for legacy
     
  5. Seems like we don't have a wiki for Experimental. Strings and some hooks seems to changed a bit and others are missing if compared to old Rust.
     
  6. Yea, the wiki is only for Legacy and will not apply to Experimental at the moment. At some point I guess we'll ditch the wiki and make a new one for Oxide 2. For now, your best bet is to look at other Experimental plugins and maybe poke around in the Rust Server source code.
     
  7. Wulf

    Wulf Community Admin

    Right now with Oxide 2 being alpha, there isn't anything for it yet. Once we hit an actual release we'll switch or setup something for it. For now you can review existing plugins or source code.