-
Posts
1,423 -
Joined
-
Last visited
-
Days Won
19
Everything posted by Tekken
-
How can I show the animation to each player? (.ifp)
Tekken replied to SoManyTears's topic in Scripting
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. -
That part should take away the error will not 'fix' the code but will take away the error.
-
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
-
Well you check the skin it have and save it into playerAccount and when he joins you load, just a simple account system
-
Depending on your hud you can use dxDrawImage that will got drawn just before the player blip, not easy I suppose.
-
How much you have? Objects and markers and stuff that disappear ?
-
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.
-
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.
-
Please use English is English section !
-
Is this client ? You sure it’s localplayer and not localPlayer ?
-
You can do table = { ["item1"] = "Sandwich", ["item2"] = "Water", -- etc }; Is that what you need?
-
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!
-
may we see the exact line? also instead of putting a timer for a specific player server side you may do it client side