Textdrawcreate Samp

Fix Russian text plugin for SA-MP: GameText's, TextDraw's and Menu's. Default russifier type is SanLtd. Just add rustext.so in your server.cfg to plugins key. If you want to get additional functionality you should copy rustext.inc to your libraries directory and add #include 'rustext' in your script. : شروع کنید samp-server.exe شروع به کار کن. فایل را به دایرکتوری که در آن samp-server.exe قرار دارد قرار دهید و آن را اجرا کنید. خروج را به کنسول سرور منتقل کنید تا آزمایش کنید که آیا کار می کند.

  1. /*
  2. * -FilterScript By: [Phoenix-] And Hitman13 *
  3. * -Yahoo: Sajjad_Athare@Yahoo.Com *
  4. * *
  5. * *
  6. */
  7. //------------------------------------------------------------------------------
  8. new Text:TDLogin;
  9. new Text:TDSite;
  10. new Text:TDReg;
  11. new Text:TDBG;
  12. //------------------------------------------------------------------------------
  13. {
  14. print('n+++++ [Textdraw] Login And Register Systam FilterScript +++++');
  15. print('***************************************************');
  16. print('* -Filterscript By: [Phoenix-] And Hitman13 *');
  17. print('* -Yahoo: Sajjad_Athare@Yahoo.Com *');
  18. print('* *');
  19. print('*************************************************n');
  20. TDBG =TextDrawCreate(426.000000, 17.739999, 'usebox');
  21. TextDrawTextSize(TDBG, 629.500000, 0.000000);
  22. TextDrawColor(TDBG, 16777215);
  23. TextDrawBoxColor(TDBG, 376926784);
  24. TextDrawSetOutline(TDBG, 0);
  25. TextDrawFont(TDBG, 0);
  26. TDLoginUB =TextDrawCreate(618.000000, 155.000000, 'usebox');
  27. TextDrawLetterSize(TDLoginUB, 0.000000, 2.750000);
  28. TextDrawTextSize(TDLoginUB, 435.000000, 0.000000);
  29. TextDrawColor(TDLoginUB, 0);
  30. TextDrawBoxColor(TDLoginUB, 102);
  31. TextDrawSetOutline(TDLoginUB, 0);
  32. TDSiteUB =TextDrawCreate(626.500000, 230.540008, 'usebox');
  33. TextDrawTextSize(TDSiteUB, 429.500000, 0.000000);
  34. TextDrawColor(TDSiteUB, 0);
  35. TextDrawBoxColor(TDSiteUB, 102);
  36. TextDrawSetOutline(TDSiteUB, 0);
  37. TDRegUB =TextDrawCreate(618.000000, 185.000000, 'usebox');
  38. TextDrawTextSize(TDRegUB, 435.000000, 0.000000);
  39. TextDrawColor(TDRegUB, 0);
  40. TextDrawBoxColor(TDRegUB, 102);
  41. TextDrawSetOutline(TDRegUB, 0);
  42. TDSite =TextDrawCreate(455.000000, 237.500000, '~y~wWw.YourSite.Com');
  43. TextDrawAlignment(TDSite, 1);
  44. TextDrawSetShadow(TDSite, 0);
  45. TextDrawBackgroundColor(TDSite, 51);
  46. TextDrawSetProportional(TDSite, 1);
  47. TDReg =TextDrawCreate(480.000000, 190.000000, 'Register');
  48. TextDrawAlignment(TDReg, 1);
  49. TextDrawSetShadow(TDReg, 0);
  50. TextDrawBackgroundColor(TDReg, 51);
  51. TextDrawSetProportional(TDReg, 1);
  52. TDName =TextDrawCreate(465.000000, 130.000000, 'SA-MP ~w~Server');
  53. TextDrawAlignment(TDName, 1);
  54. TextDrawSetShadow(TDName, 0);
  55. TextDrawBackgroundColor(TDName, 51);
  56. TextDrawSetProportional(TDName, 1);
  57. TDLogin =TextDrawCreate(495.000000, 160.000000, 'LOGIN');
  58. TextDrawAlignment(TDLogin, 1);
  59. TextDrawSetShadow(TDLogin, 0);
  60. TextDrawBackgroundColor(TDLogin, 51);
  61. TextDrawSetProportional(TDLogin, 1);
  62. }
  63. //------------------------------------------------------------------------------
  64. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  65. if(clickedid TDLogin)
  66. //Code
  67. if(clickedid TDReg)
  68. //Your Code
  69. return1;

From SA-MP Wiki

Jump to: navigation, search
Main Page Scripting Functions Scripting Callbacks Scripting Basics Server Plugins Tutorials


Description:

Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable).


Parameters:
textThe TextDraw to set the size of.
Float:xThe size on the X axis (left/right) following the same 640x480 grid as TextDrawCreate.
Float:yThe size on the Y axis (up/down) following the same 640x480 grid as TextDrawCreate.
Textdraw create samp


Return Values:

  • 1: The function was executed successfully.
  • 0: The function failed to execute. This means the textdraw specified does not exist.


Clinica sierra vista interview questions.


Notes

  • The x and y have different meanings with different TextDrawAlignment values:
    • 1 (left): they are the right-most corner of the box, absolute coordinates.
    • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
    • 3 (right): the x and y are the coordinates of the left-most corner of the box
  • Using font type 4 (sprite) and 5 (model preview) converts X and Y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
  • The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
  • This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not.


Example Usage:

Tip
If you want to change the text size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible.


Related Functions

The following functions may be helpful as they relate to this function in one way or another.

  • TextDrawCreate: Create a textdraw.
  • TextDrawDestroy: Destroy a textdraw.
  • TextDrawColor: Set the color of the text in a textdraw.
  • TextDrawBoxColor: Set the color of the box in a textdraw.
  • TextDrawBackgroundColor: Set the background color of a textdraw.
  • TextDrawAlignment: Set the alignment of a textdraw.
  • TextDrawFont: Set the font of a textdraw.
  • TextDrawLetterSize: Set the letter size of the text in a textdraw.
  • TextDrawSetOutline: Choose whether the text has an outline.
  • TextDrawSetShadow: Toggle shadows on a textdraw.
  • TextDrawSetProportional: Scale the text spacing in a textdraw to a proportional ratio.
  • TextDrawUseBox: Toggle if the textdraw has a box or not.
  • TextDrawSetString: Set the text in an existing textdraw.


  • TextDrawShowForPlayer: Show a textdraw for a certain player.
  • TextDrawHideForPlayer: Hide a textdraw for a certain player.
  • TextDrawShowForAll: Show a textdraw for all players.
  • TextDrawHideForAll: Hide a textdraw for all players.
Retrieved from 'https://wiki.sa-mp.com/wiki/TextDrawTextSize'