SoManyTears 2 Posted January 13 Share Posted January 13 Because the codes are client-sided, the players cannot see each other's animation.Which event or function should I use on the server side for the players to see each other's animation? I really need help. local animTable = { ifp = {}, anims = { "abseil", "ARRESTgun", "ATM", "swat_run", "Swim_Tread", "Tap_hand", "Tap_handP", "turn_180", "Turn_L", "Turn_R", "WEAPON_crouch", "XPRESSscratch" } } addEventHandler("onClientResourceStart", resourceRoot, function () animTable.ifp["block"] = "ped" animTable.ifp["ifp"] = engineLoadIFP("ped.ifp", animTable.ifp["block"]) for _, v in ipairs(animTable.anims) do engineReplaceAnimation(localPlayer, "ped", v, animTable.ifp["block"], v) end end ) Link to post
Hydra 36 Posted January 13 Share Posted January 13 Trigger the event in server-side? Idk if will work but you can try Link to post
Tekken 146 Posted January 13 Share Posted January 13 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. Link to post
Scripting Moderators srslyyyy 175 Posted January 13 Scripting Moderators Share Posted January 13 As you did, onClientResourceStart, get all players and replace animation for them, and also onClientPlayerJoin, in case of latejoiners. Link to post
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now