Do not allow matches at the same time. - 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: Do not allow matches at the same time. (
/showthread.php?tid=620665)
Do not allow matches at the same time. -
GranaT3 - 01.11.2016
Hello.
How could avoid events that run exactly the same time?
example:
*Two players are killed just at the same time, how I can pick a winner if the two died at the same moment?*
EDIT: fixed
Re: Do not allow matches at the same time. -
oMa37 - 01.11.2016
OnPlayerDeath, It's impossible to players get killed at the same time, There would be at least 1s between them.
Respuesta: Do not allow matches at the same time. -
GranaT3 - 01.11.2016
Exact. But I have to determine a winner, but because both come out as winner.
Re: Respuesta: Do not allow matches at the same time. -
rt-2 - 01.11.2016
Quote:
Originally Posted by GranaT3
Exact. But I have to determine a winner, but because both come out as winner.
|
Even if both client sends the info at the same time this is what is gonna happen:
The network will feel a collision, tell both client to resend data in a small random amount of time (TCP/IP Layer);
Then someone would come back before the other one inevitably;
Problem solved?;
rt-2