Advertisement
Guest User

Teste Sistema de Cancela

a guest
Jun 26th, 2011
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. #include <a_samp>
  2. #include <cancela>
  3.  
  4. forward CancelaShowAbrir(cancelaid);
  5. forward CancelaShowFechar(cancelaid);
  6.  
  7. main()
  8. {
  9. print("\n----------------------------------");
  10. print(" Show de Cancelas");
  11. print("----------------------------------\n");
  12. }
  13.  
  14. public OnGameModeInit()
  15. {
  16. SetGameModeText("Blank Script");
  17. AddPlayerClass(0, 5.0, 5.0, 3.5, 0.0, 0, 0, 0, 0, 0, 0);
  18. new cancelaid = 0;
  19. for(new Float:i = 0; i <= 324; i += 36)
  20. {
  21. CriarCancela(cancelaid, 0.0, 0.0, 2.75, i);
  22. cancelaid++;
  23. }
  24. return 1;
  25. }
  26.  
  27. public OnPlayerCommandText(playerid, cmdtext[])
  28. {
  29. if(!strcmp("/show", cmdtext, true))
  30. {
  31. SendClientMessage(playerid, 0xCC0000FF, "O Show iniciou.");
  32. CancelaShowAbrir(0);
  33. SetTimerEx("CancelaShowAbrir", 200, false, "i", 1);
  34. SetTimerEx("CancelaShowAbrir", 400, false, "i", 2);
  35. SetTimerEx("CancelaShowAbrir", 600, false, "i", 3);
  36. SetTimerEx("CancelaShowAbrir", 800, false, "i", 4);
  37. SetTimerEx("CancelaShowAbrir", 1000, false, "i", 5);
  38. SetTimerEx("CancelaShowAbrir", 1200, false, "i", 6);
  39. SetTimerEx("CancelaShowAbrir", 1400, false, "i", 7);
  40. SetTimerEx("CancelaShowAbrir", 1600, false, "i", 8);
  41. SetTimerEx("CancelaShowAbrir", 1800, false, "i", 9);
  42. }
  43. if(!strcmp("/reiniciar", cmdtext, true))
  44. {
  45. SendClientMessage(playerid, 0xCC0000FF, "Você reiniciou o servidor.");
  46. GameModeExit();
  47. return 1;
  48. }
  49. return SendClientMessage(playerid, 0x777777FF, " Use: /Show.");
  50. }
  51.  
  52. public CancelaShowAbrir(cancelaid)
  53. {
  54. AbrirCancela(cancelaid, false);
  55. SetTimerEx("CancelaShowFechar", 1100, false, "i", cancelaid);
  56. return 1;
  57. }
  58.  
  59. public CancelaShowFechar(cancelaid)
  60. {
  61. FecharCancela(cancelaid);
  62. SetTimerEx("CancelaShowAbrir", 1100, false, "i", cancelaid);
  63. return 1;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement