Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define PickupCor 0xF09C00AA
- #define DMenuAutoEscola 200
- #define DInstrucaoAutoEscola 201
- #define DRepetirCarros1 202
- #define DRepetirCarros2 203
- #define DRepetirCarros3 204
- #define DRepetirMoto1 205
- #define DRepetirMoto2 206
- #define DRepetirMoto3 207
- #define DRepetirAero1 208
- #define DRepetirAero2 209
- #define MAXPLAYERS 40
- //=============================[† Forward †]====================================
- forward VerificarConclusao(playerid);
- //============================[† Variáveis †]===================================
- new VAutoEscolaTeste[MAXPLAYERS]; //Veiculo do teste
- new TesteEtapa[MAXPLAYERS]; //Etapa do teste
- new FazendoTeste[MAXPLAYERS]; //Fazendo teste
- new Verificar[MAXPLAYERS]; //Tempo para chegada
- new Float: TesteCoords[21][3] = //Coordenadas dos Checkpoints
- {
- {-1641.479980, 1300.554687, 6.861728}, //Chegada 1° teste carros
- {-1838.397460, -2455.462890, 27.546628}, //1° Ponto 2° teste carros
- {-1649.979736, -2619.526611, 45.465484}, //2° Ponto 2° teste carros
- {-1180.888061, -2639.533447, 11.539744}, //3° Ponto 2° teste carros
- {-780.500183, -2684.883544, 83.137527}, //4° Ponto 2° teste carros
- {-364.759643, -2255.772216, 43.043220}, //5° Ponto 2° teste carros
- {-160.736419, -2425.323242, 35.856044}, //6° Ponto 2° teste carros
- {-184.029815, -2819.222167, 42.097366}, //7° Ponto 2° teste carros
- {-1342.344726, -2875.889160, 54.987930}, //8° Ponto 2° teste carros
- {-1970.295898, -2434.038574, 30.194002}, //Chegada 2° teste carros
- {2305.241455, 1962.293823, 9.433162}, //1° Ponto 3° teste carros
- {2236.203613, 1974.228759, 31.350551}, //Saída 3° teste carros
- {2305.241455, 1962.293823, 9.433162}, //Chegada 3° teste carros
- {305.941436, -1760.017211, 7.244368}, //1° Ponto 1° teste motos
- {294.514434, -1758.280761, 8.047305}, //Chegada 1° teste motos
- {2775.379394, -1044.423217, 38.830417}, //1° Ponto 2° teste motos
- {2697.045410, -1050.630004, 67.454254}, //2° Ponto 2° teste motos
- {2660.527099, -1071.078979, 68.900634}, //3° Ponto 2° teste motos
- {2742.664794, -1177.842651, 68.896690}, //4° Ponto 2° teste motos
- {2815.201416, -1170.591308, 32.239631}, //Chegada 2° teste motos
- {-577.292663, -189.324462, 78.249137} //Chegada 3° teste motos
- };
- main()
- {
- print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Progressão Pawn\n Envolvendo jogadores, revolucionando servidores!\n Josma_CMD\n\n\n\n\n\n\n\n\n");
- }//MAIN By: Gill Penner
- public OnFilterScriptInit()
- {
- CreatePickup(1239, 1, 1494.325195,1304.942871,1093.289062, 0); //Pickup autoescola entrada
- CreatePickup(1239, 1, 1081.219726, -1696.847534, 13.546875, 0); //Pickup autoescola saída
- CreatePickup(2894, 1, 1490.509765, 1305.782958, 1093.296386, 0); //Pickup menu auto escola
- Create3DTextLabel("Auto escola\nPressione ENTER para entrar.", PickupCor, 356.8607,186.0784,1009.1264, 40, 0, 0);
- Create3DTextLabel("Auto escola\nPressione ENTER para sair.", PickupCor, 1494.325195,1304.942871,1093.289062, 40, 0, 0);
- Create3DTextLabel("Menu Auto escola\nPressione ENTER para ver as opções.", PickupCor, 1490.509765, 1305.782958, 1093.296386, 40, 0, 0);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0x1E90FF99, "Este servidor usa um sistema de teste de habilitação do{FFFFFF} Progressão Pawn - Josma_CMD");
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(oldstate == PLAYER_STATE_DRIVER)
- {
- if(TesteEtapa[playerid] == 14 && FazendoTeste[playerid] == 1 || TesteEtapa[playerid] == 13 && FazendoTeste[playerid] == 1)
- {
- ShowPlayerDialog(playerid, DRepetirMoto1, DIALOG_STYLE_MSGBOX, "Você caiu", "Você caiu da moto, deseja repetir o teste?", "Sim", "Não");
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- DisablePlayerRaceCheckpoint(playerid);
- return 1;
- }
- return 1;
- }
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- new Float: lataria, Float: P[3]; //Cria as variáveis que serão usadas abaixo
- GetVehicleHealth(VAutoEscolaTeste[playerid], lataria); //Getará o health do veiculo, para ver se o player danificou ele no teste
- GetPlayerPos(playerid, P[0], P[1], P[2]); //Pegará a coordenada de onde será aplicado o som
- PlayerPlaySound(playerid, 1053, P[0], P[1], P[2]); //Aplicará som ao entrar no Race Checkpoint
- if(TesteEtapa[playerid] == 1 && FazendoTeste[playerid] == 1)
- {
- if(lataria < 1000)
- {
- ShowPlayerDialog(playerid, DRepetirCarros1, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você danificou seu veículo, deseja repetir o teste?", "Sim", "Não");
- KillTimer(Verificar[playerid]);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- DisablePlayerRaceCheckpoint(playerid);
- return 1;
- }
- else if(lataria == 1000)
- {
- ShowPlayerDialog(playerid, DRepetirCarros2, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você deseja passar para a próxima etapa do teste de habilitação?", "Sim", "Não");
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- KillTimer(Verificar[playerid]);
- DisablePlayerRaceCheckpoint(playerid);
- return 1;
- }
- return 1;
- }
- if(TesteEtapa[playerid] == 2 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[2][0], TesteCoords[2][1], TesteCoords[2][2], TesteCoords[3][0], TesteCoords[3][1], TesteCoords[3][2], 5.0);
- TesteEtapa[playerid] = 3;
- return 1;
- }
- if(TesteEtapa[playerid] == 3 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[3][0], TesteCoords[3][1], TesteCoords[3][2], TesteCoords[4][0], TesteCoords[4][1], TesteCoords[4][2], 5.0);
- TesteEtapa[playerid] = 4;
- return 1;
- }
- if(TesteEtapa[playerid] == 4 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[4][0], TesteCoords[4][1], TesteCoords[4][2], TesteCoords[5][0], TesteCoords[5][1], TesteCoords[5][2], 5.0);
- TesteEtapa[playerid] = 5;
- return 1;
- }
- if(TesteEtapa[playerid] == 5 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[5][0], TesteCoords[5][1], TesteCoords[5][2], TesteCoords[6][0], TesteCoords[6][1], TesteCoords[6][2], 5.0);
- TesteEtapa[playerid] = 6;
- return 1;
- }
- if(TesteEtapa[playerid] == 6 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[6][0], TesteCoords[6][1], TesteCoords[6][2], TesteCoords[7][0], TesteCoords[7][1], TesteCoords[7][2], 5.0);
- TesteEtapa[playerid] = 7;
- return 1;
- }
- if(TesteEtapa[playerid] == 7 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[7][0], TesteCoords[7][1], TesteCoords[7][2], TesteCoords[8][0], TesteCoords[8][1], TesteCoords[8][2], 5.0);
- TesteEtapa[playerid] = 8;
- return 1;
- }
- if(TesteEtapa[playerid] == 8 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[8][0], TesteCoords[8][1], TesteCoords[8][2], TesteCoords[9][0], TesteCoords[9][1], TesteCoords[9][2], 5.0);
- TesteEtapa[playerid] = 9;
- return 1;
- }
- if(TesteEtapa[playerid] == 9 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, TesteCoords[9][0], TesteCoords[9][1], TesteCoords[9][2], TesteCoords[9][0], TesteCoords[9][1], TesteCoords[9][2], 5.0);
- TesteEtapa[playerid] = 10;
- return 1;
- }
- if(TesteEtapa[playerid] == 10 && FazendoTeste[playerid] == 1)
- {
- if(lataria < 1000)
- {
- ShowPlayerDialog(playerid, DRepetirCarros2, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você danificou seu veículo, deseja repetir o teste?", "Sim", "Não");
- KillTimer(Verificar[playerid]);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- DisablePlayerRaceCheckpoint(playerid);
- return 1;
- }
- else if(lataria == 1000)
- {
- ShowPlayerDialog(playerid, DRepetirCarros3, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você deseja passar para a próxima etapa do teste de habilitação?", "Sim", "Não");
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- KillTimer(Verificar[playerid]);
- DisablePlayerRaceCheckpoint(playerid);
- return 1;
- }
- return 1;
- }
- if(TesteEtapa[playerid] == 11 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, TesteCoords[11][0], TesteCoords[11][1], TesteCoords[11][2], TesteCoords[11][0], TesteCoords[11][1], TesteCoords[11][2], 5.0);
- TesteEtapa[playerid] = 12;
- return 1;
- }
- if(TesteEtapa[playerid] == 12 && FazendoTeste[playerid] == 1)
- {
- if(lataria < 1000)
- {
- ShowPlayerDialog(playerid, DRepetirCarros3, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você danificou seu veículo, deseja repetir o teste?", "Sim", "Não");
- KillTimer(Verificar[playerid]);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- DisablePlayerRaceCheckpoint(playerid);
- return 1;
- }
- else if(lataria == 1000)
- {
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 1497.034423, 1308.573730, 1093.294799);
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você tirou sua carteira de habilitação, e agora pode dirigir carros.", "Ok", "");
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- KillTimer(Verificar[playerid]);
- DisablePlayerRaceCheckpoint(playerid);
- //Aqui a variável habilitando o jogador à pilotar carros
- return 1;
- }
- return 1;
- }
- if(TesteEtapa[playerid] == 13 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, TesteCoords[14][0], TesteCoords[14][1], TesteCoords[14][2], TesteCoords[14][0], TesteCoords[14][1], TesteCoords[14][2], 5.0);
- TesteEtapa[playerid] = 14;
- FazendoTeste[playerid] = 0;
- return 1;
- }
- if(TesteEtapa[playerid] == 14 && FazendoTeste[playerid] == 0)
- {
- DisablePlayerRaceCheckpoint(playerid);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- ShowPlayerDialog(playerid, DRepetirMoto2, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você passou na primeira etapa, deseja ir para a próxima etapa do teste?", "Sim", "Não");
- return 1;
- }
- if(TesteEtapa[playerid] == 15 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[15][0], TesteCoords[15][1], TesteCoords[15][2], TesteCoords[16][0], TesteCoords[16][1], TesteCoords[16][2], 5.0);
- TesteEtapa[playerid] = 16;
- return 1;
- }
- if(TesteEtapa[playerid] == 16 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[16][0], TesteCoords[16][1], TesteCoords[16][2], TesteCoords[17][0], TesteCoords[17][1], TesteCoords[17][2], 5.0);
- TesteEtapa[playerid] = 17;
- return 1;
- }
- if(TesteEtapa[playerid] == 17 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[17][0], TesteCoords[17][1], TesteCoords[17][2], TesteCoords[18][0], TesteCoords[18][1], TesteCoords[18][2], 5.0);
- TesteEtapa[playerid] = 18;
- return 1;
- }
- if(TesteEtapa[playerid] == 18 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[18][0], TesteCoords[18][1], TesteCoords[18][2], TesteCoords[19][0], TesteCoords[19][1], TesteCoords[19][2], 5.0);
- TesteEtapa[playerid] = 19;
- return 1;
- }
- if(TesteEtapa[playerid] == 19 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, TesteCoords[19][0], TesteCoords[19][1], TesteCoords[19][2], TesteCoords[19][0], TesteCoords[19][1], TesteCoords[19][2], 5.0);
- TesteEtapa[playerid] = 20;
- return 1;
- }
- if(TesteEtapa[playerid] == 20 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- ShowPlayerDialog(playerid, DRepetirMoto3, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você passou na segunda etapa, deseja ir para a próxima etapa do teste?", "Sim", "Não");
- TesteEtapa[playerid] = 0;
- KillTimer(Verificar[playerid]);
- return 1;
- }
- if(TesteEtapa[playerid] == 21 && FazendoTeste[playerid] == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 1497.034423, 1308.573730, 1093.294799);
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você concluiu o teste para adiquirir sua habilitação, agora já pode pilotar motos.", "Ok", "");
- TesteEtapa[playerid] = 0;
- KillTimer(Verificar[playerid]);
- //Aqui a variável habilitando o jogador à pilotar motos
- return 1;
- }
- if(TesteEtapa[playerid] == 22 && FazendoTeste[playerid] == 1)
- {
- if(lataria < 1000)
- {
- DisablePlayerRaceCheckpoint(playerid);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- KillTimer(Verificar[playerid]);
- ShowPlayerDialog(playerid, DRepetirAero1, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você danificou sua aeronave, deseja repetir o teste?", "Sim", "Não");
- return 1;
- }
- else if(lataria == 1000)
- {
- DisablePlayerRaceCheckpoint(playerid);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- ShowPlayerDialog(playerid, DRepetirAero2, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você passou na primeira etapa do teste de aeronaves, deseja passar para próxima etapa?", "Sim", "Não");
- TesteEtapa[playerid] = 0;
- KillTimer(Verificar[playerid]);
- return 1;
- }
- return 1;
- }
- if(TesteEtapa[playerid] == 23 && FazendoTeste[playerid] == 1)
- {
- if(lataria < 1000)
- {
- DisablePlayerRaceCheckpoint(playerid);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- KillTimer(Verificar[playerid]);
- ShowPlayerDialog(playerid, DRepetirAero2, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você danificou sua aeronave, deseja repetir o teste?", "Sim", "Não");
- return 1;
- }
- else if(lataria == 1000)
- {
- DisablePlayerRaceCheckpoint(playerid);
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 1497.034423, 1308.573730, 1093.294799);
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Você conseguiu", "Você terminou o teste para obter a hábilitação para pilotar aeronaves, e agora já pode pilotar.", "Ok", "");
- TesteEtapa[playerid] = 0;
- KillTimer(Verificar[playerid]);
- //Aqui a variável habilitando o jogador à pilotar aeronaves
- return 1;
- }
- return 1;
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_SECONDARY_ATTACK)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1081.219726, -1696.847534, 13.546875)) //Caso esteja nesta coordenada, executará o que está abaixo
- {
- SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062); //Teleporta para dentro da Auto Escola
- SetPlayerInterior(playerid, 3); //Setará o interior para [3]
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1494.325195,1304.942871,1093.289062)) //Caso esteja nesta coordenada, executará o que está abaixo
- {
- SetPlayerPos(playerid, 1081.219726, -1696.847534, 13.546875); //Teleporta para fora da Auto Escola
- SetPlayerInterior(playerid, 0); //Setará o interior para [0]
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1490.509765, 1305.782958, 1093.296386)) //Caso esteja nesta coordenada, executará o que está abaixo
- {
- ShowPlayerDialog(playerid, DMenuAutoEscola, DIALOG_STYLE_LIST, "{FFFFFF}Escolha o teste", "{FFFFFF}Carros {1E90FF}$5.000\n{FFFFFF}Motos {1E90FF}$3.000\n{FFFFFF}Aeronaves {1E90FF}$4.000", "Comprar", "Cancelar"); //Mostrará o menu
- return 1;
- }
- return 1;
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case DMenuAutoEscola:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Dirija de LS até o porto de San Fierro sem danos e em menos de 3:40 minutos", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(402, 1089.949218, -1757.977783, 13.212669, 89.3455565, 1, 1, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerInterior(playerid, 0);
- TesteEtapa[playerid] = 1;
- FazendoTeste[playerid] = 1;
- GivePlayerMoney(playerid, -5000);
- Verificar[playerid] = SetTimerEx("VerificarConclusao", 220000, false, "playerid", playerid);
- SetPlayerRaceCheckpoint(playerid, 1, TesteCoords[0][0], TesteCoords[0][1], TesteCoords[0][2], TesteCoords[0][0], TesteCoords[0][1], TesteCoords[0][2], 5.0);
- return 1;
- }
- case 1:
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Siga reto e suba na laje atravez do meio fiu. Após isso vá para a casa do lado esquerdo com a moto.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(522, 305.917968, -1868.175415, 2.393410, 0.3362, 0, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[13][0], TesteCoords[13][1], TesteCoords[13][2], TesteCoords[14][0], TesteCoords[14][1], TesteCoords[14][2], 5.0);
- TesteEtapa[playerid] = 13;
- GivePlayerMoney(playerid, -3000);
- FazendoTeste[playerid] = 1;
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- case 2:
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Decole o avião, leve-o até o hangar localizado no aeroporto abandonado de Las Venturas, estacione-o.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(511, -1646.996459, -154.085769, 15.522509, 315.0830, 0, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerRaceCheckpoint(playerid, 1, 405.687927, 2451.601562, 17.873716, 405.687927, 2451.601562, 17.873716, 5.0);
- TesteEtapa[playerid] = 22;
- GivePlayerMoney(playerid, -4000);
- FazendoTeste[playerid] = 1;
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- }
- return 1;
- }
- return 1;
- }
- case DRepetirCarros1:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Dirija de LS até o porto de San Fierro sem danos e em menos de 3:40 minutos", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(402, 1089.949218, -1757.977783, 13.212669, 89.3455565, 1, 1, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerInterior(playerid, 0);
- TesteEtapa[playerid] = 1;
- FazendoTeste[playerid] = 1;
- Verificar[playerid] = SetTimerEx("VerificarConclusao", 220000, false, "playerid", playerid);
- SetPlayerRaceCheckpoint(playerid, 1, TesteCoords[0][0], TesteCoords[0][1], TesteCoords[0][2], TesteCoords[0][0], TesteCoords[0][1], TesteCoords[0][2], 5.0);
- return 1;
- }
- return 1;
- }
- case DRepetirCarros2:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Siga a trilha de checkpoints até o final do circuito, sem danos e em menos de 3:00 minutos", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(424, -1970.295898, -2434.038574, 30.194002, 273.215728, 0, 1, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerInterior(playerid, 0);
- TesteEtapa[playerid] = 2;
- FazendoTeste[playerid] = 1;
- Verificar[playerid] = SetTimerEx("VerificarConclusao", 180000, false, "playerid", playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[1][0], TesteCoords[1][1], TesteCoords[1][2], TesteCoords[2][0], TesteCoords[2][1], TesteCoords[2][2], 5.0);
- return 1;
- }
- return 1;
- }
- case DRepetirCarros3:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Desca pelo estacionamento até o Checkpoint no térreo e suba até o ponto de partida, sem danos e em 1:15 minutos", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(562, 2236.203613, 1974.228759, 31.350551, 273.215728, 158, 1, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerInterior(playerid, 0);
- TesteEtapa[playerid] = 11;
- FazendoTeste[playerid] = 1;
- Verificar[playerid] = SetTimerEx("VerificarConclusao", 75000, false, "playerid", playerid);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[12][0], TesteCoords[12][1], TesteCoords[12][2], TesteCoords[11][0], TesteCoords[11][1], TesteCoords[11][2], 5.0);
- return 1;
- }
- return 1;
- }
- case DRepetirMoto1:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Siga reto e suba na laje atravez do meio fiu. Após isso vá para a casa do lado esquerdo com a moto.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(522, 305.917968, -1868.175415, 2.393410, 0.3362, 0, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerRaceCheckpoint(playerid, 0, TesteCoords[13][0], TesteCoords[13][1], TesteCoords[13][2], TesteCoords[14][0], TesteCoords[14][1], TesteCoords[14][2], 5.0);
- TesteEtapa[playerid] = 13;
- FazendoTeste[playerid] = 1;
- return 1;
- }
- return 1;
- }
- case DRepetirMoto2:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Siga a trilha de checkpoints até o alto do morro, por fim, pule o muro e pare na laje abaixo.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(522, 2838.280517, -1046.117309, 22.838201, 89.345565, 0, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerRaceCheckpoint(playerid, 0, 2838.280517, -1046.117309, 22.838201, TesteCoords[15][0], TesteCoords[15][1], TesteCoords[15][2], 5.0);
- TesteEtapa[playerid] = 15;
- FazendoTeste[playerid] = 1;
- return 1;
- }
- return 1;
- }
- case DRepetirMoto3:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Chegue até o checkpoint em menos de 1:50 minutos, pegue o caminho que desejar.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(468, 2418.786132, 91.505310, 26.047235, 89.345565, 158, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- Verificar[playerid] = SetTimerEx("VerificarConclusao", 150000, false, "playerid", playerid);
- SetPlayerRaceCheckpoint(playerid, 1, -577.292663, -189.324462, 78.249137, TesteCoords[20][0], TesteCoords[20][1], TesteCoords[20][2], 5.0);
- TesteEtapa[playerid] = 21;
- FazendoTeste[playerid] = 1;
- return 1;
- }
- return 1;
- }
- case DRepetirAero1:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Decole o avião, leve-o até o hangar localizado no aeroporto abandonado de Las Venturas, estacione-o.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(511, -1646.996459, -154.085769, 15.522509, 315.0830, 0, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerRaceCheckpoint(playerid, 1, 405.687927, 2451.601562, 17.873716, 405.687927, 2451.601562, 17.873716, 5.0);
- TesteEtapa[playerid] = 22;
- FazendoTeste[playerid] = 1;
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- return 1;
- }
- case DRepetirAero2:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Decole o avião, leve-o até o hangar localizado no aeroporto abandonado de Las Venturas, estacione-o.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(563, 1766.504882, -2286.285644, 27.501468, 268.859832, 0, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- SetPlayerRaceCheckpoint(playerid, 1, 2093.283447, 2414.863037, 75.284034, 2093.283447, 2414.863037, 75.284034, 5.0);
- TesteEtapa[playerid] = 23;
- FazendoTeste[playerid] = 1;
- return 1;
- }
- return 1;
- }
- }
- return 1;
- }
- public VerificarConclusao(playerid) //É chamada no fim do prazo, se o player chegar à tempo esse timer é destruído, então não será chamado
- {
- //Abaixo todas as etapas que tem um tempo limite para a chegada
- if(TesteEtapa[playerid] == 1)
- {
- if(FazendoTeste[playerid] == 1)
- {
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- TesteEtapa[playerid] = 0;
- ShowPlayerDialog(playerid, DRepetirCarros1, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você não chegou à tempo, deseja repetir o teste?", "Sim", "Não");
- return 1;
- }
- return 1;
- }
- if(TesteEtapa[playerid] >= 2 && TesteEtapa[playerid] <= 10)
- {
- if(FazendoTeste[playerid] == 1)
- {
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- TesteEtapa[playerid] = 0;
- ShowPlayerDialog(playerid, DRepetirCarros2, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você não chegou à tempo, deseja repetir o teste?", "Sim", "Não");
- return 1;
- }
- return 1;
- }
- if(TesteEtapa[playerid] >= 11 && TesteEtapa[playerid] <= 12)
- {
- if(FazendoTeste[playerid] == 1)
- {
- DestroyVehicle(VAutoEscolaTeste[playerid]);
- FazendoTeste[playerid] = 0;
- TesteEtapa[playerid] = 0;
- ShowPlayerDialog(playerid, DRepetirCarros3, DIALOG_STYLE_MSGBOX, "Você não conseguiu", "Você não chegou à tempo, deseja repetir o teste?", "Sim", "Não");
- return 1;
- }
- return 1;
- }
- if(TesteEtapa[playerid] == 21)
- {
- if(FazendoTeste[playerid] == 1)
- {
- ShowPlayerDialog(playerid, DInstrucaoAutoEscola, DIALOG_STYLE_MSGBOX, "Como concluír seu teste", "Chegue até o checkpoint em menos de 1:50 minutos, pegue o caminho que desejar.", "OK", "");
- VAutoEscolaTeste[playerid] = CreateVehicle(468, 2418.786132, 91.505310, 26.047235, 89.345565, 158, 158, 5000);
- PutPlayerInVehicle(playerid, VAutoEscolaTeste[playerid], 0);
- Verificar[playerid] = SetTimerEx("VerificarConclusao", 15000, false, "playerid", playerid);
- SetPlayerRaceCheckpoint(playerid, 1, 2838.280517, -1046.117309, 22.838201, TesteCoords[20][0], TesteCoords[20][1], TesteCoords[20][2], 5.0);
- TesteEtapa[playerid] = 21;
- FazendoTeste[playerid] = 1;
- return 1;
- }
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement