Guest User

FS TextDraw Randomico

a guest
Mar 8th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. // FS Básico TextDraw Randomico Feito por: Nork
  2. #include <a_samp>
  3. new Text:randommsg;
  4. new RandomMessages[][] =
  5. {
  6. "Seu Texto",
  7. "Seu Texto",
  8. "Seu Texto",
  9. "Seu Texto"
  10. };
  11. public OnFilterScriptInit()
  12. {
  13. SetTimer("RandomMessage",6000,true);
  14. randommsg = TextDrawCreate(438.000000, 1.000000, " ");
  15. TextDrawBackgroundColor(randommsg, -16776961);
  16. TextDrawFont(randommsg, 1);
  17. TextDrawLetterSize(randommsg, 0.300000, 1.700000);
  18. TextDrawColor(randommsg, -1);
  19. TextDrawSetOutline(randommsg, 0);
  20. TextDrawSetProportional(randommsg, 1);
  21. TextDrawSetShadow(randommsg, 0);
  22. return 1;
  23. }
  24.  
  25. public OnFilterScriptExit()
  26. {
  27. return 1;
  28. }
  29.  
  30. forward RandomMessage();
  31. public RandomMessage()
  32. {
  33. TextDrawSetString(randommsg, RandomMessages[random(sizeof(RandomMessages))]);
  34. return 1;
  35. }
  36.  
  37. public OnPlayerConnect(playerid)
  38. {
  39. TextDrawHideForPlayer(playerid, randommsg);
  40. return 1;
  41. }
  42. public OnPlayerSpawn(playerid)
  43. {
  44. TextDrawShowForPlayer(playerid, randommsg);
  45. return 1;
  46. }
  47. public OnPlayerRequestClass(playerid, classid)
  48. {
  49. TextDrawHideForPlayer(playerid, randommsg);
  50. return 1;
  51. }
  52. public OnPlayerDeath(playerid, killerid, reason)
  53. {
  54. TextDrawHideForPlayer(playerid, randommsg);
  55. return 1;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment