SA-MP Forums Archive
Help with creating checkpoint when player dies - 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: Help with creating checkpoint when player dies (/showthread.php?tid=249396)



Help with creating checkpoint when player dies - csoki2 - 18.04.2011

Hi i have a problem, im trying to make a dead body transporter job but i dont know how to get the position of the other player when he dies and transmit it to the person whos on duty and setting a checkpoint for him to find the dead bodys. Please help!


Re: Help with creating checkpoint when player dies - Joyner - 18.04.2011

Depending on what you're using to track if the player is a dead body transporter and if they're on duty you'll have to change 'DeadBodyTransporter' and 'OnDuty' to suit your needs.

OnPlayerDeath:

pawn Код:
new Float:DeathX, Float:DeathY, Float:DeathZ;
GetPlayerPos(playerid,DeathX,DeathY,DeathZ);
for (new i= 0; i< MAX_PLAYERS; i++)
{
    if(DeadBodyTransporter[i] == 1 && OnDuty[i] == 1)
    {
        SetPlayerCheckpoint(i,DeathX,DeathY,DeathZ,4.0)
    }
}



Re: Help with creating checkpoint when player dies - csoki2 - 18.04.2011

Yo thanks m8 it worked like a charm ur da best many thanks m8