30.09.2018, 18:53
Create the textdraw ingame and export is as player textdraw.
Then:
To show it:
If you want to paste a string:
Then:
pawn Code:
stock MessageHelpBox(playerid, string[], time = 5000)
{
PlayerTextDrawSetString(playerid, MessageTxd[playerid], string);
PlayerTextDrawShow(playerid, MessageTxd[playerid]);
SetTimerEx("HideMessageBox", time, false, "d", playerid);
return 1;
}
forward HideMessageBox(playerid)
public HideMessageBox(playerid)
{
PlayerTextDrawHide(playerid, MessageTxd[playerid]);
}
pawn Code:
MessageHelpBox(playerid, "Test! You can add ~r~colors ~b~too", 5000);
pawn Code:
new string[10];
format(string, sizeof(string), "~b~Test string %d", something);
MessageHelpBox(playerid, string, 5000);