Advertisement
Guest User

InfoBoxForPlayer

a guest
Mar 18th, 2014
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.20 KB | None | 0 0
  1.     new RodymoDezute[MAX_PLAYERS];
  2.     new Text:InformacijosDezute[MAX_PLAYERS];
  3.     new Text:InfoBox[MAX_PLAYERS];
  4.  
  5. public OnGameModeInit() // cia dek po situo callbacku
  6. {
  7.     for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
  8.     {
  9.         InformacijosDezute[playerid] = TextDrawCreate( 13, 150, " " );
  10.             TextDrawUseBox(InformacijosDezute[playerid],1);
  11.         TextDrawBoxColor(InformacijosDezute[playerid],0x00000066);
  12.         TextDrawTextSize(InformacijosDezute[playerid],159, 81);
  13.         TextDrawAlignment(InformacijosDezute[playerid],0);
  14.         TextDrawBackgroundColor(InformacijosDezute[playerid],0x000000ff);
  15.         TextDrawFont(InformacijosDezute[playerid],2);
  16.         TextDrawLetterSize(InformacijosDezute[playerid],0.199999,1.200005);
  17.         TextDrawColor(InformacijosDezute[playerid],0xffffffff );
  18.         TextDrawSetOutline(InformacijosDezute[playerid],1);
  19.         TextDrawSetProportional(InformacijosDezute[playerid],1);
  20.         TextDrawSetShadow(InformacijosDezute[playerid],1);
  21.  
  22.         InfoBox[playerid] = TextDrawCreate( 13, 150, " " );
  23.         TextDrawUseBox(InfoBox[playerid],1);
  24.         TextDrawBoxColor(InfoBox[playerid],0x00000066);
  25.         TextDrawTextSize(InfoBox[playerid],159, 81);
  26.         TextDrawAlignment(InfoBox[playerid],0);
  27.         TextDrawBackgroundColor(InfoBox[playerid],0x000000ff);
  28.         TextDrawFont(InfoBox[playerid],2);
  29.         TextDrawLetterSize(InfoBox[playerid],0.199999,1.200005);
  30.         TextDrawColor(InfoBox[playerid],0xffffffff );
  31.         TextDrawSetOutline(InfoBox[playerid],1);
  32.         TextDrawSetProportional(InfoBox[playerid],1);
  33.         TextDrawSetShadow(InfoBox[playerid],1);
  34.     }
  35. }
  36.  
  37. forward IstrintiInformacija(playerid)
  38. public IstrintiInformacija(playerid)
  39. {
  40.     printf("HideBoxForPlayer(%d);", playerid);
  41.     TextDrawHideForPlayer(playerid, InfoBox[playerid]);
  42. }
  43. stock InfoBoxForPlayer(playerid, text[])
  44. {
  45.     TextDrawHideForPlayer(playerid, InfoBox[playerid]);
  46.     new string[512];
  47.         RodymoDezute[playerid] = 1;
  48.     format(string, sizeof(string), "%s~y~___________", text);
  49.     TextDrawSetString(InfoBox[playerid], string);
  50.     TextDrawShowForPlayer(playerid, InfoBox[playerid]);
  51.     PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0 );
  52.     SetTimerEx("IstrintiInformacija", 6900, 0, "d", playerid);
  53.     return 1;
  54. }
  55.  
  56.  
  57. Naudojimas:
  58.  
  59. if(kaskas)
  60. {
  61.     InfoBoxForPlayer("tavo tekstas")
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement