SA-MP Forums Archive
[Ajuda] Morre nascer no hospital - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Morre nascer no hospital (/showthread.php?tid=450355)



Morre nascer no hospital - minimessi10 - 12.07.2013

Como fasso pra quando um player morrer spawnar em um hospital ?


Re: Morre nascer no hospital - WLSF - 12.07.2013

pawn Код:
new bool:gPm [ MAX_PLAYERS ] ;
public OnPlayerDeath(playerid, killerid, reason)
{
    gPm [ playerid ] = 1;
}

public OnPlayerSpawn(playerid)
{
    if (gPm [ playerid ])
    {
        SetPlayerPos(playerid, x, y, z); //x, y, z = posiзгo do hospital
        gPm [ playerid ] = 0;
    }
}



Re: Morre nascer no hospital - Leopawno - 12.07.2013

Por que o gPM ?


Re: Morre nascer no hospital - WLSF - 12.07.2013

Pra saber se o player morreu...
Porque a callback OnPlayerSpawn pode ser chamada por outros motivos tambйm, nгo somente morte.