Moderators Citizen Posted March 7, 2011 Moderators Share Posted March 7, 2011 If you want object movement made client-side be visible for all players, then do it for all players. MTA doesn't need to have a function for attaching elements to bones. You can already make it yourself. Actually, it would be better to create such attaching system and then use it for helmet. Attaching system could be done in this way:Attachments would be set by changing element data. Something like: setElementData(object,"attached_player",player) setElementData(object,"attached_boneid",boneid) This could be done server-side. Then in client side onClientRender you could loop through all objects, check attachment data and if it exists, get the position of player bone and put an object there. And after creating attachments system, you could use it for helmets. What's more, you could use it for other stuff without the need to rewrite the code. So it's the client who update the position for his player. I like that ! ^^ so the server does almost anything. Very good idea Einheit-101 make your system by this way Link to comment
Einheit-101 Posted March 8, 2011 Author Share Posted March 8, 2011 EDIT:::: THE RESOURCE WORKS NOW!!!! THANKS TO ALL COMMUNITY GUYS WHO HELPED ME! REALLY THANKS! I will upload the modified resource in ~2 weeks with advanced features! :::can be closed::: Link to comment
Wojak Posted March 8, 2011 Share Posted March 8, 2011 I hope you understand how it works, and that some people learned something and stop spreading "single copmuter - server is the only true way - SAMP type of thinking" PS: this may be esential: server addEventHandler ( "onPlayerQuit", getRootElement(),function() helmlist[source] = nil end ) client addEventHandler( "onClientPlayerQuit", getRootElement(), function() helmart[source] = nil destroyElement(helm[source]) helm[source] = nil end ) Link to comment
Einheit-101 Posted March 10, 2011 Author Share Posted March 10, 2011 You made this to destroy the Helmtet after Quit? Thanks, i even didnt thought about that. 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