Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new PlayerText:MSTD[MAX_PLAYERS];
- MSTD[playerid] = CreatePlayerTextDraw(playerid, 293.600036, 247.146743, "0");
- PlayerTextDrawLetterSize(playerid, MSTD[playerid], 0.326, 1.654);
- PlayerTextDrawAlignment(playerid, MSTD[playerid], 1);
- PlayerTextDrawColor(playerid, MSTD[playerid], -1);
- PlayerTextDrawSetShadow(playerid, MSTD[playerid], 0);
- PlayerTextDrawSetOutline(playerid, MSTD[playerid], -1);
- PlayerTextDrawBackgroundColor(playerid, MSTD[playerid], 0x000000FF);
- PlayerTextDrawFont(playerid, MSTD[playerid], 1);
- PlayerTextDrawSetProportional(playerid, MSTD[playerid], 1);
- forward MSTD_MSG(playerid, s_time, text[]);
- public MSTD_MSG(playerid, s_time, text[])
- {
- if(GetPVarInt(playerid, "MS_TDshown") != -1)
- {
- PlayerTextDrawHide(playerid, MSTD[playerid]);
- KillTimer(GetPVarInt(playerid, "MS_TDshown"));
- }
- PlayerTextDrawSetString(playerid, MSTD[playerid], text);
- PlayerTextDrawShow(playerid, MSTD[playerid]);
- SetPVarInt(playerid, "MS_TDshown", SetTimerEx("MSTD_Hide", s_time, false, "i", playerid));
- }
- // Info textdraw timer for hiding the textdraw
- forward MSTD_Hide(playerid);
- public MSTD_Hide(playerid)
- {
- SetPVarInt(playerid, "MS_TDshown", -1);
- PlayerTextDrawHide(playerid, MSTD[playerid]);
- }
Add Comment
Please, Sign In to add comment