Change skin
#1

Hi guys,

I did this in OnePlayerDeath,

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    if(
gTeam[playerid] == Survivors//Change this code and transform it to yours
    
{
       
gTeam[playerid] = Zombie//this sets the player to a zombie if he was a survivor before his death
       
return 1;
    }
    return 
1;

But when a survivor die and change to zombie, he keeps the same skin of survivors..

I want to change his skin to zombie..

? :S
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(gTeam[playerid] == Survivors) //Change this code and transform it to yours
    {
       SetPlayerSkin(playerid, skinid);//Put the ID of the zombie skin here
       gTeam[playerid] = Zombie; //this sets the player to a zombie if he was a survivor before his death
       return 1;
    }
    return 1;
}
Reply
#3

It doesn't work, it freezes player after dead.. he doesn't spawn
Reply
#4

• SetSpawnInfo in the code you posted (after setting the team).

OR

• SetPlayerSkin in OnPlayerSpawn (checking the team before and setting accordingly).
Reply
#5

• SetSpawnInfo in the code you posted (after setting the team).

Worked perfectly.

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)