Xwad Posted April 18, 2019 Posted April 18, 2019 If i create a weapon in client side and fire it through server side, will other players see the gun firing? with other words (to be sure) if the createWeapon is not synched but the fireWeapon is, will other players see the gun firing?
Zorgman Posted April 18, 2019 Posted April 18, 2019 The weapon doesn't exist for the other clients, so it won't fire for them. 1 Dystopia alpha 0.75DOWNLOAD
Overkillz Posted April 18, 2019 Posted April 18, 2019 Check out this. Might it helps you setElementSyncer 1
Moderators IIYAMA Posted April 18, 2019 Moderators Posted April 18, 2019 As @Zorgman said. A way you can bring serverside and clientside elements closer to each other. server local weapon = createElement("weaponS") client local weapons_s = getElementsByType("weaponS", resourceRoot) for i = 1, #weapons_s do local weapon_s = weapons_s[i] local weapon_c = createWeapon(...) setElementParent(weapon_c, weapon_s) end ElementData can be used to transfer the properties and weapon states. Etc. Ect. Ect. This is a method you have to master, can't be learned with one tutorial. 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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