SA-MP Forums Archive
How to disable bullet sync when paused and langcomp on? - 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: How to disable bullet sync when paused and langcomp on? (/showthread.php?tid=630423)



How to disable bullet sync when paused and langcomp on? - iSanchez - 14.03.2017

Hello, I am having crash problems with my sa-mp server and... I know the problem.

The problem is what when you're paused and someone shoot you lots of times, those bullets are keeped "unsynced" and when you unpause the game, you receive them (producing crash most of the times).

How I can prevent this?

I have a variable to know if someone is paused, but.. is there any possibility to unsync the bullets when shooting on a paused player? If so.. what is it?

Thank you in advance!


Re: How to disable bullet sync when paused and langcomp on? - Toroi - 14.03.2017

You could disable the hitter's damage under OnPlayerWeaponShot if their target is paused, but that'd wouldn't work out as the players will just pause when they are in danger.

You could also create your server-sided health system, so you can prevent any type of damage whenever you feel like it.

That's all I can say, i've never faced this problem.


Respuesta: Re: How to disable bullet sync when paused and langcomp on? - iSanchez - 14.03.2017

Quote:
Originally Posted by Troydere
Посмотреть сообщение
You could disable the hitter's damage under OnPlayerWeaponShot if their target is paused, but that'd wouldn't work out as the players will just pause when they are in danger.

You could also create your server-sided health system, so you can prevent any type of damage whenever you feel like it.

That's all I can say, i've never faced this problem.
I don't care too much if players pause to prevent kill, there are admins who ban them.

I tried to desync the bullet in OnPlayerWeaponShot with
Код:
if(hittype == ...PLAYER){
if(IsPlayerConnected(hitid)){
if(IsPlayerPaused(hitid)) return 0;

}

}
but it didn't work, when the player unpauses, receives the bullets like a "compression" or something, massive bullets!