SendDeathMessageEx
#2

PHP код:
SendDeathMessageEx(playeridkilleridreason)
{
    new 
string[128], playername[MAX_PLAYER_NAME], killername[MAX_PLAYER_NAME], weaponn[24], modelid;
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    if (
reason != INVALID_REASON && !IsPlayerNPC(killerid)) {
        
modelid killerid != INVALID_PLAYER_ID GetPlayerState(killerid) == PLAYER_STATE_DRIVER GetVehicleModel(GetPlayerVehicleID(killerid)) : 0;
        if (
reason == 31) {
            switch (
modelid) {
                case 
447weaponn "Sparrow Machine Gun";
                case 
464weaponn "RC Baron Machine Gun";
                case 
476weaponn "Rustler Machine Gun";
                default: 
weaponn "M4";
            }
        }
        else if (
reason == 37) {
            
weaponn "Fire";
        }
        else if (
reason == 38) {
            switch (
modelid) {
                case 
425weaponn "Hunter Machine Gun";
                default: 
weaponn "Minigun";
            }
        }
        else if (
reason == 50) {
            switch (
modelid) {
                case 
417425447465469487488497501548563weaponn "Helicopter";
                default: {
                    
weaponn "Collision";
                    
reason 49;
                }
            }
        }
        else if (
reason == 51) {
            switch (
modelid) {
                case 
425weaponn "Hunter Missile";
                case 
432weaponn "Rhino Turret";
                case 
520weaponn "Hydra Missile";
                default: 
weaponn "Explosion";
            }
        }
        else {
            
format(weaponn24"%s"WeaponName[reason]);
        }
        if (
killerid != INVALID_PLAYER_ID) {
            
GetPlayerName(killeridkillernameMAX_PLAYER_NAME);
            
format(string128"* %s[%d] has been killed by %s[%d] (%s)."playername,playeridkillername,killeridweaponn);
        }
        else 
format(string128"* %s[%d] has died (%s)."playername,playerid,  weaponn);
    }
    else {
        
format(string128"* %s[%d] has died (%s)."playername,playeridWeaponName[sizeof(WeaponName)-1]);
    }
    
SendClientMessageToAll2(COLOR_WHITEstring);
    
SendDeathMessage(killeridplayeridreason);

try this
Reply


Messages In This Thread
SendDeathMessageEx - by Exhibit - 10.05.2018, 18:15
Re: SendDeathMessageEx - by CrystalGamer - 10.05.2018, 18:53
Re: SendDeathMessageEx - by Exhibit - 10.05.2018, 19:27
Re: SendDeathMessageEx - by CyNiC - 11.05.2018, 01:52
Re: SendDeathMessageEx - by Exhibit - 11.05.2018, 10:47
Re: SendDeathMessageEx - by Exhibit - 11.05.2018, 11:22

Forum Jump:


Users browsing this thread: 2 Guest(s)