SA-MP Forums Archive
Textdraw problem - 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: Textdraw problem (/showthread.php?tid=582971)



Textdraw problem - Toxik - 24.07.2015

Sup guys i need help with textdraw

i want this textdeaw show on killed player's screen

pawn Код:
new Text:DTD;

public OnFilterScriptInit()
{
    print("Textdraw file generated by");
    print("    Zamaroht's textdraw editor was loaded.");

    // Create the textdraws:
    DTD = TextDrawCreate(280.000000, 164.000000, "You Died");
    TextDrawBackgroundColor(DTD, 16711935);
    TextDrawFont(DTD, 1);
    TextDrawLetterSize(DTD, 1.099999, 4.599999);
    TextDrawColor(DTD, -16776961);
    TextDrawSetOutline(DTD, 0);
    TextDrawSetProportional(DTD, 1);
    TextDrawSetShadow(DTD, 1);
    TextDrawSetSelectable(DTD, 0);

    return 1;
}

public OnFilterScriptExit()
{
    TextDrawHideForAll(DTD);
    TextDrawDestroy(DTD);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    TextDrawShowForPlayer(killerid, DTD);
    SetTimerEx("HideMessage", 2000, 0, "i", killerid);
}

forward HideMessage(playerid);
public HideMessage(playerid)
{
    TextDrawHideForPlayer(playerid, DTD);
}



Re: Textdraw problem - Jstylezzz - 24.07.2015

I'm guessing from the code that right now it shows the textdraw to the one who killed, right? If so, change
PHP код:
TextDrawShowForPlayer(killeridDTD); 
to

PHP код:
TextDrawShowForPlayer(playeridDTD); 
Killerid stands for the person who has killed the player, playerid stands for the player who was killed.

If it's something else that you mean, please explain your problem a little better.


Re: Textdraw problem - Toxik - 24.07.2015

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
I'm guessing from the code that right now it shows the textdraw to the one who killed, right? If so, change
PHP код:
TextDrawShowForPlayer(killeridDTD); 
to

PHP код:
TextDrawShowForPlayer(playeridDTD); 
Killerid stands for the person who has killed the player, playerid stands for the player who was killed.

If it's something else that you mean, please explain your problem a little better.
Thanks