Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/01/21 in Posts

  1. Hi MTA community recently I was browsing the useful functions list and I saw a new and interesting function available from version 1.5.8 r20704 onwards: attachElementToBone() and using the "onClientPedsProcessed" event. After seeing that this function gives better accuracy and better performance than 'bone_attach' resource I told myself why not making a new bonne attach resource, so this is what I did basically just using the function and the event I just created a synchronization between client and server with tables. Thank you to Einheit-101 and Saml1er for they’r hard work. Also thank you majqq for pointing me they’re credits! I called it attachToBones you can download it here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18372 GitHub (If you want to help): https://github.com/mihayy5/attachToBones It contains 2 server-side exported functions: attachElementToBone(theElement, thePed, boneID, offsetX, offsetY, offsetZ, rotationOffsetX, rotationOffsetY, rotationOffsetZ) theElement: The element which should be attached to the ped/player bone. Should work with any element that is supported by matrix functions. thePed: The ped or player which the element should be attached to. boneID: The target bone where the element should be attached to. offsetX: The X position offset from the bone. offsetY: The Y position offset from the bone. offsetZ: The Z position offset from the bone. rotationOffsetX: The rotation X-axis offset from the bone, in degree. rotationOffsetY: The rotation Y-axis offset from the bone, in degree. rotationOffsetZ: The rotation Z-axis offset from the bone, in degree. NOTE: rotationOffsetX, rotationOffsetY and rotationOffsetZ are automatically converted to radians! For a list of bone ID you can check the wiki page : attachElementToBone detachElementFromBone(element) element: The element which should be detached from the ped/player. VERY IMPORTANT ! THE OFFSETS ARE NOT COMPATIBLE WITH THE ONES FROM 'bone_attach' so you may have to rework all the positions. You can quickly test using those 2 test functions Code: /atest - to attach a sniper to player hand and a parachute to his back. /dtest - to detach them! Hope you find it useful! Cheers. P.S. PLEASE take note that I did not tested it with more than one player online so I will appreciate ALL feedback you can give!
    1 point
  2. Here you have it: https://mega.nz/file/B5x0QLTJ#2D7-zCKvnjRilBTK0b3JT8KStyigrk1alj1C1cQKre0 If you replace the sniper with this one keep in mind that you won't see the crosshair so you will have to apply this one: https://mega.nz/file/ApQCnajL#slnMQfp9uvWMT2NGT2S3LsjtAwpZ8eA-aznaLWs0iB4 Just for the sniper so you can see the crosshair.
    1 point
  3. 1 point
  4. So the resources page looks like this site did in 2007
    1 point
  5. Opa, tudo bom? Vim traduzir um tutorial gringo que foi criado aqui no forum do MTA mesmo pois achei interessante. Ele basicamente envia mensagens do seu servidor até algum canal do Discord. *todos os passos possuem uma imagem para auxiliar. Clique no spoiler para vê-la. PASSO 1: Para que o script envie mensagens para o Discord, iremos utilizar um WebHook. Comece criando um. (Botão direito no canal > Editar Canal > Integrações > Webhooks > Novo Webhook) PASSO 2: Insira as informações do WebHook (nome e canal) e clique em Copiar URL do webhook PASSO 3: Efetue o download do script e coloque-o em seu servidor. Download Clique em Code > Download ZIP PASSO 4: Ele irá fazer o Download de um arquivo chamado mtasa-dcwebhook-master.zip Utilizando o WinRar, clique com o botão direito e clique em Extrair Aqui. Renomeie a pasta que foi extraída para webhook PASSO 5: Abra a pasta webhook e edite o arquivo webhookS.lua Na parte superior, altere "url" pelo seu link do webhook. Lembre-se de mantê-lo entre aspas. PASSO 6: Salve o arquivo que editou, feche-o, e mova a pasta para os arquivos do seu servidor. Pronto Agora você pode enviar mensagens para o Discord usando outro script ou utilizando /dcmessage. Método para utilizar em outro script: exports.webhook:sendDiscordMessage("seu texto") É possível que você precise declarar a versão no meta.xml. Para isso, abra o meta.xml do webhook e altere para: <meta> <info author="MrZsemle" name="Discord webhook messages" /> <script src="webhookS.lua"/> <min_mta_version client="1.5.4" server="1.5.4-9.11413"/> <export function="sendDiscordMessage" type="server" /> </meta> Créditos: Tradução e Postagem em Português: SrPattif Postagem em Inglês: MrZsemle Desenvolvedor do Script: MrZsemle
    1 point
  6. C'est cool comme script ! Il existe également l'alternative gratuite faire par l'équipe MTA pour les fichiers .lua : https://luac.multitheftauto.com/ Pas de soucis
    1 point
×
×
  • Create New...