Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( cmd == "evento" )//ADD ESSE COMANDO!
- {
- if ( !player.IsSpawned ) E_MSG("Escolha uma skin para usar esse comando.", player );
- else if ( player.World == 1000 ) E_MSG("Voce ja esta participando do evento.", player );
- else if ( player.IsFrozen ) E_MSG( "Voce nao pode usar este comando no momento.", player );
- else if ( player.Vehicle ) E_MSG( "Voce nao pode usar este comando dentro de um veiculo.", player );
- else
- {
- player.World = 1000;
- Evento[0].Participantes ++;
- player.Pos = Vector( -1738.57, -160.327, 14.8683 );
- player.IsFrozen = true;
- player.Team = 255;
- MSG( player.Name + " esta participando do evento." );
- }
- }
- function ResetarParticipantes()//ISSO FICA NAS FUNCTIONS!
- {
- Evento[0].Criado = false;
- MSG( "Evento Cancelado." );
- for( local i = 0, player; i < GetMaxPlayers(); i++ )
- {
- player = FindPlayer( i );
- if ( player )
- {
- if ( player.World == 1000 )
- {
- player.World = 1;
- player.Select();
- }
- }
- }
- }
- function ChecarVencedor()//ISSO FICA NAS FUNCTIONS!
- {
- Evento[0].Criado = false;
- for( local i = 0, player; i < GetMaxPlayers(); i++ )
- {
- player = FindPlayer( i );
- if ( player )
- {
- if ( player.World == 1000 )
- {
- player.World = 1;
- player.Select();
- MSG( player.Name + " foi o vencedor do Evento. Premio: 100 Mil." );
- IncCash( player, 100000 );
- }
- }
- }
- }
- function onPlayerPart( player, reason )//ESSA FUNÇÃO JA TEM NO MAIN, SO COLOCA O QUE TEM DENTRO!
- {
- if ( player.World == 1000 && Evento[0].Criado == true )
- {
- Evento[0].Participantes --;
- if ( Evento[0].Participantes < 1 ) ResetarParticipantes();
- else if ( Evento[0].Participantes == 1 ) ChecarVencedor();
- }
- }
- function onPlayerDeath( player, reason )//ESSA FUNÇÃO JA TEM NO MAIN, SO COLOCA O QUE TEM DENTRO!
- {
- if ( player.World == 1000 && Evento[0].Criado == true )
- {
- Evento[0].Participantes --;
- player.World = 1;
- if ( Evento[0].Participantes < 1 ) ResetarParticipantes();
- else if ( Evento[0].Participantes == 1 ) ChecarVencedor();
- }
- }
- function onPlayerKill( killer, player, reason, bodypart )//ESSA FUNÇÃO JA TEM NO MAIN, SO COLOCA O QUE TEM DENTRO!
- {
- if ( player.World == 1000 && Evento[0].Criado == true )
- {
- Evento[0].Participantes --;
- player.World = 1;
- if ( Evento[0].Participantes < 1 ) ResetarParticipantes();
- else if ( Evento[0].Participantes == 1 ) ChecarVencedor();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement