Who killed Who script. really need help
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new name[MAX_PLAYER_NAME];
    new string[256];
    new deathreason[20];
    GetPlayerName(playerid, name, sizeof(name));
    GetWeaponName(reason, deathreason, 20);
    if (killerid == INVALID_PLAYER_ID)
    {
        switch (reason)
        {
            case WEAPON_DROWN:
            {
                format(string, sizeof(string), "*** %s drowned.)", name);
            }
            default:
            {
                if (strlen(deathreason) > 0)
                {
                    format(string, sizeof(string), "*** %s died. (%s)", name, deathreason);
                }
                else
                {
                    format(string, sizeof(string), "*** %s died.", name);
                }
            }
        }
    }
    else
    {
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer, sizeof(killer));
    if (strlen(deathreason) > 0)
    {
        format(string, sizeof(string), "*** %s killed %s. (%s)", killer, name, deathreason);
    }
    else
    {
        format(string, sizeof(string), "*** %s killed %s.", killer, name);
    }
        SendClientMessageToAll(-1, string);
    }
    return 1;
}
Reply


Messages In This Thread
Who killed Who script. really need help - by MeNMyselv - 19.07.2011, 16:56
Re: Who killed Who script. really need help - by HyperZ - 19.07.2011, 17:05
Re: Who killed Who script. really need help - by MeNMyselv - 19.07.2011, 17:14
Re: Who killed Who script. really need help - by MeNMyselv - 19.07.2011, 17:25
Re: Who killed Who script. really need help - by HyperZ - 19.07.2011, 17:32
Re: Who killed Who script. really need help - by MeNMyselv - 19.07.2011, 18:45
Re: Who killed Who script. really need help - by Runedog48 - 19.07.2011, 18:47

Forum Jump:


Users browsing this thread: 1 Guest(s)