Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: Pun1sh3r on Aug 02, 2015, 09:12 PM

Title: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Pun1sh3r on Aug 02, 2015, 09:12 PM
Hello all!

I present you here my new Deathlist I made when I was bored and thought it would be nice to share it to you guys.

Images with Weapons are from the Wikipedia site from wiki.vc-mp.org and the other Images are made by Pwnzor (Yes I got the premission from him to share his Pictures.)
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fustunting.com%2Fvcmp04%2Fdeathlist.png&hash=1b6e0f1070b3231df44730f6e641b1988ffae679)

Put this code at the first few lines in your Script
//Deathlist Settings

MaxLines <- 5;             //Max Lines it shows in Deathlist
LineGap <- 30;            //How much space between the Names
PosX <- -245;              //PosX for first part      (Do not change unless you know what you are doing)
PosY <- 504;               //PosY for first part       (Do not change unless you know what you are doing)
PosX2 <- -190;           //PosX for second part  (Do not change unless you know what you are doing)
PosY3 <- 502;            //PosY for second part   (Do not change unless you know what you are doing)

Put this code under onScriptLoad public
//Death Window Vars
TextLengh <- array(MaxLines);
TextInfo <- array(MaxLines);
TextInfo2 <- array(MaxLines);
SpriteInfo <- array(MaxLines);

Put this code somewhere you want if onPlayerDeath and onPlayerKill is not already used, if you have it already then just add the DeathWindow part in your public.

function onPlayerDeath( player, reason )
{
DeathWindow(player.Name, reason, " "); //" " must be with space to prevent any bugs
return 1;
}

function onPlayerKill( player, killer, reason, bodypart )
{
DeathWindow(killer.Name, reason, player.Name);
return 1;
}

This is the main function to make the Deathlist working
function DeathWindow(leftName, reason, rightName)
{
image <- "" + reason + ".png";
if (TextInfo[0])
{
TextInfo[0].Delete();
}
if(SpriteInfo[0])
{
SpriteInfo[0].Delete();
}
if (TextInfo2[0])
{
TextInfo2[0].Delete();
}
for (local i=0; i<MaxLines-1; i++)
{
if(TextLengh[i+1])
{
TextLengh[i] = TextLengh[i+1];
}
if (TextInfo[i+1])
{
TextInfo[i] = TextInfo[i+1];
TextInfo[i].SetPosForAll(PosX-TextLengh[i], PosY-(i)*LineGap);
}

if(SpriteInfo[i+1])
{
SpriteInfo[i] = SpriteInfo[i+1];
SpriteInfo[i].SetPosForAll(-230, PosY3-(i)*LineGap);
}

if(TextInfo2[i+1])
{
TextInfo2[i] = TextInfo2[i+1];
TextInfo2[i].SetPosForAll(PosX2, PosY-(i)*LineGap);
}
}

MinusPosX <- 0;

if(leftName.len() == 1)
{
MinusPosX <- 8;
}
else
{
MinusPosX <- leftName.len()*8;
}

TextLengh[MaxLines-1] = MinusPosX;
TextInfo[MaxLines-1] = CreateTextdraw(leftName, PosX-MinusPosX, PosY-(MaxLines-1)*LineGap, 0xFFB0B0B0);
TextInfo[MaxLines-1].ShowForAll();
SpriteInfo[MaxLines-1] = CreateSprite(image, -230, PosY3-(MaxLines-1)*LineGap, 0, 0, 0, 200);
SpriteInfo[MaxLines-1].ShowForAll();
TextInfo2[MaxLines-1] = CreateTextdraw(rightName, PosX2, PosY-(MaxLines-1)*LineGap, 0xFFB0B0B0);
TextInfo2[MaxLines-1].ShowForAll();
return 1;
}


Additional you can add Connect and Disconnect messages to the Deathlist to reduce the Spam in Chat with Connect and Disconnect messages.

function onPlayerJoin(player)
{
DeathWindow(" ", "71", player.Name);
return 1;
}

function onPlayerPart( player, reason )
{
DeathWindow(" ", "72", player.Name);
return 1;
}

Downloads:
Images (http://ustunting.com/vcmp04/store.zip)
Deathlist (http://ustunting.com/vcmp04/Deathlist.zip) with Icons and script for the lazy peoples :)

Note: Please do not add any other download links, thanks!

Credits:
Pun1sh3r (Creator)
Pwnzor (For the Images he made such as Connect/Disconnect/Death/Explode and so on...)
ysc3839 (http://forum.vc-mp.org/?action=profile;u=26) - for the basic code at DeathWindow
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: soulshaker on Aug 02, 2015, 10:14 PM
Good to see people implementing new things. Nice work!!
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: MatheuS on Aug 02, 2015, 10:23 PM
DeathWindow(player.Name, reason, killer.Name); to
DeathWindow(Killer.Name, reason, player.Name);

Good. ;)
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Ksna on Aug 03, 2015, 01:33 AM
QuoteGood. ;)
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Sebastian on Aug 03, 2015, 07:26 AM
Didn't think I will, but I like how it looks. :D
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: MacTavish on Aug 03, 2015, 07:51 AM
Nice work ;D
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: ysc3839 on Aug 03, 2015, 07:51 AM
Great! :D
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: DizzasTeR on Aug 03, 2015, 08:15 AM
Good job.
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Pun1sh3r on Aug 03, 2015, 09:17 AM
Quote from: MatheuS on Aug 02, 2015, 10:23 PMDeathWindow(player.Name, reason, killer.Name); to
DeathWindow(Killer.Name, reason, player.Name);
Good. ;)

Whoops, Improved it in the first post and updated the Full Package.

Thanks :)
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Lovesh Verma on Aug 03, 2015, 09:39 AM
Nyc
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: KAKAN on Aug 03, 2015, 11:43 AM
Nice!!
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: BrYaN_FuRy on Aug 03, 2015, 01:15 PM
Nice Work
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: KAKAN on Aug 03, 2015, 04:29 PM
Thanks Implemented in my server, it looks cool
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: MatheuS on Jul 30, 2017, 02:13 PM
I uploaded the files again.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F7779dd33d6b2f1cbc5e55d7cdf5652cd%2FIcons.rar&hash=c38d915a3c2ff20787ca10d4bfed1f40e6bd261b) (http://files.thijn.ovh/download/7779dd33d6b2f1cbc5e55d7cdf5652cd/Icons.rar)

Sorry for *bump*
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: =RK=MarineForce on Jul 30, 2017, 09:07 PM
erro 404 file not found
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Thijn on Jul 31, 2017, 04:41 PM
Quote from: bhaiok on Jul 30, 2017, 09:07 PMerro 404 file not found
Look above your post...
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Mahmoud Tornado on Sep 10, 2017, 01:58 PM
Not Working For My The Problem In CreateTextdraw
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Zone_Killer on Sep 11, 2017, 02:15 PM
Quote from: Mahmoud Tornado on Sep 10, 2017, 01:58 PMNot Working For My The Problem In CreateTextdraw
Mr This function is not for 04rel004
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Mohamed Boubekri on Apr 12, 2018, 04:11 PM
Quote from: ysc3839 on Aug 03, 2015, 07:51 AMGreat! :D
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: NicusorN5 on Apr 12, 2018, 05:50 PM
Quote from: Mohamed on Apr 12, 2018, 04:11 PM
Quote from: ysc3839 on Aug 03, 2015, 07:51 AMGreat! :D
Why you didn't like his post instead?
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Mohamed Boubekri on Apr 12, 2018, 06:30 PM
Quote from: Athanatos(^_^) on Apr 12, 2018, 05:50 PM
Quote from: Mohamed on Apr 12, 2018, 04:11 PM
Quote from: ysc3839 on Aug 03, 2015, 07:51 AMGreat! :D
Why you didn't like his post instead?
Is this your thing?
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: NicusorN5 on Apr 12, 2018, 07:38 PM
I can't really understand why you just posted a random quote and nothing else.
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Mohamed Boubekri on Apr 12, 2018, 07:39 PM
Quote from: Athanatos(^_^) on Apr 12, 2018, 07:38 PMI can't really understand why you just posted a random quote and nothing else.
Is this your thing?
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: NicusorN5 on Apr 13, 2018, 05:06 PM
Quote from: Mohamed on Apr 12, 2018, 07:39 PM
Quote from: Athanatos(^_^) on Apr 12, 2018, 07:38 PMI can't really understand why you just posted a random quote and nothing else.
Is this your thing?
Did I say this script is mine?
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Mursaleen5544 on Jan 29, 2020, 11:18 AM
http://ustunting.com/vcmp04/Deathlist.zip Is not working, If someone is having this script please make a mirror of download asap.
Title: Re: Deathlist with Icons (Just like SA:MP but with cool VC:MP Icons)
Post by: Pun1sh3r on May 01, 2020, 10:15 AM
This Script was only working with Textdraws and since it's removed and replaced with GUI's this Script doesnt work anymore.
Maybe I will update it someday when I have again free time, but for now I will lock this.