[HELP] Who Killed Who Filterscript?
#9

try this
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new pname[24];
    new killername[24];
    new msg[128];
   new reasonMsg[32];
    GetPlayerName(playerid,pname,sizeof(pname));
    GetPlayerName(killerid,killername,sizeof(killername));
   if (killerid != INVALID_PLAYER_ID)
    {
        switch (reason)
        {
            case 0: reasonMsg = "Unarmed";
            case 1: reasonMsg = "Brass Knuckles";
            case 2: reasonMsg = "Golf Club";
            case 3: reasonMsg = "Night Stick";
            case 4: reasonMsg = "Knife";
            case 5: reasonMsg = "Baseball Bat";
            case 6: reasonMsg = "Shovel";
            case 7: reasonMsg = "Pool Cue";
            case 8: reasonMsg = "Katana";
            case 9: reasonMsg = "Chainsaw";
            case 10: reasonMsg = "Dildo";
            case 11: reasonMsg = "Dildo";
            case 12: reasonMsg = "Vibrator";
            case 13: reasonMsg = "Vibrator";
            case 14: reasonMsg = "Flowers";
            case 15: reasonMsg = "Cane";
            case 22: reasonMsg = "Pistol";
            case 23: reasonMsg = "Silenced Pistol";
            case 24: reasonMsg = "Desert Eagle";
            case 25: reasonMsg = "Shotgun";
            case 26: reasonMsg = "Sawn-off Shotgun";
            case 27: reasonMsg = "Combat Shotgun";
            case 28: reasonMsg = "MAC-10";
            case 29: reasonMsg = "MP5";
            case 30: reasonMsg = "AK-47";
            case 31: reasonMsg = "M4";
            case 32: reasonMsg = "TEC-9";
            case 33: reasonMsg = "Country Rifle";
            case 34: reasonMsg = "Sniper Rifle";
            case 37: reasonMsg = "Fire";
            case 38: reasonMsg = "Minigun";
            case 41: reasonMsg = "Spray Can";
            case 42: reasonMsg = "Fire Extinguisher";
            case 49: reasonMsg = "Vehicle Collision";
            case 50: reasonMsg = "Vehicle Collision";
            case 51: reasonMsg = "Explosion";
            default: reasonMsg = "Unknown";
        }
        format(string,sizeof(string),"[KILL] %s(%d) killed %s(%d). [Weapon: %s]",killername,killerid,pname,playerid,reasonMsg);
    }
    else
    {
        switch (reason)
        {
            case 53: format(msg, sizeof(msg), "04*** %s died. (Drowned)", pname);
            case 54: format(msg, sizeof(msg), "04*** %s died. (Collision)", pname);
            default: format(msg, sizeof(msg), "04*** %s died.", pname);
        }
    }
     SendClientMessageToAll(COLOR_RED,string);
return 1;
}
EDITED: try now
Reply


Messages In This Thread
[HELP] Who Killed Who Filterscript? - by JackoXD - 23.07.2013, 23:49
Re: [HELP] Who Killed Who Filterscript? - by ShaneOvSina - 24.07.2013, 00:11
Re: [HELP] Who Killed Who Filterscript? - by JackoXD - 24.07.2013, 00:15
Re: [HELP] Who Killed Who Filterscript? - by Vanter - 24.07.2013, 00:16
Re: [HELP] Who Killed Who Filterscript? - by JackoXD - 24.07.2013, 00:21
Re: [HELP] Who Killed Who Filterscript? - by Vanter - 24.07.2013, 00:23
Re: [HELP] Who Killed Who Filterscript? - by JackoXD - 24.07.2013, 00:28
Re: [HELP] Who Killed Who Filterscript? - by JackoXD - 24.07.2013, 00:35
Re: [HELP] Who Killed Who Filterscript? - by Vanter - 24.07.2013, 00:40
Re: [HELP] Who Killed Who Filterscript? - by JackoXD - 24.07.2013, 00:44

Forum Jump:


Users browsing this thread: 1 Guest(s)