Advertisement
Guest User

Untitled

a guest
Feb 26th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.75 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new PlayerText:Escolha[MAX_PLAYERS][6];
  4.  
  5.  
  6.  
  7. public OnGameModeInit()
  8. {
  9. return 1;
  10. }
  11.  
  12. public OnPlayerConnect(playerid)
  13. {
  14. Escolha[playerid][0] = CreatePlayerTextDraw(playerid, 209.000000, 142.000000, "__");
  15. PlayerTextDrawBackgroundColor(playerid, Escolha[playerid][0], 255);
  16. PlayerTextDrawFont(playerid, Escolha[playerid][0], 1);
  17. PlayerTextDrawLetterSize(playerid, Escolha[playerid][0], 0.500000, 10.000000);
  18. PlayerTextDrawColor(playerid, Escolha[playerid][0], -1);
  19. PlayerTextDrawSetOutline(playerid, Escolha[playerid][0], 0);
  20. PlayerTextDrawSetProportional(playerid, Escolha[playerid][0], 1);
  21. PlayerTextDrawSetShadow(playerid, Escolha[playerid][0], 1);
  22. PlayerTextDrawUseBox(playerid, Escolha[playerid][0], 1);
  23. PlayerTextDrawBoxColor(playerid, Escolha[playerid][0], 2038004218);
  24. PlayerTextDrawTextSize(playerid, Escolha[playerid][0], 78.000000, 6.000000);
  25.  
  26. Escolha[playerid][1] = CreatePlayerTextDraw(playerid, 379.000000, 142.000000, "__");
  27. PlayerTextDrawBackgroundColor(playerid, Escolha[playerid][1], 255);
  28. PlayerTextDrawFont(playerid, Escolha[playerid][1], 1);
  29. PlayerTextDrawLetterSize(playerid, Escolha[playerid][1], 0.500000, 10.000000);
  30. PlayerTextDrawColor(playerid, Escolha[playerid][1], -1);
  31. PlayerTextDrawSetOutline(playerid, Escolha[playerid][1], 0);
  32. PlayerTextDrawSetProportional(playerid, Escolha[playerid][1], 1);
  33. PlayerTextDrawSetShadow(playerid, Escolha[playerid][1], 1);
  34. PlayerTextDrawUseBox(playerid, Escolha[playerid][1], 1);
  35. PlayerTextDrawBoxColor(playerid, Escolha[playerid][1], 2038004223);
  36. PlayerTextDrawTextSize(playerid, Escolha[playerid][1], 247.000000, 6.000000);
  37.  
  38. Escolha[playerid][2] = CreatePlayerTextDraw(playerid, 542.000000, 142.000000, "__");
  39. PlayerTextDrawBackgroundColor(playerid, Escolha[playerid][2], 255);
  40. PlayerTextDrawFont(playerid, Escolha[playerid][2], 1);
  41. PlayerTextDrawLetterSize(playerid, Escolha[playerid][2], 0.500000, 10.000000);
  42. PlayerTextDrawColor(playerid, Escolha[playerid][2], -1);
  43. PlayerTextDrawSetOutline(playerid, Escolha[playerid][2], 0);
  44. PlayerTextDrawSetProportional(playerid, Escolha[playerid][2], 1);
  45. PlayerTextDrawSetShadow(playerid, Escolha[playerid][2], 1);
  46. PlayerTextDrawUseBox(playerid, Escolha[playerid][2], 1);
  47. PlayerTextDrawBoxColor(playerid, Escolha[playerid][2], 1869574143);
  48. PlayerTextDrawTextSize(playerid, Escolha[playerid][2], 413.000000, 6.000000);
  49.  
  50. Escolha[playerid][3] = CreatePlayerTextDraw(playerid, 209.000000, 265.000000, "__");
  51. PlayerTextDrawBackgroundColor(playerid, Escolha[playerid][3], 255);
  52. PlayerTextDrawFont(playerid, Escolha[playerid][3], 1);
  53. PlayerTextDrawLetterSize(playerid, Escolha[playerid][3], 0.500000, 10.000000);
  54. PlayerTextDrawColor(playerid, Escolha[playerid][3], -1);
  55. PlayerTextDrawSetOutline(playerid, Escolha[playerid][3], 0);
  56. PlayerTextDrawSetProportional(playerid, Escolha[playerid][3], 1);
  57. PlayerTextDrawSetShadow(playerid, Escolha[playerid][3], 1);
  58. PlayerTextDrawUseBox(playerid, Escolha[playerid][3], 1);
  59. PlayerTextDrawBoxColor(playerid, Escolha[playerid][3], 2038004218);
  60. PlayerTextDrawTextSize(playerid, Escolha[playerid][3], 78.000000, 6.000000);
  61.  
  62. Escolha[playerid][4] = CreatePlayerTextDraw(playerid, 379.000000, 265.000000, "__");
  63. PlayerTextDrawBackgroundColor(playerid, Escolha[playerid][4], 255);
  64. PlayerTextDrawFont(playerid, Escolha[playerid][4], 1);
  65. PlayerTextDrawLetterSize(playerid, Escolha[playerid][4], 0.500000, 10.000000);
  66. PlayerTextDrawColor(playerid, Escolha[playerid][4], -1);
  67. PlayerTextDrawSetOutline(playerid, Escolha[playerid][4], 0);
  68. PlayerTextDrawSetProportional(playerid, Escolha[playerid][4], 1);
  69. PlayerTextDrawSetShadow(playerid, Escolha[playerid][4], 1);
  70. PlayerTextDrawUseBox(playerid, Escolha[playerid][4], 1);
  71. PlayerTextDrawBoxColor(playerid, Escolha[playerid][4], 2038004223);
  72. PlayerTextDrawTextSize(playerid, Escolha[playerid][4], 247.000000, 6.000000);
  73.  
  74. Escolha[playerid][5] = CreatePlayerTextDraw(playerid, 542.000000, 265.000000, "__");
  75. PlayerTextDrawBackgroundColor(playerid, Escolha[playerid][5], 255);
  76. PlayerTextDrawFont(playerid, Escolha[playerid][5], 1);
  77. PlayerTextDrawLetterSize(playerid, Escolha[playerid][5], 0.500000, 10.000000);
  78. PlayerTextDrawColor(playerid, Escolha[playerid][5], -1);
  79. PlayerTextDrawSetOutline(playerid, Escolha[playerid][5], 0);
  80. PlayerTextDrawSetProportional(playerid, Escolha[playerid][5], 1);
  81. PlayerTextDrawSetShadow(playerid, Escolha[playerid][5], 1);
  82. PlayerTextDrawUseBox(playerid, Escolha[playerid][5], 1);
  83. PlayerTextDrawBoxColor(playerid, Escolha[playerid][5], 1869574143);
  84. PlayerTextDrawTextSize(playerid, Escolha[playerid][5], 413.000000, 6.000000);
  85.  
  86.  
  87. PlayerTextDrawSetSelectable(playerid, Escolha[playerid][0], 1);
  88. PlayerTextDrawSetSelectable(playerid, Escolha[playerid][1], 1);
  89. PlayerTextDrawSetSelectable(playerid, Escolha[playerid][2], 1);
  90. //PlayerTextDrawSetSelectable(playerid, Escolha[playerid][3], 1);
  91. //PlayerTextDrawSetSelectable(playerid, Escolha[playerid][4], 1);
  92. //PlayerTextDrawSetSelectable(playerid, Escolha[playerid][5], 1);
  93. return 1;
  94. }
  95.  
  96.  
  97. public OnPlayerSpawn(playerid)
  98. {
  99. InterpolateCameraPos(playerid, -2328.572021, 1456.048095, 141.509216, -2928.397460, 1388.436035, 164.589508, 15000);
  100. InterpolateCameraLookAt(playerid, -2332.968994, 1457.633422, 139.733627, -2924.312500, 1390.837646, 162.994110, 15000);
  101. SelectTextDraw(playerid, 0x00EEEEFF);
  102. for(new i = 0; i < sizeof(Escolha); i++)
  103. {
  104.  
  105. PlayerTextDrawShow(playerid, Escolha[playerid][i]);
  106. }
  107. return 1;
  108. }
  109.  
  110. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  111. {
  112. if(newkeys == KEY_SUBMISSION)
  113. {
  114. SelectTextDraw(playerid, 0xFF4040AA);
  115. }
  116. return 1;
  117. }
  118.  
  119. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  120. {
  121. if(playertextid == Escolha[playerid][0])
  122. {
  123. SetPlayerPos(playerid, 319.29999, 1027.2, 1943.2);
  124. }
  125. if(playertextid == Escolha[playerid][1])
  126. {
  127. SetPlayerPos(playerid, 368.39999, 160.5, 1026.59998);
  128. }
  129. if(playertextid == Escolha[playerid][2])
  130. {
  131. SetPlayerPos(playerid, 1479.09998, -693.90002, 96.5);
  132. }
  133. if(clickedid == Escolha[playerid][3])
  134. {
  135. SetPlayerPos(playerid, 319.29999, 319.29999, 323.2);
  136. }
  137. if(clickedid == Escolha[playerid][4])
  138. {
  139. SetPlayerPos(playerid, 319.23399, 342.2343, 23.3);
  140. }
  141. if(clickedid == Escolha[playerid][6])
  142. {
  143. SetPlayerPos(playerid, 232.2132, 123.2133, 32.3);
  144. }
  145. return 1;
  146. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement