SA-MP Forums Archive
How to make a text on top of the head - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make a text on top of the head (/showthread.php?tid=418614)



How to make a text on top of the head - RiChArD_A - 25.02.2013

Hi, what can I do so that when a player dies a will appear on to of hes/her head. for example if I shoot you and you die on of you head will say "Eliminated". help please.


Re: How to make a text on top of the head - DaRk_RaiN - 25.02.2013

Wiki page GameTextForPlayer
E.G:
pawn Код:
//Add this under OnPlayerDeath.
GameTextForPlayer(playerid,"Eliminated", 3000, 0);



Respuesta: Re: How to make a text on top of the head - RiChArD_A - 25.02.2013

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
Wiki page GameTextForPlayer
E.G:
pawn Код:
//Add this under OnPlayerDeath.
GameTextForPlayer(playerid,"Eliminated", 3000, 0);
that should do the job perfectly? does it matters if I put it at the beginning of OnPlayerDeath or at the end?


Re: How to make a text on top of the head - needhack - 25.02.2013

@Dark he meant a text above his head, not on the screen.
Use https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer


Re: How to make a text on top of the head - RoboN1X - 25.02.2013

Try:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerChatBubble(playerid, "ELIMINATED", 0xFFFF0000, 100.0, 5000); // put this somewhere in your OnPlayerDeath
    return 1;
}
Uses chatbubble, see https://sampwiki.blast.hk/wiki/SetPlayerChatBubble for usages


Re: How to make a text on top of the head - needhack - 25.02.2013

Quote:
Originally Posted by Robo_N1X
Посмотреть сообщение
Try:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerChatBubble(playerid, "ELIMINATED", 0xFFFF0000, 100.0, 5000); // put this somewhere in your OnPlayerDeath
    return 1;
}
Uses chatbubble, see https://sampwiki.blast.hk/wiki/SetPlayerChatBubble for usages
Is it possible to have a chatbubble for unlimited time btw?


Respuesta: Re: How to make a text on top of the head - RiChArD_A - 25.02.2013

Quote:
Originally Posted by needhack
Посмотреть сообщение
@Dark he meant a text above his head, not on the screen.
Use https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
exactly, I'll try Robo's ( sadly I have to wait until I get home because I'm at work now)