0 Üye ve 1 Ziyaretçi konuyu incelemekte.
Mira = 0Miras = {}GUIEditor = { button = {}, scrollpane = {}, staticimage = {}, window = {}}addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 280) / 2, (screenH - 259) / 2, 280, 259, "Dürbün Paneli", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.scrollpane[1] = guiCreateScrollPane(10, 28, 260, 194, false, GUIEditor.window[1]) for i = 1, 15 do for k = 1, 4 do Mira = Mira + 1 if fileExists('miras/'..Mira..'.png') then Miras[Mira] = guiCreateStaticImage(0 + (60 * (k-1)), 0 + (60 * (i-1)), 50, 50, 'miras/'..Mira..'.png', false, GUIEditor.scrollpane[1]) end end end for k, v in ipairs(Miras) do addEventHandler ( "onClientGUIClick", v, function() Crosshair_table = dxCreateShader("texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", dxCreateTexture('miras/'..k..'.png')) outputChatBox("Dürbün basariyla satin alindi!", 0, 255, 0) takePlayerMoney(2000) end, false) end GUIEditor.button[1] = guiCreateButton(71, 226, 127, 23, "Kapat", false, GUIEditor.window[1]) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end, false) end)bindKey('F7', 'down', function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) endend)
Mira = 0Miras = {}GUIEditor = { button = {}, scrollpane = {}, staticimage = {}, window = {}}addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 280) / 2, (screenH - 259) / 2, 280, 259, "Dürbün Paneli", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.scrollpane[1] = guiCreateScrollPane(10, 28, 260, 194, false, GUIEditor.window[1]) for i = 1, 15 do for k = 1, 4 do Mira = Mira + 1 if fileExists('miras/'..Mira..'.png') then Miras[Mira] = guiCreateStaticImage(0 + (60 * (k-1)), 0 + (60 * (i-1)), 50, 50, 'miras/'..Mira..'.png', false, GUIEditor.scrollpane[1]) end end end for k, v in ipairs(Miras) do addEventHandler ( "onClientGUIClick", v, function() Crosshair_table = dxCreateShader("texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", dxCreateTexture('miras/'..k..'.png')) triggerServerEvent ( "crossHairBuy", resourceRoot,k) end, false) end GUIEditor.button[1] = guiCreateButton(71, 226, 127, 23, "Kapat", false, GUIEditor.window[1]) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end, false) end)bindKey('F7', 'down', function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) endend)function crossHairActive ( cross ) Crosshair_table = dxCreateShader("texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", dxCreateTexture('miras/'..cross..'.png'))endaddEvent( "crossHairActive", true )addEventHandler( "crossHairActive", localPlayer, crossHairActive )
local crossPrice = 2000function crossHairBuy (cross) local account = getPlayerAccount(source) if account then local money = getPlayerMoney(source) if money >= crossPrice then outputChatBox("Nişangah satın alındı.",source,255,0,255,true) takePlayerMoney(source,crossPrice) setAccountData(account,"crosshair",cross) end endendaddEvent( "crossHairBuy", true )addEventHandler( "crossHairBuy", resourceRoot, crossHairBuy )addEventHandler ( "onPlayerLogin", resourceRoot,function (_,account) local cross = getAccountData(account,"crosshair") if cross then triggerClientEvent (source, "crossHairActive", resourceRoot,cross) endend)