SoManyTears Posted January 13, 2021 Share Posted January 13, 2021 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 comment
Hydra Posted January 13, 2021 Share Posted January 13, 2021 Trigger the event in server-side? Idk if will work but you can try Link to comment
Tekken Posted January 13, 2021 Share Posted January 13, 2021 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 comment
Scripting Moderators ds1-e Posted January 13, 2021 Scripting Moderators Share Posted January 13, 2021 As you did, onClientResourceStart, get all players and replace animation for them, and also onClientPlayerJoin, in case of latejoiners. Link to comment
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