SetPSLimit: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Welcome| desc=Sets PS (Passenger Sync) Limit of automatically syncing while inside as passenger.| params=<syntaxhighlight lang="lua">(n)</syntaxhighlight> <poem>::n: The num...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Welcome| | {{Welcome| | ||
desc=Sets PS (Passenger Sync) Limit of automatically syncing while inside as passenger.| | desc=Sets PS (Passenger Sync) Limit of automatically syncing while inside as passenger with a driver. If this value is 2, then program waits for 2 update packets of player who is driver of the vehicle and sends a passenger sync to server. The default value is 2.| | ||
params=<syntaxhighlight lang="lua">(n)</syntaxhighlight> | params=<syntaxhighlight lang="lua">(n)</syntaxhighlight> | ||
<poem>::n: The number of player update packets( PLAYERUPDATE_DRIVER ) to wait before sending an automatic passenger sync packet. If high accuracy needed, use -1 to disable automatic syncing and use [[SendPassengerSyncData]]</poem>| | <poem>::n: The number of player update packets( PLAYERUPDATE_DRIVER ) to wait before sending an automatic passenger sync packet. If high accuracy needed, use -1 to disable automatic syncing and use [[SendPassengerSyncData]].</poem>| | ||
example=<source lang="lua"> | example=<source lang="lua"> | ||
SetPSLimit(1);//Sending one sync packet per incoming update packet of driver | SetPSLimit(1);//Sending one sync packet per incoming update packet of driver |
Latest revision as of 08:07, 23 December 2022
Description:
Sets PS (Passenger Sync) Limit of automatically syncing while inside as passenger with a driver. If this value is 2, then program waits for 2 update packets of player who is driver of the vehicle and sends a passenger sync to server. The default value is 2.
Parameters:
(n)
n: The number of player update packets( PLAYERUPDATE_DRIVER ) to wait before sending an automatic passenger sync packet. If high accuracy needed, use -1 to disable automatic syncing and use SendPassengerSyncData.
Return Values:
This function does not return any specific values.
Important Note:
This was added in v1.5 patch 1.
Example
SetPSLimit(1);//Sending one sync packet per incoming update packet of driver
Related Functions
The following functions may be helpful as they relate to this function in one way or another.