OnPlayerDeath
#1

Alright I've got a question, I added this line on OnPlayerDeath: JustDied[playerid] = 1; It should do the following under SetPlayerSpawn but when the player dies he gets teleported to the last location he logged out at, I want the "JustDied" function to happen at the same location the player died at.


Code:
pawn Код:
if(JustDied[playerid] == 1)
            {
                if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
                {
                    SetPlayerVirtualWorld(playerid, 0);
                    PlayerInfo[playerid][pVirWorld] = 0;
                }
                PlayerInfo[playerid][pMuted] == 1;
                PlayerPlaySound(playerid, 6003, 1589.053344,-1638.123168,14.122960);
                SetTimerEx("Dedshit",1000,0,"i",playerid);
                SendClientMessage(playerid, COLOR_RED, " You are injured, You have 5 minutes before you respawn !");
                SetTimerEx("Dedspawn",60000,0,"i",playerid);
                return 1;
            }
Reply
#2

Check ur script at positon save command on the setplayerspawn or anywhere

Then u have to edit it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)