SA-MP Forums Archive
Spawn help - 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: Spawn help (/showthread.php?tid=249017)



Spawn help - [M.A]Angel[M.A] - 16.04.2011

Anyone can told me how to respawn player in dm so if player dead on dm* he will re spawn on only in dm not on Other teles.

Thanks.


Re: Spawn help - Stigg - 16.04.2011

Try:
pawn Код:
new IsInDeathMatch[MAX_PLAYERS];
pawn Код:
IsInDeathMatch[playerid] = 1;//in dm
IsInDeathMatch[playerid] = 0;//not in dm
pawn Код:
if(IsInDeathMatch[playerid] == 1)
{
    //blah
    //blah
}



Re: Spawn help - [M.A]Angel[M.A] - 17.04.2011

I know that , i have :
if(DMZone[playerid] == 1)
DMZone[playerid] = 0;

But i want to re spawn player on dm i think this need

OnPlayerSpawn


Re: Spawn help - Stigg - 17.04.2011

Something like:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsInDeathMatch[playerid] == 1)
    {
        //spawn back to dm
    }
    return 1;
}



Re: Spawn help - [M.A]Angel[M.A] - 17.04.2011

This isnt work r


Re: Spawn help - Stigg - 17.04.2011

Quote:
Originally Posted by [M.A]Angel[M.A]
Посмотреть сообщение
This isnt work r
Well, can we see the code ?


Re: Spawn help - [M.A]Angel[M.A] - 17.04.2011

public OnPlayerDeath(playerid, killerid, reason)
{
if(IsInDeathMatch[playerid] == 1)
{
SetPlayerPos(playerid,xxxxxxxxxxx);
} return 1;}


Re: Spawn help - Stigg - 17.04.2011

Quote:
Originally Posted by [M.A]Angel[M.A]
Посмотреть сообщение
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsInDeathMatch[playerid] == 1)
{
SetPlayerPos(playerid,xxxxxxxxxxx);
} return 1;}
And where are you setting these ?

pawn Код:
IsInDeathMatch[playerid] = 1;//in dm
IsInDeathMatch[playerid] = 0;//not in dm



Re: Spawn help - [M.A]Angel[M.A] - 17.04.2011

I do it , i would asking :

OnPlayerSpawn

{

//Back to dm => what i will do here?

}