Guest User

Untitled

a guest
Jan 31st, 2021
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. /*
  2.  
  3. CREDITOS SSGAMERS & ANDRADE
  4.  
  5. */
  6.  
  7.  
  8.  
  9. #include <a_samp>
  10.  
  11. new PlayerText:TextInfo[MAX_PLAYERS];
  12.  
  13. showTextInfo(playerid)
  14. {
  15. for(new x; x != 6; x++)
  16. {
  17. new newtext[136], name[MAX_PLAYER_NAME];
  18. GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  19. PlayerTextDrawSetString(playerid, TextInfo[playerid], newtext);
  20. format(newtext, sizeof(newtext), "ID:_%d_NOME:_%s_PING:_%d_LEVEL:_%d",playerid, name, GetPlayerPing(playerid), GetPlayerScore(playerid));
  21. PlayerTextDrawSetString(playerid, TextInfo[playerid], newtext);
  22. PlayerTextDrawShow(playerid, TextInfo[playerid]);
  23. }
  24. }
  25.  
  26. AtualizarTextInfo(playerid)
  27. {
  28. PlayerTextDrawHide(playerid, TextInfo[playerid]);
  29. for(new x; x != 6; x++)
  30. {
  31. new newtext[136], name[MAX_PLAYER_NAME];
  32. GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  33. PlayerTextDrawSetString(playerid, TextInfo[playerid], newtext);
  34. format(newtext, sizeof(newtext), "ID:_%d_NOME:_%s_PING:_%d_LEVEL:_%d",playerid, name, GetPlayerPing(playerid), GetPlayerScore(playerid));
  35. PlayerTextDrawSetString(playerid, TextInfo[playerid], newtext);
  36. PlayerTextDrawShow(playerid, TextInfo[playerid]);
  37. }
  38. }
  39.  
  40. public OnFilterScriptInit()
  41. {
  42. print("------------------------------------------------------------------------------------------------------------\n");
  43. print("SSGAMERS: Sistema De Textdraw Carregado Com Sucesso");
  44. print("------------------------------------------------------------------------------------------------------------\n");
  45. return 1;
  46. }
  47.  
  48. public OnFilterScriptExit()
  49. {
  50. return 1;
  51. }
  52.  
  53. public OnPlayerConnect(playerid)
  54. {
  55. TextInfo[playerid] = CreatePlayerTextDraw(playerid, 319.000000, 432.000000, "ID:_1__NOME:_ANDRADE__PING:_100__LEVEL:_10");
  56. PlayerTextDrawFont(playerid, TextInfo[playerid], 2);
  57. PlayerTextDrawLetterSize(playerid, TextInfo[playerid], 0.279166, 1.350000);
  58. PlayerTextDrawTextSize(playerid, TextInfo[playerid], 12.000000, 640.000000);
  59. PlayerTextDrawSetOutline(playerid, TextInfo[playerid], 0);
  60. PlayerTextDrawSetShadow(playerid, TextInfo[playerid], 0);
  61. PlayerTextDrawAlignment(playerid, TextInfo[playerid], 2);
  62. PlayerTextDrawColor(playerid, TextInfo[playerid], -1);
  63. PlayerTextDrawBackgroundColor(playerid, TextInfo[playerid], 255);
  64. PlayerTextDrawBoxColor(playerid, TextInfo[playerid], 101);
  65. PlayerTextDrawUseBox(playerid, TextInfo[playerid], 1);
  66. PlayerTextDrawSetProportional(playerid, TextInfo[playerid], 1);
  67. PlayerTextDrawSetSelectable(playerid, TextInfo[playerid], 0);
  68. return 1;
  69. }
  70.  
  71. public OnPlayerDisconnect(playerid, reason)
  72. {
  73. return 1;
  74. }
  75.  
  76. public OnPlayerSpawn(playerid)
  77. {
  78. showTextInfo(playerid);
  79. return 1;
  80. }
  81.  
  82. public OnPlayerUpdate(playerid)
  83. {
  84. AtualizarTextInfo(playerid);
  85. return 1;
  86. }
  87.  
Add Comment
Please, Sign In to add comment