Jump to content

sight problem


displayblod

Recommended Posts

function setCrosshairState(state)
	if not g_showCrosshair then return end
	local color = tocolor(255,255,255,102)
	if state == CROSSHAIR_WORLD then
		color = tocolor(255,255,255,255)
	elseif state == CROSSHAIR_WATER then
		color = tocolor(80,203,227,255)
	elseif state == CROSSHAIR_MOUSEOVER then
		color = tocolor(191,203,134,255)
	elseif state == CROSSHAIR_SENSITIVE then
		color = tocolor(255,0,0,255)
	end
	dxDrawImage ( g_screenX/2 - 16, g_screenY/2 - 16, 32, 32, "client/images/crosshair.png",0,0,0,color,false)
	g_crosshairState = state
end

I actually found this code, but unfortunately I do not understand much about it and do not know what to do with it. if it can be edited then using what? ty

Link to comment
19 minutes ago, King12 said:

-- Client side

setPlayerHudComponentVisible ( "crosshair", false )
-- or this to hide every HUD component
setPlayerHudComponentVisible ( "all", false )

 

im sorry for noob question, I need to just write this down in "main.lua" (MTA San Andreas 1.5>server>mods>deathmatch>resources>[editor]>editor_main>client), in any empty place? if yes, after just save it on notepad++?

Link to comment

Make a desperate folder add it in resource folder or gameplay folder and will work fine

for example 

Folder name - hidecrosshair

Now in hidecross folder add meta.XML and client file and upload in resource folder then enter server do/refresh then /start hidecrosshair simple for map editor also same do /start hidecrosshair

Edited by Khadeer143
Link to comment
23 hours ago, Khadeer143 said:

Make a desperate folder add it in resource folder or gameplay folder and will work fine

for example 

Folder name - hidecrosshair

Now in hidecross folder add meta.XML and client file and upload in resource folder then enter server do/refresh then /start hidecrosshair simple for map editor also same do /start hidecrosshair

what client file?
as I understood all this must be done only after this O.o

 

addEventHandler("onClientResourceStart", resourceRoot,

function()

setPlayerHudComponentVisible( "crosshair", false )

end

)

otherwise how MTA will understand exactly what I want to do

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...