OnPlayerEnterDynamicArea - doesn't apply on high speed - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerEnterDynamicArea - doesn't apply on high speed (
/showthread.php?tid=574580)
OnPlayerEnterDynamicArea - doesn't apply on high speed -
ranme15 - 18.05.2015
Hey,
I got areas instead of pickups (had many problems with pickups and also I needed to increase the area that player should stand at to pickup). The problem is, when I drive too fast - the code doesn't affect, only when I drive slow (not that slow). What solutions can I use to fix it?
Thanks in advance
Re: OnPlayerEnterDynamicArea - doesn't apply on high speed -
Yashas - 19.05.2015
Assuming that you are using streamer.Players positions are compared with pickup,checkpoint,etc positions to check if the player is on a checkpoint/pickup/etc every X milliseconds.X is 50ms by default.
Use Streamer_SetTickRate(rate) and set the rate to 20 or less.By default streamer updates every object/cp/pickup/etc every 50ms.So if you cross the pickup/checkpoint/etc within 50ms and you did it between two cycles then streamer won't detect you passing through the checkpoint/pickup/etc.By decreasing this rate, the CPU usage might go higher.
Re: OnPlayerEnterDynamicArea - doesn't apply on high speed -
ranme15 - 19.05.2015
Quote:
Originally Posted by Yashas
Assuming that you are using streamer.Players positions are compared with pickup,checkpoint,etc positions to check if the player is on a checkpoint/pickup/etc every X milliseconds.X is 50ms by default.
Use Streamer_SetTickRate(rate) and set the rate to 20 or less.By default streamer updates every object/cp/pickup/etc every 50ms.So if you cross the pickup/checkpoint/etc within 50ms and you did it between two cycles then streamer won't detect you passing through the checkpoint/pickup/etc.By decreasing this rate, the CPU usage might go higher.
|
I will try, thanks.