Spawn on death
#1

I am having some problems with player deaths... Now when player dies he gets the class selection but i don't want that... i want when player dies, he spawns at hospital...
Reply
#2

Can you show us your public OnPlayerDeath and public OnPlayerSpawn?
Reply
#3

You can use this to spawn players somewhere after death. However, you need to make sure ForceClassSelection() isn't being called in either callback.

pawn Код:
new Dead[MAX_PLAYERS];

public OnPlayerDeath(playerid)
{
    Dead[playerid] = 1;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(Dead[playerid] == 1)
    {
        SetPlayerPos(playerid, x, y, z);
        Dead[playerid] = 0;
    }
    return 1;
}
Reply
#4

Or you can search ForceClassSelection.
If you don't find, you can give us OnPlayerSpawn and OnPlayerDeath.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)