Getting the last player not working. - 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: Getting the last player not working. (
/showthread.php?tid=199350)
Getting the last player not working. -
ZamaXor - 15.12.2010
I have that code that checks if the players is the last alive in the mission and it's not working. When the player is the last alive nothing happen. I checked all the variables are right. What's the problem?
code removed problem solved.
Re: Getting the last player not working. -
iggy1 - 15.12.2010
You need to use a loop inside the LastPlayerAlive function and remove the "playerid" parameter from it too. I don't know if that'll fix your problem but its a problem itself. Because SetTimer isn't passing an id as a parameter. For that you need to use SetTimerEx, but that won't work (for what you need) in OnGameModeInit/OnFilterScriptInit.
Re: Getting the last player not working. -
ZamaXor - 15.12.2010
Quote:
Originally Posted by iggy1
You need to use a loop inside the LastPlayerAlive function and remove the "playerid" parameter from it too. I don't know if that'll fix your problem but its a problem itself. Because SetTimer isn't passing an id as a parameter. For that you need to use SetTimerEx, but that won't work (for what you need) in OnGameModeInit/OnFilterScriptInit.
|
That was easy thank you.