Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 17/01/21 in all areas

  1. MAP Converters Some basic map converters that may be useful. https://mtaclub.eu/converters Please let me know if you find a bug!
    1 point
  2. pAttach Optimized bone attach thanks to the new MTA functions/events. This resource doesn't match with well known bone_attach, you can not use the same parameters! Documentation moved to GitHub! Go to GitHub...
    1 point
  3. 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
  4. Good work. I was waiting for a long time for this bug to get fixed so i could write a better bone attachement function.
    1 point
  5. No worries, I've sorted out the title. Cheers
    1 point
  6. Oh, sorry! I forgot that you have time limit to edit a post/topic. Only moderators can. Nevermind...
    1 point
  7. Hey, i'm kinda new on this forum and i can't find any option to edit the posts not even mentioning threads. Can you tell me how do i do that so i can edit that?
    1 point
  8. Thanks for the information. @Dutchman101
    1 point
  9. Hi. I uploaded a new version of the resource, download it and use like this: <meta> <pDownloader>true</pDownloader> <!-- STEP 2 - enable pDownloader --> <!-- script file isn't needed --> <!-- STEP 3 - disable downloading with download="false" attribute --> <!-- and set model ID for the model-loader with model="ID" attribute--> <file src="files/city.txd" download="false" model="3048,3522" /> <file src="files/Land_areia.dff" download="false" model="3048" /> <file src="files/Land_areia.col" download="false" model="3048" /> <file src="files/Land_areia_1.dff" download="false" model="3522" /> <file src="files/Land_areia_1.col" download="false" model="3522" /> </meta>
    1 point
  10. It would be nice to mention that's possible due of work of @Einheit-101 and @Saml1er
    1 point
  11. local sql = executeSQLQuery addEventHandler('onResourceStart',resourceRoot,function() sql('CREATE TABLE IF NOT EXISTS ´AccountsRegister´ (IP TEXT)') end) function isIPRegister(jugador) local user = jugador or client or source if not user then return end local qh = sql('SELECT IP FROM ´AccountsRegister´ WHERE IP=?',getPlayerIP(user)) -- Devolverá true si es que ya hay cuentas creadas con la dirección IP y false cuando no existan cuentas return #qh > 0 end function registerIP(str) sql('INSERT INTO ´AccountsRegister´ (IP) VALUES(?)',str) end addEventHandler('onPlayerCommand',root,function(cmd) if cmd == 'register' then if isIPRegister(source) then outputChatBox('Esta dirección IP ya tiene una cuenta asociada',source,255,0,0) else registerIP(getPlayerIP(source)) outputChatBox('Ahora tu cuenta tiene una dirección IP asociada!',source,0,255,0) end end end) Podrías intentar esto, no lo he probado, pero debería funcionar de manera correcta en cuanto a lo que pides.
    1 point
  12. تم تحديث اسعار وخطط خوادم اللينكس و خوادم الويندوز https://tapleto-host.net/ar/LinuxVPS.php https://tapleto-host.net/ar/WinVPS.php
    1 point
  13. Introduction This guide intends to teach 3ds Max users the basics, and more advanced ways, of working with (environment) animations and rigs to enhance atmosphere of the game. Animations, moving images or however you name it, they are there, everywhere in games. GTA San Andreas and its predecessors do utilize animations, however to a limited extent; most environment models were kept frozen in the dark days of PC games to save computer resources. Few objects like mechanical oil drills and food store mascots are animated. Today we're past those days and have advanced in technology to exceed limits, and integrate known resource demanding features into our games without much of a performance impact. It's important to keep in mind that the Renderware engine has various limitations associated with models/3D assets. These limitations do apply very harsh on what this guide covers. Table of contents Demo reel - Custom rigs and animations Prerequisites Recommended Character skeleton Basics to skinning Simulation conversion to bones workflow Demo reel - Custom rigs and animations Prerequisites Must have Autodesk 3ds Max of any desired version. 2017+ needed to speed up cloth rigging. Must have Kam's Maxscripts. Must have Animation Manager tool. Recommended You can use virtually any modeling or animation software e.g Blender or Cinema 4D to do 90% of the work. 3ds Max is required to export to GTA formats IFP and DFF. It's recommended to have experience in game modding and 3D modeling software of choice. It's highly recommended to use Shagg_E's anim/char helper for easy setup of bones and animation. For those who calculate bone hierarchy, add SPunknown = 4 to Root bone's object property. It's possible to use ARKTOS Tools VertexToBones for converting vertex-baked animations to bone animations. It should be noted however that this does not create bone hierarchy the desired way. It creates bones that aren't linked to each other, only the root, so it generates the animation for each bone to move, not rotate, and thus the majority of the animation relies on position keys, where SA animations only support rotation keys. Character skeleton San Andreas uses bones for its character animations. These bones are linked together, forming a skeleton with joints that can be rotated. Motion capture data can be transferred onto bones to ease the creation of character and more detailed animations. This was done for GTA cutscene models primarily. On 3ds Max, bones can be virtually anything, ranging from camera's to dummies. When exporting to GTA formats, the bone objects are automatically converted into dummies (helpers). This is how bones worked in early 2000's and/or 90's. If you desire to convert a helper or model into a dummy, follow this CGTalk post's instructions. For creating a skeleton, place all bones around the inner mesh of the model. Everything must be in a hierarchy and bones can have as many children as desired. Naming conventions are only recommended for easier overview, however they can be named according to one's desire e.g Bone_0 - Bone_12. To have the bones show the way the imported skins ones do, head to Display Panel under Links, and check both boxes. Make sure this is done for every bone. This will display joint links in correct hierarchy in viewport. Some games may use vertex baked animations, thus negating the need for bones. This is often seen on models such as all types of clothing. For game engines that do not support vertex animation or dynamic cloth, bones will be used instead. Below is a spoiler of valid bone ID's for regular ped models. There are 31 functional bone ID's, 32 with Root included. Once again, bones does not have to use same naming convenience as presented below. They also don't have to use same order of ID's or bone hierarchy, so for instance, Pelvis and Jaw ID's can be exchanged, as long as Root ID = 0. Or, the Head bone can be child of R Hand, not necessarily the Neck. Basics to skinning Although not hugely covered in this guide; Skinned models use a different system from vehicles and map objects. Besides having their 3D mesh, they have a skeleton. A skeleton is made of bone joints linked to each other, so that when the shoulder moves, the lower arm does as well. A bone will only affect part of the mesh that it's weighed to. If you weigh all vertices of the player's hat to the Head bone, then the hat will move according to the head bone. If you weigh all of the hat's vertices to the Pelvis bone, then the hat will stay static in air while the head moves. All vertices must be affiliated with at least one bone. Although a skin can have 32 bones, it'll work just fine if you weigh all vertices to only 3 bones. Not all bones require to be affiliated with a vertex. If you try to export a skinned model where 1 vertex is not weighted, the exporter will reject your request to export or your game will crash. A skin can have as few as 2 bones (root and children), so if your model has only 8 vertices, there's really no point having 32 bones when only 8 are functional. Below image (credits: IamObama) shows the basics to weighing joints to a character mesh. While this doesn't show all of the bones, it can prove very helpful as a lookup while weighing vertices to your skin. You can also load in a GTA ped to reference its miscellaneous bones e.g facial and fingers. Simulation conversion to bones workflow Note: The following process or techniques may apply for Blender/Maya users as well. 3ds Max has inbuilt cloth physics. These can simulate with help of gravity, wind, etc. and is a great way to generate animations for cloth-like elements. With help of tracking markers, you can track a bone to follow the orientation of a marker, which can then be baked into keyframes. The process is incredibly simple, you just have to understand the basics of cloth physics and object constraints. Video tutorial: Text tutorial: Create your model simulation model Be mindful about geometry and bone count when creating your model. The fewer polygons, the more rough the animation will be. The more polygons, the more cloth-like it'll look. The more bones with keyframes, the larger the file size (lots) of your IFP. For flags, one bone should never have full influence of a vertex. A vertex should always be affected by 2 or more different bones for a nice blend. It may be an idea to load in a GTA model so that you can somewhat reference the scale, if you don't have access to a dimension ruler. For the purpose of the guide (assuming you follow along the video), create a plane (primitive) with 8 segments in both directions. Make it length: 1,280 meter, width: 848 millimeters. Prepare your simulation model Convert the primitive to either editable mesh or editable poly. Polygon mode is more sustainable for modeling, but it needs to be in Mesh mode once you export it. Enable angle snap (default: A) and rotate it so it stands vertically. On the Hierarchy tab, reset transform to reset rotation values to 0. Add a Cloth modifier to your model. Go to sub-object level group of cloth modifier. Select the vertices that you want to act as solid points (e.g ones attached to flagpole). Click Drag as group mode. Simulate the model Head to Create tab > Space warps. Create a wind. Its position doesn't matter, only the rotation which represents the direction, matters. The default settings of the wind are usually too high. Try setting strength: 0,12, Turbulence: 0,8, Frequency: 0,05. Select the simulation model. On the cloth modifier, select Cloth forces and choose the wind. On the same interface, select Object properties. Select the model's name, then select Cloth, then pick a preset of your preference. Try silk or cashmere. You can optionally use Edge springs. I'm not fully sure what it represents, but I believe it's got to do with keeping the edges intact and not stretching them (which you don't want for bone animations). Try simulating the model. You may want to increase the timeline to a more reasonable duration, but be cautious as the higher it goes, the more your potato will suffer. If you aren't happy with the simulation, erase it and it'll let you try resimulate it. If you're unlucky enough to get the infamous error message dT increased/decreased you may want to start a new 3ds max project file... Create your real model In most cases you'll simply clone the simulated model, name the clone skin_mesh (name can be anything, but for easier scene management, name it something related). Remove the cloth modifier from your "real" model. For the simulated model, select the create keys button in cloth modifier. This will collapse your modifier and bake animation into keyframes, can NOT be reverted! Move the simulated model a bit away from the skin mesh, so that it'll make it significantly easier for a later procedure. Make sure to center the skin mesh to 0,0,0 or you'll get real trouble later. Convert the model to editable mesh. When you need to export later, it doesn't want it as editable poly. Create bones for your model Apply a Skin modifier to your model. This is used to carry the skeleton bones for later on. To make the bone creation and setup a whole lot easier, run Shagg_E's animation tools (link in top of thread). If you simply choose to create a set of dummies, his script won't recognise them as bones and you'll have to add all the object properties manually. So do yourself a favor and use his tool. Navigate to the Char helper section on the interface. Click create root, this'll create a dummy in center of the scene, assuming it corresponds to the model's center. Click create children, this'll create a dummy linked to the root. Drag it out from the model and title it "Pelvis" (again naming doesn't matter, can be "sampsucks" and samp modders will know once they load in your skin!). This bone is usually needed to keep part of the model's verts (abbreviation for vertices) in place, e.g flag pole attachments. Keep creating children bones until you reach your desired amount. It's a good idea to enable snaps (to vertex) so that you can magnet position bones directly onto the vertices. Select any bone in hierarchy and click Calculate for all hierarchy. This calculates bone ID's, bone index and bone type. If you were to set this yourself, you would need to understand how they work, on top of this it would be very time consuming. So we can all thank Shagg_E for making this wonderful script. Select the root bone, head to object properties, in user defined add to the string SPunknown = 4 or else your skin won't work as intended. Prepare motion tracking Create motion tracking markers. Head to create tab -> helpers -> point helper. Keep their scale at .2 or so. Spawn the amount equivalent to the amount of functional bones (excluding root and pelvis). Select all of the point helpers. Under the Animation rollout, select constraint -> attachment constraint -> select the simulated model. Go to Motion tab. The positions are based on triangle points, so you have to insert either 0 or 1 on A and B, then pick a face. It'll make more sense if you watch the video. You need to position the point helpers to the vertices where the bones are positioned at. I don't know of any more efficient way of doing this. On the model's skin modifier, add all functional bones (except root and pelvis). If you're running Max 2017+, you can use Voxel Solver to automate rigging (rough solution) and works great for simulated models. Use setting: falloff 0,2, max influence 3, max resolution 128. Try rotating some bones and hopefully they should affect the skin mesh. Now add the rest of the bones which you didn't rig to the model. If the model is a flag, then select a few vertices that you want to be solid in place, and weight those to pelvis at 100 weight. Track the motion of the simulated model Select all point helpers, click E for rotate, click F12 for rotate transforms and reset all 3 axis to 0. If you don't, some of your bones will be rotated massively (undesired). Apply an orientation constraint to all of your bones, 1 by 1, to their point helper counterpart. This tracks the rotations of the point helpers onto the dummy bones. You can add a shortcut to speed this up a tad... Select all the functional bones. Go to motion tab, click trajectories. This is where you bake the orientation constraints into keyframes for your bone animation. Settings below. Start time = 0 by default, or the first frame of your timeline End time = last frame of timeline OR whenever you desire Samples = amount of keys for the animation. If Start = 0, End = 1500, you can add 1500 samples to have 1500 keys generated, or 150 to have 150 keys generated. Don't use much more than 200 samples or you'll get in serious trouble. You'll have to optimize your keyframes at some point. You can change the keyframe tangent mode (i prefer auto or spline) to change the velocity of the keyframes. Once everything is set, click collapse. This generates keyframes. Animation is now made. Making the cloth simulation seamless/loop is another story. Finishing up Custom model and custom IFP is essentially done now. In order to export animation from 3ds Max, simply select all bones, find an IFP file on your computer and clone it, on 3ds Max run the IFP script, click "load IFP" and then save your custom animation to the cloned IFP file. You can remove excess IFP animations from the IFP archive by using Animation Manager Tool. Have fun with it! There was a recent update where MTA made a couple dozens of unused ped ID's available for servers to use. This is what inspired me to make this guide, since you could use those ID's to "add" new models, of which could be environment models to bring life to the world. Custom IFP's can simply be added into the server, they don't need to replace existing ID's. It's important to note that by changing bone ID's, you change the way that the custom model reacts to default animations. As such, models like banners will appear incredibly distorted. In those cases it's suggested to create some idle, walkstyle and run animations. It's also important to note that you can create LOD animations, since there's really no limit for how many IFP's a server can have. LOD animations may be very handy for animations that have highly dense simulations applied, so the further away the player goes, the less keyframes will be processed.
    1 point
  14. Server has closed down as the project failed, sorry.
    0 points
×
×
  • Create New...