Jump to content

Tekken

Helpers
  • Posts

    1,423
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Tekken

  1. You trigger the event from server side to all clients with the player you change the animation and you check on each client if the player in cause is on screen and if so trigger the animation. This way all clients that are looking at the player will see the animation. There might be a better way I haven’t tested the animation functions yet.
  2. That part should take away the error will not 'fix' the code but will take away the error.
  3. Tekken

    [HELP]Jobs

    Have you tried?
  4. I suggest you using the global variable ´localPlayer’ instead of calling getLocalPlayer() function that use less CPU. Also when you know you will use the same function in the same part of code multiple times you may want to declare a variable to save CPU
  5. Both community and github got some optimizations go ahead and check them out! Thank you to @majqq
  6. Well you check the skin it have and save it into playerAccount and when he joins you load, just a simple account system
  7. Depending on your hud you can use dxDrawImage that will got drawn just before the player blip, not easy I suppose.
  8. Well here we go https://github.com/mihayy5/attachToBones I'm sure there is a lot to be improved so take a look.
  9. Thank you, I will take a look later, the versions I took from wiki "onClientPedsProcessed". I will have to check if objects and/or ped exists and if not to delete the entry from table, will be fixed in the next version.
  10. How much you have? Objects and markers and stuff that disappear ?
  11. Tekken

    New weapons

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

    New weapons

    Hmm, I have did this once, I will give you a texture with alpha 0 so you can do your thing. When I’m home.
  13. Tekken

    New weapons

    I said clear image not white img
  14. Tekken

    New weapons

    You change m4 skin to a clear image That makes it invisible
  15. Tekken

    New weapons

    Yes you can set M4’s alpha to 0 and create an abject attached to players hand whit another weapon skin, you can add as many as you want, for damage you will have to do a custom damage system but for accuracy I’m not sure.
  16. Please use English is English section !
  17. Is this client ? You sure it’s localplayer and not localPlayer ?
  18. You can do table = { ["item1"] = "Sandwich", ["item2"] = "Water", -- etc }; Is that what you need?
  19. I was looking for the credits but couldn’t find them thank you very much I will update as soon!
  20. 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!
  21. Tekken

    stack overflow

    may we see the exact line? also instead of putting a timer for a specific player server side you may do it client side
×
×
  • Create New...