Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons) [UPDATED]

Started by Pun1sh3r, Jun 12, 2022, 02:56 PM

Previous topic - Next topic

Pun1sh3r

Hello everyone,

today I present you after long time my updated Version of my old Deathlist working with Textdraws and Sprites in the past.

How does the Deathlist looks?

Names are always showed in the Deathlist with the Players Color

You can remove the connect & disconnect Messages in Chat and add it to the Deathlist!
How?

Add this to your onScriptLoad() callback:
SetJoinMessages(false); //This function will toggle the join messages on or off.
Add this to your onPlayerJoin(player) callback:
SendDeathMessageToAll(71, player.Name, player.Colour);

Add this to your onPlayerPart(player, reason) callback:
SendDeathMessageToAll(72, player.Name, player.Colour);

Now you can add Kill Messages to the Deathlist and disable it in Chat!
How to disable the Kill Messages in Chat?

Add this to your onScriptLoad() callback:
SetDeathMessages(false); //This function will toggle death messages on or off.
Add this to your onPlayerDeath(player, reason)  callback:
SendDeathMessageToAll(reason, player.Name, player.Colour);

Add this to your onPlayerKill(killer, player, reason, bodypart) callback:
SendDeathMessageToAll(reason, killer.Name, killer.Colour, player.Name, player.Colour);

DeathWindow function:
function SendDeathMessageToPlayer(player, reason, leftName, rgb, rightName = null, rgb2 = null)
{
    if (rightName)
{
SendDataToClient(player, 0x01, reason, leftName, rgb.r, rgb.g, rgb.b, rightName, rgb2.r, rgb2.g, rgb2.b);
}
    else
{
SendDataToClient(player, 0x01, reason, leftName, rgb.r, rgb.g, rgb.b);
}
return 1;
}

function SendDeathMessageToAll(reason, leftName, rgb, rightName = null, rgb2 = null)
{
    for (local plr, i = 0; i < GetMaxPlayers(); i++)
{
        plr = FindPlayer(i);
        if (plr)
{
if (rightName)
{
SendDataToClient(plr, 0x01, reason, leftName, rgb.r, rgb.g, rgb.b, rightName, rgb2.r, rgb2.g, rgb2.b);
}
else
{
SendDataToClient(plr, 0x01, reason, leftName, rgb.r, rgb.g, rgb.b);
}
}
}
return 1;
}

ClientSide Script is added in the Packages.
Download the full Package with Images, Server Side & Client Side Script

Feel free to download it now.

Please do not add any other Download links, this will be always Online I added as it is hosted on my Webserver.



Gito Baloch

Wow man amazing! I was waiting for this desperately, Thanks alot.
Programming is the language I speak, the world I shape, and the future I code