Jump to content

Frases não aparecem no painel de roupas do CJ!


Recommended Posts

spacer.png

 

 

Client

local pShaders     = {}
local cor          = {}
local tec          = {}
local aba          = false
local panel        = false
local tableClothes = {}
local nunAction

local delay

addEvent('rzk:load:tabela', true)
addEventHandler('rzk:load:tabela', resourceRoot,
function (tabela)
     if not tableClothes then
	     tableClothes = {}
	 end
	 if tabela then
	     local argument, tableC = descompTable (localPlayer, tabela, typ)
	     if argument then
	         tableClothes = tableC
		 end
	 end
end)

local function getPlayerClothes(id)
     for _, value in pairs(tableClothes) do
		 if tonumber(id) == tonumber(value) then
		     return true
		 end
	 end
end

local function isPlayerClothes(id) 
     if tableClothes and #tableClothes > 0 then
	     if getPlayerClothes(id) then
		     return true
		 end
	 end
end

local function isShader (player, apply)
     if pShaders[player] then
         for _, t in pairs(pShaders[player]) do
	    	 if t[2] == apply then
	     	     return true, t[1], t[2], i
			 end
		 end
	 end
end
function set_custom (player, shader, apply, arg_1, arg_2, typ)
     if isElement(player) then
	     local search, arg_1, arg_2, i = isShader(apply)
	     if search then
		     print(getPlayerName(player))
			 engineRemoveShaderFromWorldTexture( arg_1, arg_2, player )
			 table.remove(pShaders[player], i)
	     end
		 if not pShaders[player] then
		     pShaders[player] = {}
		 end
	     local shad = dxCreateShader('tex_replace.fx', 0, 0, true, 'ped')
		 tex = dxCreateTexture(shader)
		 dxSetShaderValue(shad, 'gTexture', tex) 
		 engineApplyShaderToWorldTexture(shad, apply, player)
		 table.insert( pShaders[player], {shad, apply})
	 end
end
addEvent('rzk:set:custom:clothes', true)
addEventHandler('rzk:set:custom:clothes', resourceRoot, set_custom)

local screenH, screenW = guiGetScreenSize()
local x, y = (screenH/1920), (screenW/1080)

local menu_principal = {
     {'Camisas'},
	 {'Camisas de time'},
	 {'Moleton'},
	 {'Calças'},
	 {'Bermudas'},
	 {'Tênis'},
	 {'Óculos'},
	 {'Relógio'},
	 {'Bandana'},
	 {'Corrente'},
	 {'Extras'},
}

local camisas = {
     {'Remover roupa', '0', 0, 0},
     {'Camisa Bart Simpson', '350', 7},
	 {'Camisa Bob Marley', '350', 9},
	 {'Camisa Caveira SFD', '550', 15},
	 {'Camisa Duff', '150', 16},
	 {'Camisa socadão', '550', 17},
	 {'Camisa Leão Rainbow', '350', 19},
	 {'Camisa QuikSilver', '150', 21},
	 {'Camisa Shift', '150', 29},
	 {'Camisa Preta', '150', 23},
	 {'Camisa Super Man', '150', 24},
	 {'Camisa USA', '350', 25},
	 {'Camisa Volcom', '350', 26},
	 {'Camisa Bullet Valent', '350', 32},
	 {'Camisa Alvo', '350', 33},
	 {'Camisa Cj Amarela', '550', 34},
	 {'Camisa Anjo', '150', 35},
	 {'Camisa Sabbat', '550', 36},
	 {'Camisa Bullet', '350', 37},
	 {'Camisa Diamond', '150', 38},
	 {'Camisa Dubfx', '150', 39},
	 {'Camisa Daniels', '150', 40},
	 {'Camisa LGBT', '150', 41},
	 {'Camisa Mão', '350', 42},
	 {'Camisa Feminista', '350', 43},
	 {'Camisa Branca', '350', 44},
	 {'Camisa Monster Branca', '350', 45},
	 {'Camisa Monster Preta', '550', 46},
	 {'Camisa Raider 55', '150', 47},
	 {'Camisa Rockstar', '550', 48},
}

local times = {
     {'Remover roupa', '0', 0, 0},
     {'Camisa Brasil', '350', 14},
     {'Camisa Real Madrid', '350', 12},
	 {'Camisa Barcelona', '350', 2},
	 {'Camisa Boca Junior', '550', 10},
	 {'Camisa Botafogo', '150', 11},
	 {'Camisa Corinthians', '550', 30},
	 {'Moleton Corinthians', '350', 13},
	 {'Camisa Flamengo', '150', 1},
	 {'Camisa Fly Emirates', '150',8},
	 {'Camisa Gremios', '150', 18},
	 {'Camisa Palmeiras', '150', 20},
	 {'Camisa São Paulo', '350', 22},
	 {'Camisa Santos', '350', 31},
}

local moleton = {
     {'Remover roupa', '0', 0, 0},
	 {'Moleton Caveira SFD', '550', 49},
	 {'Moleton socadão', '550', 50},
	 {'Moleton Leão Rainbow', '350', 51},
	 {'Moleton Preta', '150', 52},
	 {'Moleton Volcom', '350', 53},
	 {'Moleton Sabbat', '550', 54},
	 {'Moleton Bullet', '350', 55},
	 {'Moleton Dubfx', '150', 56},
	 {'Moleton Daniels', '150', 57},
	 {'Moleton Raider 55', '150', 58},	 
	 {'Moleton Bandana', '550', 59},
	 {'Moleton Crips', '550', 60},
	 {'Moleton Ferrari', '350', 61},
	 {'Moleton Hollister', '150', 62},
	 {'Moleton Hollister Preta', '350', 63},
	 {'Moleton Jungle', '550', 64},
	 {'Moleton Meme', '350', 65},
	 {'Moleton Nike', '150', 66},
	 {'Moleton Puma', '150', 67},
	 {'Moleton Puma Branco', '150', 68},
}

local calcas = {
     {'Remover roupa', '0', 0, 2},
	 {'Calça Adidas Branca', '550', 69},
	 {'Calça Adidas Verde', '550', 70},
	 {'Calça Adidas Preta', '150', 71},
	 {'Calça Adidas', '350', 72},
	 {'Calça Adidas Laranja', '550', 73},
	 {'Calça Adidas Vermelha', '350', 74},
	 {'Calça Jeans', '150', 75},
	 {'Calça Jeans 2', '150', 76},
	 {'Calça Jeans 3', '150', 77},	 
	 {'Calça Jeans 4', '550', 79},
	 {'Calça Jeans 5', '550', 79},
	 {'Calça Jeans 6', '350', 80},
	 {'Calça Jeans 7', '150', 81},
	 {'Calça Jeans 8', '350', 82},
	 {'Calça Jeans 9', '550', 83},
	 {'Calça Jeans 10', '350', 84},
}

local bermudas = {
     {'Remover roupa', '0', 0, 2},
     {'Bermuda Branca', '550', 6},
	 {'Bermuda Cyclone', '550', 85},
	 {'Bermuda Cyclone', '150', 86},
	 {'Bermuda Element', '350', 87},
	 {'Bermuda Oakley', '550', 88},
	 {'Bermuda Iridescent Pants', '350', 89},
	 {'Bermuda Quik Azul', '150', 90},
	 {'Bermuda Quik Laranja', '150', 91},
	 {'Bermuda Quik Preta', '150', 92},	 
	 {'Bermuda Chicago Boll', '550', 93},
	 {'Bermuda USA', '550', 94},
}

local tenis = { 
     {'Remover roupa', '0', 0, 3},
     {'Tênis Bask Prl', '100', 98},
	 {'Tênis Bask Pjs', '100', 99},
	 {'Tênis Bask PJL', '100', 100},
	 {'Tênis Bask NK', '100', 101},
	 {'Tênis Bask MZ', '100', 102},
	 {'Tênis CONV KL', '100', 103},
	 {'Tênis CONV LK', '100', 104},
	 {'Tênis CONV IPO', '100', 105},
	 {'Tênis RAIDER', '100', 106},
	 {'Tênis RAIDER 55', '100', 107},
	 {'Tênis RAIDER JS', '100', 108},
	 {'Tênis RAIDER 99', '100', 109},
	 {'Tênis RAIDER LJK', '100', 110},
	 {'Tênis RAIDER BB', '100', 111},
	 {'Tênis RAIDER DZ7', '100', 112},
	 {'Tênis RAIDER JKS', '100', 113},
	 {'Tênis RAIDER PO', '100', 114},
	 {'Tênis RAIDER RIC', '100', 115},
	 {'Tênis FENIX GW', '100', 116},
	 {'Tênis FENIX PP', '100', 117},
	 {'Tênis FENIX KSA', '100', 118},
}

local relogio = {
     {'Remover roupa', '0', 0, 14},
     {'Relógio Rosa', '100', 119},
	 {'Relógio Amarelo', '100', 120},
	 {'Relógio Pro', '100', 121},
	 {'Relógio Pro 2', '100', 122},
	 {'Relógio Sub', '100', 123},
	 {'Relógio Sub 2', '100', 124},
	 {'Relógio Zip', '100', 125},
	 {'Relógio Zip 2', '100', 126},
	 {'Relógio Gno', '100', 127},
	 {'Relógio Gno 2', '100', 128},
	 {'Relógio Cro', '100', 129},
	 {'Relógio Cro 2', '100', 130},
}

local oculos = {
     {'Remover roupa', '0', 0, 15},
	 {'Óculos 01', '100', 131},
	 {'Óculos 02', '100', 132},
	 {'Óculos 03', '100', 133},
	 {'Óculos 04', '100', 134},
	 {'Óculos 05', '100', 135},
	 {'Óculos 06', '100', 136},
	 {'Óculos 07', '100', 137},
	 {'Óculos 08', '100', 138},
	 {'Óculos 09', '100', 139},
	 {'Óculos 10', '100', 140},
}

local bandana = {
     {'Remover roupa', '0', 0, 15},
	 {'Bandana Vermelha', '100', 141},
	 {'Bandana Azul', '100', 142},
	 {'Bandana Verde', '100', 143},
	 {'Bandana Preta', '100', 144},
}

local corrente = {	
     {'Remover roupa', '0', 0, 13}, 
	 {'Corrente Militar', '100', 145},
	 {'Corrente Africa', '100', 146},
	 {'Corrente Relógio', '100', 147},
	 {'Corrente Saints', '100', 148},
	 {'Corrente Hash', '100', 149},
	 {'Corrente Silver', '100', 150},
	 {'Corrente Gold', '100', 151},
	 {'Corrente Opes', '100', 152},
	 {'Corrente Peg', '100', 153},
	 {'Corrente Kls', '100', 154},
	 {'Corrente Doller', '100', 155},
	 {'Corrente Cross', '100', 156},
}

local extras = {
     {'Remover roupa', '0', 0, 16},
	 {'Touca Cinza', '100', 161},
	 {'Boné Caminhoneiro', '100', 162},
	 {'Chapéu Cowboy', '100', 163},
	 {'Chapéu Cowboy 2', '100', 164},
	 {'Boné Verde', '100', 165},
	 {'Boné Verde p/Trás', '100', 166},
	 {'Boné Vermelho', '100', 167},
	 {'Boné Vermelho p/Trás', '100', 168},
	 {'Boné Azul', '100', 169},
	 {'Boné Azul p/Trás', '100', 170},
	 {'Boné Zip', '100', 173},
	 {'Boné Zip p/Trás', '100', 174},
	 {'Boné Preto', '100', 175},
	 {'Boné Preto p/Trás', '100', 176},
	 {'Touca Preta', '100', 181},
	 {'Chapéu Bucket Preta', '100', 171},
	 {'Chapéu Bucket Xadrez', '100', 172},
	 {'Chapéu 01', '100', 177},
	 {'Chapéu 02', '100', 178},
	 {'Chapéu 03', '100', 179},
}

local font = exports.Fonts:getFont("f5")
local font_1 = exports.Fonts:getFont("f3")
local font_2 = exports.Fonts:getFont("f1")

function rzk_clothes ()
local v = nil
     dxDrawRectangle(x*22, y*121, x*328, y*106, tocolor(0, 175, 255, 255), false)
     dxDrawText("Loja de Roupas", x*21, y*142, x*350, y*227, tocolor(255, 255, 255, 255), x*1.20, font_1, "center", "center", false, false, false, false, false)
     dxDrawRectangle(x*22, y*226, x*328, y*38, tocolor(1, 0, 0, 200), false)
     dxDrawText(menu, x*40, y*426, x*350, y*62, tocolor(255, 254, 254, 170), x*1.10, "default-bold", "left", "center", false, false, false, false, false)
     dxDrawText("("..nunAction.."/"..(#tabela or 0)..")", x*295, y*426, x*350, y*62, tocolor(255, 254, 254, 170), x*1.00, "default-bold", "center", "center", false, false, false, false, false)
	 local elem = 0
	 for i = 1, #tabela do
	     if #tabela ~= 0 then
		     if valor then
		     	 if (i >= nunAction and elem < 12) then
		    	 elem = elem + 1
		             v = tabela[i]
		             tec[i] = tocolor(255, 254, 254, 219)
		             cor[i] = tocolor(1, 0, 0, 164)
		             if nunAction > 0 then
		                 cor[nunAction] = tocolor(255, 255, 255, 255)
		                 tec[nunAction] = tocolor(0, 0, 0, 219)
		             end
                     dxDrawRectangle(x*22, screenW-(855-(elem*38))*y, x*328, y*38, cor[i], false)
	                 dxDrawText(v[1], x*40, screenW-(695-(elem*76))*y, x*350, y*100, tec[i], x*0.60, font_1, "left", "center", false, false, false, false, false)
	                 if valor then
					     if v[2] and tonumber(v[2]) > 0 then
						     if isPlayerClothes(tonumber(v[3])) then
                                 dxDrawText('USAR', x*255, screenW-(695-(elem*76))*y, x*340, y*100, tec[i], x*0.50, font_2, "right", "center", false, false, false, false, false)
							 else
							     dxDrawText('R$ '..v[2], x*255, screenW-(695-(elem*76))*y, x*340, y*100, tec[i], x*0.50, font_2, "right", "center", false, false, false, false, false)
							 end
						 else
						     dxDrawText('GRÁTIS', x*255, screenW-(695-(elem*76))*y, x*340, y*100, tec[i], x*0.50, font_2, "right", "center", false, false, false, false, false)
						 end
			     	 end
			     end
			 else
			     if nunAction <= 12 then
		             v = tabela[i]
		             tec[i] = tocolor(255, 254, 254, 219)
		             cor[i] = tocolor(1, 0, 0, 164)
		             if nunAction > 0 then
		                 cor[nunAction] = tocolor(255, 255, 255, 255)
		                 tec[nunAction] = tocolor(0, 0, 0, 219)
		             end
                     dxDrawRectangle(x*22, screenW-(855-(i*38))*y, x*328, y*38, cor[i], false)
	                 dxDrawText(v[1], x*40, screenW-(695-(i*76))*y, x*350, y*100, tec[i], x*0.60, font_1, "left", "center", false, false, false, false, false)
                 end
			 end
		 end
	 end 
	 if not valor then
	     if #tabela <= 12 then
	         dxDrawRectangle(x*22, screenW-(855-((#tabela + 1)*38))*y, x*328, y*38, tocolor(1, 0, 0, 191), false)
             dxDrawText("---", x*22, screenW-(745-((#tabela + 1)*76))*y, x*350, y*139, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false)
	     else
	         dxDrawRectangle(x*22, screenW-(855-((12 + 1)*38))*y, x*328, y*38, tocolor(1, 0, 0, 191), false)
             dxDrawText("---", x*22, screenW-(745-((12 + 1)*76))*y, x*350, y*139, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false)
	     end
	 end
end

addEvent('rzk:open:clothes', true)
addEventHandler('rzk:open:clothes', resourceRoot,
function (states)
     if states then
	     if not panel then
             addEventHandler("onClientRender", root, rzk_clothes)
	         menu = 'LOJA DE ROUPA'
	         tabela = menu_principal
	         nunAction = 1
			 unbindKey('arrow_d', 'down', up)
	         unbindKey('arrow_u', 'down', down)
	         bindKey('arrow_d', 'down', up)
	         bindKey('arrow_u', 'down', down)
	         bindKey('enter', 'down', enter)
	         bindKey('backspace', 'down', back)
			 aba = false
			 valor = false
			 panel = true
		 end
	 else
	     if panel then
             removeEventHandler("onClientRender", root, rzk_clothes)
	         menu = nil
	         tabela = nil
	         nunAction = nil
	         unbindKey('arrow_d', 'down', up)
	         unbindKey('arrow_u', 'down', down)
	         unbindKey('enter', 'down', enter)
	         unbindKey('backspace', 'down', back)
			 panel = false
			 triggerServerEvent('rzk:original:clothes', resourceRoot, localPlayer)
		 end
	 end
end)

addEventHandler( "onClientKey", root, function(button,press) 
     if panel then
         if button == "arrow_d" or button == "arrow_u" then
             toggleAllControls(false)
		 else
		     toggleAllControls(true)
		 end
     end
end)

function up ()
	     if nunAction >= 0 and nunAction < tonumber(#tabela) then
		     nunAction = nunAction + 1
			 if aba then
			     if menu == 'EXTRAS' or menu == 'ÓCULOS' or menu == 'RELÓGIO' or menu == 'BANDANA' or menu == 'CORRENTE' then 
				     local Texture, Model, Typ = getNameIdShader(tabela[nunAction][3])
					 addPedClothes(localPlayer, Texture, Model, Typ)
				 else
			         local name, skinid, argument_1, argument_2, typ = getNameIdShader(tabela[nunAction][3])
				     addPedClothes(localPlayer, argument_1, argument_2, typ)
				     set_custom (localPlayer, name, skinid, argument_1, argument_2, typ)
				 end
			 end
		 end
	-- end
end

function enter ()
     if nunAction then
	     if not aba then
		     aba = nunAction
			 if nunAction == 1 then
			     nunAction = 1
			     tabela = camisas
				 valor = true
				 menu = 'CAMISAS'
			 end
			 if nunAction == 2 then
			     nunAction = 1
			     tabela = times
				 valor = true
				 menu = 'CAMISAS DE TIMES'
			 end
			 if nunAction == 3 then
			     nunAction = 1
			     tabela = moleton
				 valor = true
				 menu = 'MOLETONS'
			 end
			 if nunAction == 4 then
			     nunAction = 1
			     tabela = calcas
				 valor = true
				 menu = 'CALÇAS'
			 end
			 if nunAction == 5 then
			     nunAction = 1
			     tabela = bermudas
				 valor = true
				 menu = 'BERMUDAS'
			 end
			 if nunAction == 6 then
			     nunAction = 1
			     tabela = tenis
				 valor = true
				 menu = 'TÊNIS'
			 end
			 if nunAction == 7 then
			     nunAction = 1
			     tabela = oculos
				 valor = true
				 menu = 'ÓCULOS'
			 end
			 if nunAction == 8 then
			     nunAction = 1
			     tabela = relogio
				 valor = true
				 menu = 'RELÓGIO'
			 end
			 if nunAction == 9 then
			     nunAction = 1
			     tabela = bandana
				 valor = true
				 menu = 'BANDANA'
			 end
			 if nunAction == 10 then
			     nunAction = 1
			     tabela = corrente
				 valor = true
				 menu = 'CORRENTE'
			 end
			 if nunAction == 11 then
			     nunAction = 1
			     tabela = extras
				 valor = true
				 menu = 'EXTRAS'
			 end
		 else  
		     if not isTimer(delay) then
	     	     local shaderID = tonumber(tabela[nunAction][3])
	    		 if (shaderID ~= 0) then
		             if not isPlayerClothes(shaderID) then
		    		     if shaderID >= 119 and shaderID <= 182 then
			    		     table.insert(tableClothes, shaderID)
			    	     	 local _, _, typ = getNameIdShader(tabela[nunAction][3])
			                 triggerServerEvent('rzk:set:player:skin', resourceRoot, localPlayer, tabela[nunAction][2], shaderID, typ, tableClothes, true)
			    		 else
		                     table.insert(tableClothes, shaderID)
			    	     	 local name, skinid, argument_1, argument_2, typ = getNameIdShader(tabela[nunAction][3])
			                 triggerServerEvent('rzk:set:player:skin', resourceRoot, localPlayer, tabela[nunAction][2], shaderID, typ, tableClothes, true)
				    	 end
			    	 else
				         local name, skinid, argument_1, argument_2, typ = getNameIdShader(tabela[nunAction][3])
			             triggerServerEvent('rzk:set:player:skin', resourceRoot, localPlayer, tabela[nunAction][2], shaderID, typ, tableClothes, false)
			    	 end
		    	 else
	    		     removePedClothes (localPlayer, tabela[nunAction][4])	 
				 end
				 delay = setTimer(function() end, 5000, 1)
			 else
			     exports.Infos:serverNotification("info", "Aguarde alguns segundos para realizar uma nova ação.", 10, 5)
		  	 end
		 end
	 end
end

function back ()
     if nunAction then
	     if not aba and panel then
		     removeEventHandler("onClientRender", root, rzk_clothes)
	         tabela = nil
	         unbindKey('pgdn', 'down', up)
	         unbindKey('pgup', 'down', down)
	         unbindKey('enter', 'down', enter)
	         unbindKey('backspace', 'down', back)
			 panel = false
		 else
		     nunAction = 1
		     tabela = menu_principal
			 menu = 'LOJA DE ROUPA'
			 aba = false
			 valor = false
			 triggerServerEvent('rzk:original:clothes', resourceRoot, localPlayer)
		 end
	 end
end

function down ()
   --  if tabela then
	      if nunAction > 1 then
		     nunAction = nunAction - 1
			 if aba then
			     if menu == 'EXTRAS' or menu == 'ÓCULOS' or menu == 'RELÓGIO' or menu == 'BANDANA' or menu == 'CORRENTE' then 
				     local Texture, Model, Typ = getNameIdShader(tabela[nunAction][3])
					 addPedClothes(localPlayer, Texture, Model, Typ)
				 else
				     if tabela[nunAction][3] ~= 0 then
			             local name, skinid, argument_1, argument_2, typ = getNameIdShader(tabela[nunAction][3])
			    	     addPedClothes(localPlayer, argument_1, argument_2, typ)
			    	     set_custom (localPlayer, name, skinid, argument_1, argument_2, typ)
					 end
				 end
			 end
		 end
	-- end
end

local x,y = guiGetScreenSize()
 function isCursorOnElement(x,y,w,h)
     if isCursorShowing () then
	     local mx,my = getCursorPosition ()
     	 local fullx,fully = guiGetScreenSize()
	     cursorx,cursory = mx*fullx,my*fully
	     if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
	    	 return true
	     else
		     return false
		 end
	end
end

addEventHandler('onClientResourceStart', resourceRoot,
function ()
     if getElementData(localPlayer, 'logado') then
	     setPlayerShaderClint()
		 triggerServerEvent('rzk:get:tabela:all', resourceRoot, localPlayer)
	 end
end)

addEvent('rzk:load:clothes:login:player', true)
addEventHandler('rzk:load:clothes:login:player', resourceRoot,
function (typ, player)
     if typ == 1 then
         if getElementData(localPlayer, 'logado') then
	         setPlayerShaderClint()
		 end
	 else
	     local allShadersString = getElementData(player, "rzk:player:clothes")
		 if allShadersString then
		     local argument, getc = descompTable(player, allShadersString)
		     if argument then
		         setShaderDescomp(player, getc)
			 end
		 end
	 end
end)

function engineShader (states) 
     if states == true then
         local player = nil
         for i = 1, #getElementsByType("player") do
		     player = getElementsByType("player")[i]	 
   	         triggerEvent('rzk:load:clothes:login:player', resourceRoot, 1, player)
		 end
	 elseif states == false then
	     local player = nil
         for i = 1, #getElementsByType("player") do
		     player = getElementsByType("player")[i]	
			 if getElementData(player, 'logado') then
			     local allShadersString = getElementData(player, "rzk:player:clothes")
		         if allShadersString then
	        		 local argument, getc = descompTable(player, allShadersString)
	        		 local value = nil
	                 for i = 1, #getc do
	                	 value = getc[i]
						 local id = tonumber(value)
	         	         local name, skinid, argument_1, argument_2, typ = getNameIdShader(id)
						 if id >= 119 and id <= 182 then
						 else
						     local shad = dxCreateShader('tex_replace.fx', 0, 0, true, 'ped')
	        	     		 engineRemoveShaderFromWorldTexture( shad, name, player )
						 end
					 end
				 end
	         end 
		 end
	 end
end

function descompTable (thePlayer, tabela, typ)
     local allShadersString = tabela
	 local myclthes = split(allShadersString, 44)
	 local getclothes  = {}
	 for i=0, 17, 1 do
	     if myclthes[i+1] then
	         table.insert(getclothes, myclthes[i+1])
		 end
	 end
	 return true, getclothes, allShadersString
end

function setPlayerShaderClint()
local players = getElementsByType("player")
local player = nil
	 for i = 1, #players do
		 player = players[i]
         local allShadersString = getElementData(player, "rzk:player:clothes")
		 if allShadersString then
		     local argument, getc = descompTable(player, allShadersString)
		     if argument then
		         setShaderDescomp(player, getc)
			 end
		 end
	 end    
end

function setShaderDescomp(player, getc)
local value = nil
	 for i = 1, #getc do
		 value = getc[i]
		 local id = tonumber(value)
		 if id >= 119 and id <= 182 then
		     local Texture, Model, typ = getNameIdShader(id)
			 triggerServerEvent('rzk:set:app:clothes', resourceRoot, player, Texture, Model, typ)
		 else 
		     local name, skinid, argument_1, argument_2, typ = getNameIdShader(id)
		     if skinid then
		    	 addPedClothes(player, argument_1, argument_2, typ)
			     set_custom(player, name, skinid, argument_1, argument_2, typ)
			 end
		 end
	 end    
end

Client da pastade onde ele exporta as fontes.


function getFont (font)
     if font == "f1" then
	     return dxCreateFont('fonts/font_1.ttf', 20) or 'default'
	 elseif font == "f2" then
	     return dxCreateFont('fonts/font_2.ttf', 80) or 'default'
	 elseif font == "f3" then
	     return dxCreateFont('fonts/font_3.ttf', 20) or 'default'
	 elseif font == "f4" then
	     return dxCreateFont('fonts/font_4.ttf', 20) or 'default'
	 elseif font == "f5" then
	     return dxCreateFont('fonts/font_5.ttf', 20) or 'default'
	 elseif font == "f6" then
	     return dxCreateFont('fonts/font_6.otf', 20) or 'default'
	 elseif font == "f7" then
	     return dxCreateFont('fonts/font_7.otf', 20) or 'default'
	 elseif font == "f8" then
	     return dxCreateFont('fonts/font_8.otf', 20) or 'default'
	 elseif font == "f9" then
	     return dxCreateFont('fonts/font_9.otf', 20) or 'default'
	 end
end

 

A pasta que o client side da loja tenta exportar está como "Fonts" eu não mudei, porém não aparece, não consigo resolver, me ajude pfv!!

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