SA-MP Forums Archive
Death Stadium Spawns - 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: Death Stadium Spawns (/showthread.php?tid=580068)



Death Stadium Spawns - MaxJohnson - 02.07.2015

how can i make that system if player die in death stadium he will spawn from death stadium until he wont leave the death stadium if he leave death stadium then he wont spawn from death stadium if he is inside of death stadium then after every death he must spawn from death stadium please help me to create this system please


Re: Death Stadium Spawns - MaxJohnson - 02.07.2015

no one?


Re: Death Stadium Spawns - Lynn - 02.07.2015

You can do something such as this, then once the player leaves the stadium delete the PVar
Do that by using DeletePVar(playerid, #DeathStad);
This is just one example of doing it, you need to incorporate it into a way that will best fit your gamemode.
If you do not have any programming knowledge then please try to learn what the errors that will be thrown mean. If there aren't any errors, good job. You incorporated it correctly.

pawn Код:
forward OnPlayerEnterDeathStadium(playerid);

public OnPlayerEnterDeathStadium(playerid) // Place this function under your enter command.
{
    SetPVarInt(playerid, #DeathStad, 1);
    return true;
}
public OnPlayerSpawn(playerid)
{
    if(GetPVarInt(playerid, #DeathStad) == 1)
    {
            // Death Stadium Info here.
    }
    else {
        // Non-Death stadium spawn info.
    }
}