0 Üye ve 1 Ziyaretçi konuyu incelemekte.
Linki görebilmek için Kayıt olun yada Giriş yapın.
Çok güzel sistem eline sağlık fakat Multigamemode sunucuma attığım anda muazzam bir kasma yaşandı serverde sebebi farklı dimensinonlarda oyuncu olması olabilir mi diye düşündüm ama alakasız bence
addEventHandler('onClientResourceStart', resourceRoot,function() Shade = Service:new('shade'); function Shade:add(object, callback) object = object or false; if not object then return error('Gelen [OBJE] argümanı hatalı.'); end self.cache = self.cache or {}; if self.cache[object.id] then return error('Verilmiş olan ID ile kayıtlı bir Shade elementi mevcut') end self.cache[object.id] = object.func; if not callback then return true end return callback(self, object.id); end; function Shade:use(id) id = id or false if not id or type(id) ~= 'string' then return error('ID argümanı hatalı') end self.cache[id]() return true end setFarClipDistance(600) --? Su efekti Shade:add({ id = 'Water', func = function() if getVersion().sortable < "1.1.0" then return false end local WShader = DxShader("dist/fx/water.fx"); if not WShader then return error('Shader yüklenemedi!'); end local function __init__() local noise3d = DxTexture('dist/media/smallnoise3d.dds', 'argb', false); local env256 = DxTexture('dist/media/cube_env256.dds', 'argb', false); WShader:setValue('sRandomTexture', noise3d) WShader:setValue('sReflectionTexture', env256) WShader:applyToWorldTexture('waterClear256'); return true end if pcall(__init__) then WShader:setValue("sWaterColor", 0/255, 128/255, 255/255, 150/255); return true else return error('Bilinmedik bir hata oluştu!') end end }, function(this, id) if this:use(id) then --? Işıklandırma hatalarını giderme Shade:add({ id = 'Clearlights', func = function() local LShader = DxShader('dist/fx/light_disable.fx', 0, 0, false, "object"); if not LShader then return error('Shader yüklenemedi!'); end local function __init__() LShader:applyToWorldTexture('*'); end if pcall(__init__) then return true else return error('Bilinmedik bir hata oluştu!') end end }, function(this, id) if this:use(id) then --? Gölgelendirme ayarı Shade:add({ id = 'SSAO', func = function() local function __init__() local isAOMaterialPrimitive = true local isDebugMode = false local scx, scy = guiGetScreenSize() local renderTarget = {RTNormal = nil, isOn = false} local aoShader = {shader = nil, colorRT = nil, enabled = false} local function enableAO() if aoShader.enabled then return end if renderTarget.isOn then if isAOMaterialPrimitive then aoShader.shader, tec = DxShader("dist/fx/primitive3D_ssao_dr.fx") else aoShader.shader, tec = DxShader("dist/fx/material3D_ssao_dr.fx") end if aoShader.shader and renderTarget.RTNormal then aoShader.shader:setValue("sRTNormal", renderTarget.RTNormal) end else if isAOMaterialPrimitive then aoShader.shader, tec = DxShader("dist/fx/primitive3D_ssao.fx") else aoShader.shader, tec = DxShader("dist/fx/material3D_ssao.fx") end end aoShader.colorRT = DxRenderTarget(scx, scy, true) isAllValid = true isAllValid = aoShader.shader and aoShader.colorRT if isAllValid then aoShader.shader:setValue("fViewportSize", scx, scy) aoShader.shader:setValue("sPixelSize", 1 / scx, 1 / scy) aoShader.shader:setValue("sAspectRatio", scx / scy) aoShader.shader:setValue("sRTColor", aoShader.colorRT) aoShader.shader:setValue("fBlend", 1, 3) end aoShader.enabled = isAllValid local trianglestrip_quad = {{-1, -1, 0, 0, 0}, {-1, 1, 0, 0, 1}, {1, -1, 0, 1, 0}, {1, 1, 0, 1, 1}} local cPosX, cPosY, cPosZ = getCameraMatrix() addEventHandler("onClientPreRender", root, function() dxSetRenderTarget(aoShader.colorRT) dxSetRenderTarget() if isAOMaterialPrimitive then dxDrawMaterialPrimitive3D( "trianglestrip", aoShader.shader, false, unpack( trianglestrip_quad ) ) else cPosX, cPosY, cPosZ = getCameraMatrix() dxDrawMaterialLine3D( cPosX + 0.5, cPosY + 1, cPosZ, cPosX + 0.5, cPosY , cPosZ, aoShader.shader, 1, tocolor(255,255,255,255), cPosX + 0.5,cPosY + 0.5, cPosZ + 1 ) end end, true, "high+9" ) end local function disableAO() if not aoShader.enabled then return end aoShader.enabled = false destroyElement(aoShader.shader) aoShader.shader = nil destroyElement(aoShader.colorRT) aoShader.colorRT = nil end if dxGetStatus().VideoMemoryFreeForMTA > 950 and dxGetStatus().VideoCardPSVersion == '3' then enableAO() end return true end if pcall(__init__) then return true else return error('Bilinmedik bir hata oluştu!') end end }, function(this, id) if this:use(id) then --? Oyuncu gölgesi düzenlemesi Shade:add({ id = 'RemovePedShadow', func = function() local function __init__() local replace = DxTexture(1, 1) local pedShader = DxShader('dist/fx/pedshadow.fx', 0, 0, false); if not pedShader then return error('Shader yüklenemedi!'); end pedShader:applyToWorldTexture("shad_ped"); pedShader:setValue("reTexture", replace) return true end if pcall(__init__) then return true else return error('Bilinmedik bir hata oluştu!') end end }, function(this, id) if this:use(id) then return true else return error('Yüklemede hata yaşandı!') end end) else return error('Yüklemede hata yaşandı!') end end) else return error('Yüklemede hata yaşandı!'); end end) else return error('Yüklemede hata yaşandı!') end end) return trueend)
FPS düşüyor aga düşmez dediğine bakma