Crosshair

Adds a customizable crosshair to your screen

Total Downloads: 9,869 - First Release: Jul 17, 2015 - Last Update: Jul 1, 2017

5/5, 26 likes
  1. Code:
    [7/21/2015 3:22:55 PM] [Oxide] 3:22 PM [Warning] CallHook 'OnEntityDeath' on plugin 'Rust:IO for Oxide' took average: 353ms
    [7/21/2015 3:26:10 PM] [Oxide] 3:26 PM [Warning] CallHook 'OnTick' on plugin 'Rust:IO for Oxide' took: 645ms
    [7/21/2015 3:27:12 PM] [Oxide] 3:27 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 738ms
    [7/21/2015 3:28:15 PM] [Oxide] 3:28 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 715ms
    [7/21/2015 3:28:28 PM] Missing projectileID (7)
    [7/21/2015 3:30:27 PM] [Oxide] 3:30 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 668ms
    [7/21/2015 3:32:43 PM] [Oxide] 3:32 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 754ms
    [7/21/2015 3:34:59 PM] TimeWarning: AIHandler.Cycle took 0.74 seconds (745ms)
    [7/21/2015 3:37:23 PM] [Oxide] 3:37 PM [Warning] CallHook 'OnTick' on plugin 'Rust:IO for Oxide' took: 711ms
    [7/21/2015 3:38:35 PM] [Oxide] 3:38 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 801ms
    [7/21/2015 3:40:40 PM] [Oxide] 3:40 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 797ms
    [7/21/2015 3:43:15 PM] [Oxide] 3:43 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 789ms
    [7/21/2015 3:44:42 PM] TimeWarning: AIHandler.Cycle took 1.43 seconds (1432ms)
    [7/21/2015 3:47:50 PM] [Oxide] 3:47 PM [Warning] CallHook 'OnPlayerInput' on plugin 'Crosshair' took: 551ms
    [7/21/2015 3:54:22 PM] TimeWarning: AIHandler.Cycle took 0.51 seconds (509ms)
     
    Last edited by a moderator: Jul 21, 2015
  2. forgot to add it to the overview, sorry!
    [DOUBLEPOST=1437480759][/DOUBLEPOST]
    as it says, its just a Warning and can basicly be ignored
     
  3. hehe no worries
     
  4. I would in your place fixed and not ignored.
     
  5. there is nothing to fix about this @Wulf
     
  6. Could you implement optional permissions. I want this for donators only.
     
  7. it is in. crosshair.use
     
  8. all my players get is "you do not have permission to use this command"
    so its kind of useless
     
  9. @pookins that is because you're not doing it right.....
     
  10. console:
    grant group player crosshair.use
     
  11. sorry. usually i'm helpful. i should have given the command, i was out of it at the time. my bad
     
  12. No problem.
     
  13. Possible to code it for admins only?
     
  14. @cmoua it's already coded that way. just grant or don't grant permissions.
     
  15. Thanks!
    [DOUBLEPOST=1437715569][/DOUBLEPOST]
    Pookins to make it easier for you and everyone else that don't understand the commands in oxide. Type what I have below exactly into your Console, so F1 into Console and type it. It should work after, if you're giving your friends the permissions. You replace your name with their name, then have them type in /crosshair on their chat screen. Then pull out a mat and start break dancing. =)

    oxide.grant user "Your In Game Name" crosshair.use


    Then type this in chat when you're in game.

    /crosshair
     
    Last edited by a moderator: Jul 24, 2015
  16. thank you, and wouldnt it have been easier to have a json config file so that it is enabled on server launch ?, with the options for colour and position on screen, and of course the option to enable/disable. This type of thing works great for personal beacon amongst others, after all, don't want to confuse us too much
     
  17. I can do that. Thx for the suggestion
     
  18. Code:
    [Oxide] 8:22 PM [Error] Failed to call hook 'ToggleCrosshair' on plugin 'Crosshair' (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 8:22 PM [Debug]   at Oxide.Core.Libraries.Permission.GroupExists (System.String groupname) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Permission.GroupHasPermission (System.String groupname, System.String perm) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Permission+<GroupsHavePermission>c__AnonStorey0.<>m__0 (System.String group) [0x00000] in <filename unknown>:0
      at System.Linq.Enumerable.Any[String] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Permission.GroupsHavePermission (System.Collections.Generic.HashSet`1 groups, System.String perm) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Permission.UserHasPermission (System.String userid, System.String perm) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Crosshair.ToggleCrosshair (.BasePlayer player) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    Im getting this message in my console when i try to toggle the crosshair on and off. Permissions are set up correctly (as far as i know) and I am owner on the server. Any thoughts?
     
  19. Wulf

    Wulf Community Admin

    Your data/oxide.groups.json appears to be invalid. Check it for errors using jsonlint.com.
     
  20. Thank you.