Advertisement
Guest User

Problema con TextDraw

a guest
Aug 17th, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. #include <a_samp>
  2. #include <core>
  3. #include <float>
  4.  
  5. #pragma tabsize 0
  6.  
  7. main()
  8. {
  9. print("\n----------------------------------");
  10. print(" Bare Script\n");
  11. print("----------------------------------\n");
  12. }
  13.  
  14. new test[MAX_PLAYERS];
  15. new test2[MAX_PLAYERS];
  16.  
  17. new Text:Textdraw0;
  18. new Text:Textdraw1;
  19.  
  20. public OnPlayerConnect(playerid)
  21. {
  22. test[playerid] = CreatePlayerObject(playerid, 6959, 2054.65, 1349.01, 9.71, 0.00, 0.00, 0.27);
  23. SetPlayerObjectMaterial(playerid, test[playerid], 0, 3437, "ballypillar01", "ballywall01_64", 0);
  24.  
  25. test2[playerid] = CreatePlayerObject(playerid, 11490, 2047.36, 1333.40, 9.56, 0.00, 0.00, 270.54);
  26. SetPlayerObjectMaterial(playerid, test2[playerid], 4, 3509, "vgsn_nitree", "vegaspalm01_128", 0);
  27.  
  28.  
  29. GameTextForPlayer(playerid,"~w~SA-MP: ~r~Bare Script",5000,5);
  30. return 1;
  31. }
  32.  
  33. public OnPlayerCommandText(playerid, cmdtext[])
  34. {
  35. new idx;
  36. new cmd[256];
  37.  
  38. cmd = strtok(cmdtext, idx);
  39.  
  40. if(strcmp(cmd, "/yadayada", true) == 0) {
  41. return 1;
  42. }
  43.  
  44. return 0;
  45. }
  46.  
  47. public OnPlayerSpawn(playerid)
  48. {
  49. SetPlayerInterior(playerid,0);
  50. TogglePlayerClock(playerid,0);
  51. return 1;
  52. }
  53.  
  54. public OnPlayerDeath(playerid, killerid, reason)
  55. {
  56. return 1;
  57. }
  58.  
  59. SetupPlayerForClassSelection(playerid)
  60. {
  61. SetPlayerInterior(playerid,14);
  62. SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
  63. SetPlayerFacingAngle(playerid, 270.0);
  64. SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
  65. SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
  66. }
  67.  
  68. public OnPlayerRequestClass(playerid, classid)
  69. {
  70. SetupPlayerForClassSelection(playerid);
  71. return 1;
  72. }
  73.  
  74. public OnGameModeInit()
  75. {
  76. SetGameModeText("Bare Script");
  77. ShowPlayerMarkers(1);
  78. ShowNameTags(1);
  79. AllowAdminTeleport(1);
  80.  
  81. AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
  82.  
  83.  
  84. Textdraw0 = TextDrawCreate(610.000000, 119.000000, "Caja de Datos");
  85. TextDrawBackgroundColor(Textdraw0, 255);
  86. TextDrawFont(Textdraw0, 1);
  87. TextDrawLetterSize(Textdraw0, 0.000000, 1.000000);
  88. TextDrawColor(Textdraw0, 102);
  89. TextDrawSetOutline(Textdraw0, 0);
  90. TextDrawSetProportional(Textdraw0, 0);
  91. TextDrawSetShadow(Textdraw0, 1);
  92. TextDrawUseBox(Textdraw0, 1);
  93. TextDrawBoxColor(Textdraw0, 102);
  94. TextDrawTextSize(Textdraw0, 490.000000, 133.000000);
  95.  
  96. Textdraw1 = TextDrawCreate(610.000000, 152.000000, "Caja de Datos Baja");
  97. TextDrawBackgroundColor(Textdraw1, 255);
  98. TextDrawFont(Textdraw1, 1);
  99. TextDrawLetterSize(Textdraw1, 0.000000, 1.000000);
  100. TextDrawColor(Textdraw1, -1);
  101. TextDrawSetOutline(Textdraw1, 0);
  102. TextDrawSetProportional(Textdraw1, 0);
  103. TextDrawSetShadow(Textdraw1, 1);
  104. TextDrawUseBox(Textdraw1, 1);
  105. TextDrawBoxColor(Textdraw1, 102);
  106. TextDrawTextSize(Textdraw1, 490.000000, 133.000000);
  107. return 1;
  108. }
  109.  
  110. strtok(const string[], &index)
  111. {
  112. new length = strlen(string);
  113. while ((index < length) && (string[index] <= ' '))
  114. {
  115. index++;
  116. }
  117.  
  118. new offset = index;
  119. new result[20];
  120. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  121. {
  122. result[index - offset] = string[index];
  123. index++;
  124. }
  125. result[index - offset] = EOS;
  126. return result;
  127. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement