How to change player's team after death?
#1

I was wondering of how to change player after death,

I have zombie vs soldiers gamemode,

I wan't if soldier dies, he become zombie, and same thing for zombies
Reply
#2

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	SetPlayerTeam(playerid, zombies);//zombies is the team name!
return 1;
}
Please +1 reply me
Reply
#3

Lol, we didn't define which player gonna to become a zombie didn't we ?

I wan't just survivers to become Zombies, ^_^
Reply
#4

This is just an example of how it should look, change the code I gave you to yours and try it out.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    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;
}
Reply
#5

Oh, i am so selly xD

Thanks @DarkLored,

+Rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)