Guest User

InfoText TextDraw

a guest
Sep 26th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.16 KB | None | 0 0
  1. new Text:ShadInfoBox;
  2. new ShadInfoBoxShowing[MAX_PLAYERS];
  3.  
  4. #define CLOSETIMER 15000
  5.  
  6. forward OnShadowInit();
  7. public OnShadowInit()
  8. {
  9.     ShadInfoBox = TextDrawCreate(36.000000, 144.000000, "___");
  10.     TextDrawBackgroundColor(ShadInfoBox, 255);
  11.     TextDrawFont(ShadInfoBox, 2);
  12.     TextDrawLetterSize(ShadInfoBox, 0.250000, 1.099999);
  13.     TextDrawColor(ShadInfoBox, -1);
  14.     TextDrawSetOutline(ShadInfoBox, 0);
  15.     TextDrawSetProportional(ShadInfoBox, 1);
  16.     TextDrawSetShadow(ShadInfoBox, 1);
  17.     TextDrawUseBox(ShadInfoBox, 1);
  18.     TextDrawBoxColor(ShadInfoBox, 118);
  19.     TextDrawTextSize(ShadInfoBox, 180.000000, 5.000000);
  20.     return 1;
  21. }
  22.  
  23. stock ShadInfoBoxForPlayer(playerid, text[])
  24. {
  25.     TextDrawHideForPlayer(playerid, ShadInfoBox);
  26.     SetTimerEx("CloseTextdraw", CLOSETIMER, false, "i", playerid);
  27.    
  28.     new string[250];
  29.     ShadInfoBoxShowing[playerid] = 1;
  30.     format(string, sizeof(string), "%s", text);
  31.     TextDrawSetString(ShadInfoBox, string);
  32.     return TextDrawShowForPlayer(playerid, ShadInfoBox);
  33. }
  34.  
  35. forward CloseTextdraw(playerid);
  36. public CloseTextdraw(playerid)
  37. {
  38.     TextDrawHideForPlayer(playerid, ShadInfoBox);
  39. }
Add Comment
Please, Sign In to add comment