SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Discussion

Thread Tools Display Modes
Old 29/12/2018, 07:32 AM   #1
Join Date: Jun 2012
Location: India
Posts: 882
Reputation: 317
Default synchronizing information sent by clients

At IRL time T, player A shot player B. The player A sends information to the server about the shot (and other information) which is received by the server at time X. Player B keeps sending information every now and then.

In IRL time T, the player A had some state information (includes player B's state based on which B is rendered on A's screen). Player A's state at IRL time T is received at the server at IRL time X. I somehow need to find out the state of player B as seen by A.

What are the approaches to solving this problem of synchronization?

The player B continuously informs B's state to the server which is relayed to other nearby players based on which things are rendered on their screen. If I were to store the state information relayed by B in an array. How can I efficiently pick the correct state information of B that corresponds to the event that happened at T on A's screen?
Yashas is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP] synchronizing shoots fatlirmorina Scripting Help 3 17/04/2017 03:58 AM
Custom clients h4Xz0R Client Support 0 09/02/2014 05:36 PM
De-synchronizing. iGetty Scripting Help 3 15/11/2012 04:23 PM
[Tutorial] Synchronizing variables in includes KingHual Tutorials 2 29/09/2012 10:28 PM
synchronizing problem BeBest Help Archive 2 10/03/2009 11:30 PM

All times are GMT. The time now is 05:42 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.