OnPlayerDeath
#1

How can i make that when Human make Suicide, that he spawn as Zombie and not again as Human? He is the OnPlayerDeath:

Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
SetPVarInt(killerid,"HaltStop",0);

Reply
#2

Try
pawn Код:
if(gTeam[playerid] == TEAM_HUMAN)
{
gTeam[playerid] = TEAM_ZOMBIE;
}
I think that should work if he kills him-self.
Reply
#3

then use if(killerid != playerid || INVALID_PLAYER_ID)
Reply
#4

Quote:
Originally Posted by mobiliz
Посмотреть сообщение
Try
pawn Код:
if(gTeam[playerid] == TEAM_HUMAN)
{
gTeam[playerid] = TEAM_ZOMBIE;
}
I think that should work if he kills him-self.
Work, indeed he is Zombie, but he Spawn with Army/Human Skin. ^^
Reply
#5

SetPlayerSkin(playerid,YourZombieSkinNumber);
Reply
#6

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == TEAM_ZOMBIE)
    {
        SetPlayerSkin(playerid, zombieskin);
    }
    else if(gTeam[playerid] == TEAM_HUMAN)
    {
        SetPlayerSkin(playerid, humanskin);
    }
    return 1;
}
Reply
#7

Try to put this OnPlayerSpawn:
pawn Код:
if(gTeam[playerid] == TEAM_ZOMBIE)
    {
        ResetPlayerWeapons(playerid); //if you want
    SetPlayerTeam(playerid,1); //change that if yours is different
    SetPlayerColor(playerid,COLOR_YELLOW); //change the color if yours is different
    SetPlayerSkin(playerid,162); //change skin if yours is different
    GivePlayerWeapon(playerid,9, 1); //Change weapon if you have one or don't have one
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)