GUIEditor_Window = {}
GUIEditor_Label = {}
GUIEditor_Window[1] = guiCreateWindow(0.2688,0.1967,0.5025,0.5367,"{zhran}=abozhrh ||Sniper crosshair ",true)
guiSetVisible (GUIEditor_Window[1], false)
GUIEditor_Label[1] = guiCreateLabel(99,29,244,20,"Click on picture for change Sniper crosshair",false,GUIEditor_Window[1])
guiLabelSetColor(GUIEditor_Label[1],255,0,255)
guiSetFont(GUIEditor_Label[1],"default-bold-small")
default = guiCreateButton(18,274,96,39,"Default Sniper crosshair",false,GUIEditor_Window[1])
guiSetFont(default,"default-bold-small")
close = guiCreateButton(298,274,92,39,"Close",false,GUIEditor_Window[1])
guiSetFont(close,"default-bold-small")
B1 = guiCreateButton(18,53,84,77,"",false,GUIEditor_Window[1])
BG1 = guiCreateStaticImage(7,5,70,63,"1/1.png",false,B1)
B2 = guiCreateButton(112,53,84,77,"",false,GUIEditor_Window[1])
BG2 = guiCreateStaticImage(7,5,70,63,"2/2.png",false,B2)
B3 = guiCreateButton(205,53,84,77,"",false,GUIEditor_Window[1])
BG3 = guiCreateStaticImage(7,5,70,63,"3/3.png",false,B3)
B4 = guiCreateButton(299,53,84,77,"",false,GUIEditor_Window[1])
BG4 = guiCreateStaticImage(7,5,70,63,"4/4.png",false,B4)
B5 = guiCreateButton(18,159,84,77,"",false,GUIEditor_Window[1])
BG5 = guiCreateStaticImage(7,5,70,63,"5/5.png",false,B5)
B6 = guiCreateButton(113,159,84,77,"",false,GUIEditor_Window[1])
BG6 = guiCreateStaticImage(7,5,70,63,"6/6.png",false,B6)
B7 = guiCreateButton(208,159,84,77,"",false,GUIEditor_Window[1])
BG7 = guiCreateStaticImage(7,5,70,63,"7/7.png",false,B7)
B8 = guiCreateButton(300,159,84,77,"",false,GUIEditor_Window[1])
BG8 = guiCreateStaticImage(7,5,70,63,"8/8.png",false,B8)
----------
function open_window ( )
if guiGetVisible ( GUIEditor_Window[1] ) then
showCursor ( false )
guiSetVisible ( GUIEditor_Window[1], false )
else
guiSetVisible ( GUIEditor_Window[1], true )
showCursor ( true )
end
end
bindKey ( "F7", "down", open_window )
--------
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == default then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == close then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG1 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("1/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG2 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("2/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG3 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("3/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG4 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("4/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG5 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("5/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG6 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("6/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG7 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("7/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler ("onClientGUIClick", getRootElement(),
function(button, state, absoluteX, absoluteY)
if source == BG8 then
guiSetVisible (GUIEditor_Window[1], false)
showCursor (false)
destroyElement(txd)
setTimer ( function()
txd = engineLoadTXD("8/sniper.txd")
engineImportTXD(txd, 358)
end, 100, 1, true )
end
end
)
addEventHandler( "onClientResourceStart", getRootElement( ),
function ( startedRes )
outputChatBox(".::[sniper crosshair | By | {zhran}=abozhrh]::.",255,255,0,true)
txd = engineLoadTXD("sniper.txd")
engineImportTXD(txd, 358)
end
);
addEventHandler( "onClientResourceStop", getRootElement( ),
function ( stoppedRes )
txd = engineLoadTXD("sniper.txd")
engineImportTXD(txd, 358)
end
);