Jump to content

Hide Crosshair


Recommended Posts

addEventHandler ( "onPlayerJoin", getRootElement(), crosshairhide ) 
  
function crosshairhide ( text ) 
    showPlayerHudComponent ( source, "crosshair", false )  
setTimer ( crosshairhide, 1, 1, "." ) 
end 

this is my first script but does not work.I know scm(cleo language for gta sa) and visual basic but I dont understand lua language :C what is wrong with my script?

Link to comment

that's impossible, it have to work but you could try and make it client sided again:

function disableCrosshair() 
    showPlayerHudComponent("crosshair", false) 
end 
addEventHandler("onClientPlayerJoin", root, disableCrosshair) 

and meta.xml

<meta> 
  <info author="marston" name="chc" version="1.0.0" type="script" /> 
  <script src="client.lua" type="client" /> 
</meta> 

Edited by Guest
Link to comment

CLIENT SIDE!

addEventHandler('onClientResourceStart',resourceRoot,function() showPlayerHudComponent('crosshair',false) end) 

..

If that doesn't work:

1) You are conflicting with another script

2) You are doing something wrong.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...