Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. else if ( cmd == "evento" )//ADD ESSE COMANDO!
  2. {
  3. if ( !player.IsSpawned ) E_MSG("Escolha uma skin para usar esse comando.", player );
  4. else if ( player.World == 1000 ) E_MSG("Voce ja esta participando do evento.", player );
  5. else if ( player.IsFrozen ) E_MSG( "Voce nao pode usar este comando no momento.", player );
  6. else if ( player.Vehicle ) E_MSG( "Voce nao pode usar este comando dentro de um veiculo.", player );
  7. else
  8. {
  9. player.World = 1000;
  10. Evento[0].Participantes ++;
  11. player.Pos = Vector( -1738.57, -160.327, 14.8683 );
  12. player.IsFrozen = true;
  13. player.Team = 255;
  14. MSG( player.Name + " esta participando do evento." );
  15. }
  16. }
  17.  
  18. function ResetarParticipantes()//ISSO FICA NAS FUNCTIONS!
  19. {
  20. Evento[0].Criado = false;
  21. MSG( "Evento Cancelado." );
  22. for( local i = 0, player; i < GetMaxPlayers(); i++ )
  23. {
  24. player = FindPlayer( i );
  25. if ( player )
  26. {
  27. if ( player.World == 1000 )
  28. {
  29. player.World = 1;
  30. player.Select();
  31. }
  32. }
  33. }
  34. }
  35.  
  36. function ChecarVencedor()//ISSO FICA NAS FUNCTIONS!
  37. {
  38. Evento[0].Criado = false;
  39. for( local i = 0, player; i < GetMaxPlayers(); i++ )
  40. {
  41. player = FindPlayer( i );
  42. if ( player )
  43. {
  44. if ( player.World == 1000 )
  45. {
  46. player.World = 1;
  47. player.Select();
  48. MSG( player.Name + " foi o vencedor do Evento. Premio: 100 Mil." );
  49. IncCash( player, 100000 );
  50. }
  51. }
  52. }
  53. }
  54.  
  55. function onPlayerPart( player, reason )//ESSA FUNÇÃO JA TEM NO MAIN, SO COLOCA O QUE TEM DENTRO!
  56. {
  57. if ( player.World == 1000 && Evento[0].Criado == true )
  58. {
  59. Evento[0].Participantes --;
  60. if ( Evento[0].Participantes < 1 ) ResetarParticipantes();
  61. else if ( Evento[0].Participantes == 1 ) ChecarVencedor();
  62. }
  63. }
  64.  
  65. function onPlayerDeath( player, reason )//ESSA FUNÇÃO JA TEM NO MAIN, SO COLOCA O QUE TEM DENTRO!
  66. {
  67. if ( player.World == 1000 && Evento[0].Criado == true )
  68. {
  69. Evento[0].Participantes --;
  70. player.World = 1;
  71. if ( Evento[0].Participantes < 1 ) ResetarParticipantes();
  72. else if ( Evento[0].Participantes == 1 ) ChecarVencedor();
  73. }
  74. }
  75.  
  76. function onPlayerKill( killer, player, reason, bodypart )//ESSA FUNÇÃO JA TEM NO MAIN, SO COLOCA O QUE TEM DENTRO!
  77. {
  78. if ( player.World == 1000 && Evento[0].Criado == true )
  79. {
  80. Evento[0].Participantes --;
  81. player.World = 1;
  82. if ( Evento[0].Participantes < 1 ) ResetarParticipantes();
  83. else if ( Evento[0].Participantes == 1 ) ChecarVencedor();
  84. }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement