Advertisement
Guest User

Untitled

a guest
Jun 26th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.01 KB | None | 0 0
  1. /*
  2.     Code by !TheO 2013
  3. */
  4.  
  5. new
  6.     bool:tCreatet[MAX_PLAYERS],
  7.     bool:tShow[MAX_PLAYERS],
  8.     Text:tHeader[MAX_PLAYERS],
  9.     Text:tInputf[MAX_PLAYERS],
  10.     tTimer[MAX_PLAYERS];
  11.    
  12.  
  13.    
  14.    
  15.  
  16. stock ShowTBox(playerid,  Head[15], Input[], time)
  17. {
  18.     if(!tCreatet[playerid]){
  19.         tInputf[playerid] = TextDrawCreate(505.000000, 201.000000, "");
  20.         TextDrawBackgroundColor(tInputf[playerid], 255);
  21.         TextDrawFont(tInputf[playerid], 2);
  22.         TextDrawLetterSize(tInputf[playerid], 0.230000, 1.300000);
  23.         TextDrawColor(tInputf[playerid], -1);
  24.         TextDrawSetOutline(tInputf[playerid], 0);
  25.         TextDrawSetProportional(tInputf[playerid], 1);
  26.         TextDrawSetShadow(tInputf[playerid], 0);
  27.         TextDrawUseBox(tInputf[playerid], 1);
  28.         TextDrawBoxColor(tInputf[playerid], 336860330);
  29.         TextDrawTextSize(tInputf[playerid], 601.000000, 45.000000);
  30.        
  31.         tHeader[playerid] = TextDrawCreate(505.000000, 186.000000, "");
  32.         TextDrawBackgroundColor(tHeader[playerid], 255);
  33.         TextDrawFont(tHeader[playerid], 1);
  34.         TextDrawLetterSize(tHeader[playerid], 0.270000, 1.200000);
  35.         TextDrawColor(tHeader[playerid], -1);
  36.         TextDrawSetOutline(tHeader[playerid], 1);
  37.         TextDrawSetProportional(tHeader[playerid], 1);
  38.         TextDrawUseBox(tHeader[playerid], 1);
  39.         TextDrawBoxColor(tHeader[playerid], 170);
  40.         TextDrawTextSize(tHeader[playerid], 601.000000, 0.000000);
  41.        
  42.         tCreatet[playerid] = true;
  43.        
  44.     }else{
  45.  
  46.         if(!tShow[playerid]){
  47.             PlayerPlaySound( playerid, 1052, 0.0, 0.0, 10.0);
  48.             TextDrawShowForPlayer(playerid, tInputf[playerid]);
  49.             TextDrawShowForPlayer(playerid, tHeader[playerid]);
  50.             TextDrawSetString(tHeader[playerid], Head);
  51.             TextDrawSetString(tInputf[playerid], Input);
  52.             tTimer[playerid] = SetTimerEx("HideDraw",time*1000,false,"i",playerid);
  53.             tShow[playerid] = true;
  54.         }  
  55.         else
  56.         {
  57.        
  58.         }
  59.     }
  60.     return 1;
  61. }
  62.  
  63. forward HideDraw(playerid);
  64. public HideDraw(playerid)
  65. {
  66.     KillTimer(tTimer[playerid]);
  67.     TextDrawHideForPlayer(playerid, tInputf[playerid]);
  68.     TextDrawHideForPlayer(playerid, tHeader[playerid]);
  69.     tShow[playerid] = false;
  70.     return 1;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement