Leaderboard
Popular Content
Showing content with the highest reputation on 24/07/20 in all areas
-
I'm not sure how strong the capabilities in MTA are when it comes to weapon and object component customization, so to hide/show components of a model. What I'd do is do a tuning system for weapons just like cars, where I'd hide/show components depending on which weapon I wanted the player to equip. Something else you could do, which I know works, is applying a zero opacity shader onto a weapon texture, causing it to disappear. You can make use of this shader by having a weapon model with multiple weapon meshes inside - as one mesh combined, but multiple different textures. One last method I'd use is setting weapon invisible and attaching a world object to it. The world object can be set to only be replaced if placed within a colshape, but that would require you to animate the colshape with the player hands. I'm not sure how beneficial that would be. Another way of using world objects is simply permanently replacing unused objects like the 50 casino chips which are duplicates. What this does different is that you are permanently replacing an object, whereas using colshapes you're only replacing an object inside of a colshape.1 point
-
1 point
-
Server-side: -----------------------------------[Acesso painel]---------------------------------------------- function showPanellr(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("DonoPMESP")) then --> Gruop que vai poder abrir o painel ! triggerClientEvent(thePlayer, "GUI", getRootElement()) end end function onResStartlr() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "x", "down", showPanellr) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStartlr) function onPlayerJoinlr() bindKey(source, "x", "down", showPanellr) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoinlr) function cleanAlllr(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "x", "down", showPanellr) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAlllr) function adminTextlr() local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user." .. account, aclGetGroup("DonoPMESP")) then --> Gruop que vai poder abrir o painel ! outputChatBox("Presione 'x' para abrir o Painel Da TAG`s.", source) end end addEventHandler("onPlayerLogin", root, adminTextlr) ----------------------------------------------------------------------- [Add 1] ------------------------------------------------------------------------------ function add1 (thePlayer) if not (isElement(thePlayer)) then return end; local accountName = getAccountName(getPlayerAccount(thePlayer)) if accountName then aclGroupAddObject (aclGetGroup("PMESP"), "user."..accountName) --- Modifique o nome da acl gruop aqui ! -> ("BOPE") <- outputChatBox ("#ffff00[ #00ff00Painel TAG #ffff00] #00ff00Conta '"..accountName.."' Foi Adcionada com sucesso ao Grupo.", client, 255, 255, 255, true) -- Mensagem De Sucesso ! else outputChatBox ("#ffff00[ #00ff00Painel TAG #ffff00] #ff000Conta Não Especificada.", client, 255, 255, 255, true) -- Mensagem De Erro outputChatBox ("#ffff00[ #00ff00Painel TAG #ffff00] #ff000Selecione um Player na Lista.", client, 255, 255, 255, true) -- Mensagem De Erro end end addEvent( "addtag1", true ) addEventHandler( "addtag1", root, add1 ) ----------------------------------------------------------------------- [Remover 1] ---------------------------------------------------------------------------- function del1 (thePlayer) if not (isElement(thePlayer)) then return end; local accountName = getAccountName(getPlayerAccount(thePlayer)) if accountName then aclGroupRemoveObject (aclGetGroup("PMESP"), "user."..accountName) --- Modifique o nome da acl gruop aqui ! -> ("Mude Aqui") <- outputChatBox ("#ffff00[ #00ff00Painel TAG #ffff00] #ff000Conta '"..accountName.."' Foi Removida com sucesso ao Grupo.", client, 255, 255, 255, true) -- Mensagem De Sucesso ! else outputChatBox ("#ffff00[ #00ff00Painel TAG #ffff00] #ff000Conta Não Especificada.", client, 255, 255, 255, true) -- Mensagem De Erro outputChatBox ("#ffff00[ #00ff00Painel TAG #ffff00] #ff000Selecione um Player na Lista.", client, 255, 255, 255, true) -- Mensagem De Erro end end addEvent( "remvtag1", true ) addEventHandler( "remvtag1", root, del1 ) ---Verificar contas com tag-- function check( ) for i, v in ipairs(getElementsByType("player")) do if (isGuestAccount(getPlayerAccount(v)) == false) then local accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "PMESP" ) ) then --mudar acl setElementData(v, "PMESP", true) else setElementData(v, "PMESP", false) end end end end setTimer(check, 1000, 0) Client-Side --GUI-- local sX, sY = guiGetScreenSize() janela = guiCreateWindow(sX/2-300, sY/2-225, 600, 450, "Painel Tag PMESP", false) botao1 = guiCreateButton(230, 300, 140, 50, "Adicionar", false, janela) botao2 = guiCreateButton(230, 200, 140, 50, "Remover", false, janela) lista1 = guiCreateGridList(10, 100, 200, 300, false, janela) lista2 = guiCreateGridList(390, 100, 200, 300, false, janela) busca1 = guiCreateEdit(10, 73, 170, 23, "", false, janela) busca2 = guiCreateEdit(390, 73, 170, 23, "",false, janela) Lupa1 = guiCreateStaticImage(185, 73, 24, 22, "arquivos/Lupa.png", false, janela) Lupa2 = guiCreateStaticImage(565, 73, 24, 22, "arquivos/Lupa.png", false, janela) Logo = guiCreateStaticImage(270, 73, 60, 57, "arquivos/Logo.png", false, janela) texto1 = guiCreateLabel(10, 50, 150, 20, "Jogadores normais aqui ↓↓↓", false, janela) texto2 = guiCreateLabel(390, 50, 200, 20, "Membros da sua coporação aqui ↓↓↓", false, janela) --CONFIGURAÇÕES DO GUI-- guiSetVisible(janela, false) guiSetProperty(botao1, "NormalTextColour", "FF00FF00") guiSetProperty(botao2, "NormalTextColour", "FFFF0000") guiSetProperty(janela, "CaptionColour", "FFFF0000") showCursor(true) guiGridListAddColumn(lista1, "Cidadãos", 0.9) guiGridListAddColumn(lista2, "Membros da Corporação", 0.9) --Códigos-- --GUI-- function GUI() if guiGetVisible(janela) then guiSetVisible(janela, false) showCursor(false) else guiSetVisible(janela, true) showCursor(true) ColocarJogadores () ColocarJogadores2 () end end addEvent("GUI", true) addEventHandler("GUI", getRootElement(), GUI) ------------------------------Lista1------------------------------------- function ColocarJogadores () guiGridListClear(lista1)-- Apaga a grid for i, thePlayer in ipairs ( getElementsByType ( "player" ) ) do-- Obtem todos os jogadores local row = guiGridListAddRow( lista1 )-- Agregar row guiGridListSetItemText ( lista1, row, 1, getPlayerName( thePlayer ), false, false ) end end ------------------------------------------------------------------------ function Buscar() guiGridListClear( lista1 ) local nome = guiGetText( busca1 ) for i, thePlayer in ipairs ( getElementsByType ( "player" ) ) do if ( thePlayer ~= localPlayer ) then--Para não buscar a si mesmo if ( string.find( getPlayerName( thePlayer ):lower(), nome:lower() ) ) then--Para buscar o jugador com esse nome local row = guiGridListAddRow ( lista1 )--agregar row guiGridListSetItemText ( lista1, row, 1, getPlayerName ( thePlayer ), false, false )--agregar um row com esse nome end end end end addEventHandler ("onClientGUIClick", busca1, Buscar ,false) --Lista1-- --Lista2-- ------------------------------------------------------------------------ function ColocarJogadores2() guiGridListClear(lista2)-- Apaga a grid for i, thePlayer in ipairs ( getElementsByType ( "player" ) ) do-- Obtem todos os jogadores if getElementData(thePlayer, "PMESP") == true then local row = guiGridListAddRow( lista2 )-- Agregar row guiGridListSetItemText ( lista2, row, 1, getPlayerName( thePlayer ), false, false ) end end end ------------------------------------------------------------------------ function Buscar2() guiGridListClear( lista2 ) local nome = guiGetText( busca2 ) for i, thePlayer in ipairs ( getElementsByType ( "player" ) ) do if ( thePlayer ~= localPlayer ) then--Para não buscar a si mesmo if ( string.find( getPlayerName( thePlayer ):lower(), nome:lower() ) ) then--Para buscar o jogador com esse nome local row = guiGridListAddRow ( lista2 )--agregar row guiGridListSetItemText ( lista2, row, 1, getPlayerName ( thePlayer ), false, false )--agregar um row com esse nome end end end end addEventHandler ("onClientGUIClick", busca2, Buscar2 ,false) --Lista2-- ------------------------------------------------------------------------ -- Botões -- ------------------------------------------------------------------------ function Tag1Name () local jogadorselecionado = guiGridListGetItemText(lista1, guiGridListGetSelectedItem(lista1), 1) triggerServerEvent("addtag1", localPlayer, getPlayerFromName(jogadorselecionado)) end addEventHandler ("onClientGUIClick", botao1, Tag1Name ,false) function remv1Name () local jogadorselecionado = guiGridListGetItemText(lista2, guiGridListGetSelectedItem(lista2), 1) triggerServerEvent("remvtag1", localPlayer, getPlayerFromName(jogadorselecionado)) end addEventHandler ("onClientGUIClick", botao2, remv1Name ,false)1 point
-
Está ae o motivo de não funcionar. Seu meta está errado. Tem que ser server-side. Você precisa destruir o veículo no servidor e não no seu cliente.1 point
-
Faltou o parâmetro de função para obter o jogador que executou o comando. function destruir (thePlayer) if getPedOccupiedVehicle (thePlayer) then destroyElement (getPedOccupiedVehicle (thePlayer)) outputChatBox ("Você destruiu seu veículo.", thePlayer) else outputChatBox ("Você precisa estar dentro de um veículo.", thePlayer) end end addCommandHandler ("dv", destruir)1 point
-
function destruir() if isPedInVehicle(source) then local veiculo = getPedOccupiedVehicle(source) destroyElement(veiculo) outputChatBox("Você destruiu seu veículo", source) else outputChatBox("Você precisa estar dentro de um veículo", source) end end addCommandHandler("dv", destruir)1 point
-
بالتوفيق , لاكن أعتقد انه مثل اي مشروع عربي نسمع كلام ولا نشوف افعاله ..1 point
-
1 point
-
السلام عليكم ورحمة الله تعالى وبركته لوحة تسجيل لدخول للرولي بلاي تصميم جديد و ميجيب لاق رابط التحميل في الفيديو BY MR POP1 point