Help with creating checkpoint when player dies
#1

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!
Reply
#2

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)
    }
}
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)