SA-MP Forums Archive
race stops when everyone dies? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: race stops when everyone dies? (/showthread.php?tid=174097)



race stops when everyone dies? - WillyP - 04.09.2010

ok, so maybe your racing and you all die.

but the last person to dies wins the race?

i know it all sounds really complex but is there a way to do it?!


Re: race stops when everyone dies? - pmk1 - 04.09.2010

get players spawned then see who is the last one spawned(alive). do you understand?

like do a function like: SpawnedPlayers[playerid] = 1; on onplayerspawn

then on onplayerdeath SpawnedPlayers[playerid] = 0;

then make a custom callback that will see who is still alive and if there is only one, do like "player has won the race" and then make the race ends and another start


Re: race stops when everyone dies? - WillyP - 04.09.2010

no, i dont understand