onplayerdeath death list
#1

hey how do i show onplayerdeath death list in game here's my onplayerdeath func..

PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(
killerid != INVALID_PLAYER_ID)
    {
        new 
string[128], weapon[32], killerName[MAX_PLAYER_NAME], playerName[MAX_PLAYER_NAME],
        
Float:pX, Float:pY, Float:pZ, Float: PfPDistance;
        
GetPlayerName(killerid, killerName, sizeof(killerName));
        
GetPlayerName(playerid, playerName, sizeof(playerName));
        
GetWeaponName(reason, weapon, sizeof(weapon));
        
GetPlayerPos(playerid, pX, pY, pZ);
        
PfPDistance = GetPlayerDistanceFromPoint(killerid, pX, pY, pZ);
        
format(string, sizeof(string), "%s (%i) Killed %s (%i) - %s From %0.2fm Away.", killerName, killerid, playerName, playerid, weapon, PfPDistance);
        
SendClientMessageToAll(0x9D000096, string);
        
//
        
PlayerInfo[killerid][pKills]++;
    }
    
DeadPlayer[playerid] = 0;
    
SetPlayerColor(playerid, COLOR_DEAD);
    
PlayerInfo[playerid][pDeaths]++;
    
    
TextDrawHideForPlayer(playerid,Clock);
    
TextDrawHideForPlayer(playerid, DaysOfWeek);
    
TextDrawHideForPlayer(playerid, FpsAndPing[playerid]);
    
TextDrawHideForPlayer(playerid, ZoneName[playerid]);
    
HideTDs(playerid);
    return 
1;
} 


exc mike vegas killed joker
Reply
#2

https://sampwiki.blast.hk/wiki/SendDeathMessage
Reply
#3



i mean that list of deaths in game
Reply
#4

Quote:
Originally Posted by JuzDoiT
Посмотреть сообщение


i mean that list of deaths in game
That is what he linked to... At least read what's provided before thinking it's not what you want...
Reply
#5

PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(
killerid != INVALID_PLAYER_ID)
    {
        new 
string[128], weapon[32], killerName[MAX_PLAYER_NAME], playerName[MAX_PLAYER_NAME],
        
Float:pX, Float:pY, Float:pZ, Float: PfPDistance;
        
GetPlayerName(killerid, killerName, sizeof(killerName));
        
GetPlayerName(playerid, playerName, sizeof(playerName));
        
GetWeaponName(reason, weapon, sizeof(weapon));
        
GetPlayerPos(playerid, pX, pY, pZ);
        
PfPDistance = GetPlayerDistanceFromPoint(killerid, pX, pY, pZ);
        
format(string, sizeof(string), "%s (%i) Killed %s (%i) - %s From %0.2fm Away.", killerName, killerid, playerName, playerid, weapon, PfPDistance);
        
SendClientMessageToAll(0x9D000096, string);
        
SendDeathMessage(killerid, playerid, reason);
        
//
        
PlayerInfo[killerid][pKills]++;
    }
    
DeadPlayer[playerid] = 0;
    
SetPlayerColor(playerid, COLOR_DEAD);
    
PlayerInfo[playerid][pDeaths]++;
    
    
TextDrawHideForPlayer(playerid,Clock);
    
TextDrawHideForPlayer(playerid, DaysOfWeek);
    
TextDrawHideForPlayer(playerid, FpsAndPing[playerid]);
    
TextDrawHideForPlayer(playerid, ZoneName[playerid]);
    
HideTDs(playerid);
    return 
1;
} 
Reply
#6

You added one line... Yet quote the whole code, and don't even highlight where it was added.

It also doesn't cover killing themselves.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)