OnPlayerDeath
#4

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[128],sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    switch(GetPlayerTeam(playerid))
    {
        case TEAM_HUMAN:
        {
            format(string, sizeof(string), "News: %s has died and turned into a zombie !", sendername);
            SendClientMessageToAll(0xFF0000, string);
            SetPlayerTeam(playerid, TEAM_ZOMBIE);
        }
        case TEAM_ZOMBIE:
        {
            format(string, sizeof(string), "News: %s has died !", sendername);
            SendClientMessageToAll(0xFF0000, string);
        }
    }
    return 1;
}
If you wanted to make it so all humans died you'd have to make a variable checking all players teams and etc..
Reply


Messages In This Thread
OnPlayerDeath - by matdav - 06.07.2010, 21:07
Re: OnPlayerDeath - by CAR - 06.07.2010, 21:09
Re: OnPlayerDeath - by matdav - 06.07.2010, 21:50
Re: OnPlayerDeath - by FreshKilla - 06.07.2010, 23:36
Re: OnPlayerDeath - by matdav - 07.07.2010, 00:06
Re: OnPlayerDeath - by Gamer_Z - 07.07.2010, 06:56

Forum Jump:


Users browsing this thread: 1 Guest(s)