Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: sseebbyy on August 01, 2012, 12:21:44 am

Title: SetDeathMessage / SendDeathMessage
Post by: sseebbyy on August 01, 2012, 12:21:44 am
SetDeathMessage / SendDeathMessage


You can stop the Death Message to appear very simple.

In a_vcmp.inc from "gamemodes" directory is mentioned this functions:


Code: [Select]
native SetDeathMessage(bool);
So ... I added it on "a_vcmp.inc" from "Include" from Pawno Directory and ... I tested it and ..

Work !!

What is this "Death Message" ?

Death Message = text when a player die.


">>Elvis died."

">>Elvis killed Chuck (Palm) (Face)"

">>Elvis killed team-mate Michael (M4) (Eggs)"



I made 2 commands to Turn ON and Turn OFF the Death Message

Add this on the top:


Code: [Select]
new Death;
Add this at OnPlayerCommandText:

Start Death Message Command:


Code: [Select]
else if(strcmp(cmd, "startdeath", true) == 0) {
    if(Death == 1) SendClientMessage(playerid,COLOR_RED,"Death Message are already started !");
    else {
        SendClientMessageToAll(COLOR_YELLOW,"Death Message is Started now !");
        print("Death Message is Started now !");
    SetDeathMessage(1);
    Death = 1;
}
    return 1;
}

Stop Death Message Command:

Code: [Select]
else if(strcmp(cmd, "stopdeath", true) == 0) {
    if(Death == 0) SendClientMessage(playerid,COLOR_RED,"Death Message are already stopped !");
    else {
        SendClientMessageToAll(COLOR_YELLOW,"Death Message is Stopped now !");
        print("Death Message is Stopped now !");
    SetDeathMessage(0);
    Death = 0;
}
    return 1;
}


SendDeathMessage - Is very simple to use it .

You can put it at OnPlayerDeath. (for a double death message if is on)


Code: [Select]
SendDeathMessage(playerid,weapon,killerid,type,bodypart);
I tested the types (with numbers) :

type = 1 => ">>%s killed %s (Weapon Name) (BodyPart)."

type = 2 => ">>%s killed team-mate %s (Weapon Name) (BodyPart)."

type = 3 => ">>%s died."
Title: Re: SetDeathMessage / SendDeathMessage
Post by: [KB]ViceMania on October 29, 2012, 11:10:36 pm
good job :P
Title: Re: SetDeathMessage / SendDeathMessage
Post by: JackDawZ on October 30, 2012, 01:11:10 am
Nice  ;)
Title: Re: SetDeathMessage / SendDeathMessage
Post by: mrockxkingbutt on December 06, 2012, 11:59:28 am
is it work on gups