Advertisement
Guest User

Untitled

a guest
Feb 11th, 2012
1,085
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. /*
  2. Shadows Info Box, Created for his Deathmatch Script
  3. With this You can make lots of things, for every public or command
  4. Simply use this format
  5. ShadInfoBoxForPlayer(playerid, "Title~n~~n~(Information here)");
  6. ~n~ = new line
  7. ~r~ = color red
  8. ~w~ = color white
  9. ~y~ = color yellow
  10. ~b~ = color blue
  11. ~p~ = color purple
  12. ] = star
  13. ~l~ = color black
  14.  
  15. Have fun, Please give Credits if you implement into your own script
  16.  
  17. Add these functions in your own gamemode under the specified public..
  18.  
  19. OnShadowInit(); - OnGameModeInit() or OnFilterScriptInit()
  20. OnShadowCommand(playerid, cmdtext); - OnPlayerCommandText(playerid, cmdtext[])
  21. OnShadowText(playerid, text); - OnPlayerText(playerid, text[])
  22. */
  23.  
  24. new Text:ShadInfoBox;
  25. new ShadInfoBoxShowing[MAX_PLAYERS];
  26.  
  27. forward OnShadowInit();
  28. public OnShadowInit()
  29. {
  30. print("\n----------------------------------");
  31. print(" Info Box - Created by Shadow");
  32. print("----------------------------------\n");
  33. ShadInfoBox = TextDrawCreate(36.000000, 144.000000, "___");
  34. TextDrawBackgroundColor(ShadInfoBox, 255);
  35. TextDrawFont(ShadInfoBox, 2);
  36. TextDrawLetterSize(ShadInfoBox, 0.250000, 1.099999);
  37. TextDrawColor(ShadInfoBox, -1);
  38. TextDrawSetOutline(ShadInfoBox, 0);
  39. TextDrawSetProportional(ShadInfoBox, 1);
  40. TextDrawSetShadow(ShadInfoBox, 1);
  41. TextDrawUseBox(ShadInfoBox, 1);
  42. TextDrawBoxColor(ShadInfoBox, 118);
  43. TextDrawTextSize(ShadInfoBox, 180.000000, 5.000000);
  44. return 1;
  45. }
  46.  
  47. forward OnShadowCommand(playerid, cmdtext[]);
  48. public OnShadowCommand(playerid, cmdtext[])
  49. {
  50. if(!strcmp(cmdtext, "/info", true))
  51. {
  52. ShadInfoBoxForPlayer(playerid, "Test Menu~n~~n~~r~You could put anything here~n~Commands~n~Information~n~Stats?~n~Have Fun");
  53. return 1;
  54. }
  55. return 0;
  56. }
  57.  
  58. stock ShadInfoBoxForPlayer(playerid, text[])
  59. {
  60. TextDrawHideForPlayer(playerid, ShadInfoBox);
  61. new info[700];
  62. ShadInfoBoxShowing[playerid] = 1;
  63. format(info, sizeof(info), "%s~n~~n~~y~Type Exit to hide this menu", text);
  64. TextDrawSetString(ShadInfoBox, info);
  65. TextDrawShowForPlayer(playerid, ShadInfoBox);
  66. }
  67.  
  68. forward DeleteShadInfo(playerid);
  69. public DeleteShadInfo(playerid)
  70. {
  71. printf("(%d) Has Just Deleted the Shadow Info Box From his Screen",playerid);
  72. TextDrawHideForPlayer(playerid, ShadInfoBox);
  73. TextDrawDestroy(ShadInfoBox);
  74. }
  75.  
  76. forward OnShadowText(playerid, text[]);
  77. public OnShadowText(playerid, text[])
  78. {
  79. if (strcmp("Exit", text, true, 10) == 0)
  80. {
  81. if(ShadInfoBoxShowing[playerid] == 1)
  82. {
  83. printf("(%d) Has Just Deleted the Shadow Info Box From his Screen",playerid);
  84. TextDrawHideForPlayer(playerid, ShadInfoBox);
  85. return 0;
  86. }
  87. }
  88. return 0;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement