SA-MP Forums Archive
TDM bug - 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: TDM bug (/showthread.php?tid=135718)



TDM bug - RenisiL - 21.03.2010

Hello, I have a problem: I have amde and TDM system, that when match ends player gets teleported to another area, but if new player connects, he gets teleported to an old area if it has changed. any ideas how to fix it?

If you need a part of my script, post it here.

RenisiL


Re: TDM bug - Fabio11 - 21.03.2010

You can make a easy variable like

pawn Код:
new Stage;
And then

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(Stage == 1)
    {
        SetPlayerPos(...)
    }
    else if(Stage == 2)
    {
        SetPlayerPos(...)
    }
...
Edit: When the match ends you must do this:

pawn Код:
Stage = (NewStage);