[Help] Death Message Fading
#1

Hey guys and gals. I recently added death messages to my server, but quickly found out they stay there forever and never fade away. This can get annoying at times, so I am wondering if there is some code I could add that would make the death messages and login messages fade away after say 2 minutes.

Thanks for reading and have a wonderful day everyone!

-
0Z3ro0
Reply
#2

Bumb*

Anyone know about this?
Reply
#3

Quote:
Originally Posted by -Prodigy-
Посмотреть сообщение
Well, you can't hide them. What you can do is send a blank message 5 times to get rid of the current death messages. If you want something like this, then give this a try:
pawn Код:
public OnPlayerDeath(..)
{
    SendDeathMessage(killerid, playerid, reason), SetTimer("cleardm", 120000, false); // You can either do it this way or set a global timer that repeats
    return 1;
}

forward cleardm();
public cleardm()
{
    for(new g = 0; g < 5; g++)
        SendDeathMessage(255, 24, 255);
    return 1;
}
Thank you for your help. Sending 5 blank messages is fine, I am not making this server for commercial use, I just want an enjoyable server to play on, so "working around the bush" is not a problem for me. My I ask you to break down this code please? Rather then copy and paste it I would like to learn what it means and how it works.
Reply
#4

With what are you using the messages ? With textdraws, gametext or something else ?
Reply
#5

Quote:
Originally Posted by Unte99
Посмотреть сообщение
With what are you using the messages ? With textdraws, gametext or something else ?
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}
Reply
#6

Well, you can't hide them. What you can do is send a blank message 5 times to get rid of the current death messages. If you want something like this, then give this a try:
pawn Код:
public OnPlayerDeath(..)
{
    SendDeathMessage(killerid, playerid, reason), SetTimer("cleardm", 120000, false); // You can either do it this way or set a global timer that repeats
    return 1;
}

forward cleardm();
public cleardm()
{
    for(new g = 0; g < 5; g++)
        SendDeathMessage(255, 24, 255);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)