Guest User

textdraw

a guest
Dec 22nd, 2013
1,284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new Text:BotMSG;
  4.  
  5. new Commandbot[][] =
  6. {
  7. {"/command"},
  8. {"/command"},
  9. {"/command"},
  10. {"/command"}
  11. };
  12.  
  13. public OnFilterScriptInit()
  14. {
  15. SetTimer("msg", 20000, 1); //20 seconds
  16.  
  17. BotMSG = TextDrawCreate(43.000000, 324.000000, "__");
  18. TextDrawBackgroundColor(BotMSG, 96);
  19. TextDrawFont(BotMSG, 1);
  20. TextDrawLetterSize(BotMSG, 0.350000, 0.899999);
  21. TextDrawColor(BotMSG, 100271615);
  22. TextDrawSetOutline(BotMSG, 1);
  23. TextDrawSetProportional(BotMSG, 1);
  24. TextDrawSetSelectable(BotMSG, 0);
  25. return 1;
  26. }
  27.  
  28. public OnFilterScriptExit()
  29. {
  30. TextDrawDestroy(Text:BotMSG); //Destroy TD
  31. return 1;
  32. }
  33.  
  34. public OnPlayerRequestSpawn(playerid)
  35. {
  36. TextDrawShowForPlayer(playerid, Text:BotMSG); //Show TD
  37. return 1;
  38. }
  39.  
  40. forward msg();
  41. public msg()
  42. {
  43. TextDrawSetString(Text:BotMSG, Commandbot[random(sizeof(Commandbot))]);
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment