Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================Burunu=========================================//
- //Sistema desenvolvido por Burunu//
- //Ap: Diversificados Pawn//
- //===========================Burunu=========================================//
- #include <a_samp>
- #include <cpstream>
- #define Dialog_AutoEscola 5
- new CPAutoEscola;
- new point[MAX_PLAYERS];
- new Float:TerrestrePoints[8][3] = //Cordenadas dos Checkpoints
- {
- {1518.3596,-1459.9932,9.5000},
- {1606.9006,-1427.1610,13.4378},
- {1641.3010,-1304.1602,15.7496},
- {1641.3010,-1304.1602,15.7496},
- {1852.5596,-1226.3092,17.5544},
- {1772.5421,-1166.5100,23.6560},
- {1671.8254,-1159.1508,23.6563},
- {1599.1776,-1009.4454,23.9063}
- };
- public OnPlayerEnterCheckpoint(playerid){
- if(CPS_IsPlayerInCheckpoint(playerid,CPAutoEscola)){//Chekpoint da Auto-Escola (onde ira pegar a carteira)
- ShowPlayerDialog ( playerid, Dialog_AutoEscola, DIALOG_STYLE_TABLIST_HEADERS, "Habilitação","Categoria:\t Valor:\nTerrestre\t R$6000", "Ok" , "Cancelar" ) ;
- return 1;
- }
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid){
- //chekpoints onde ira começar os testes. //
- switch(point[playerid])
- {
- case 1:
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, TerrestrePoints[1][0], TerrestrePoints[1][1], TerrestrePoints[1][2],TerrestrePoints[2][0], TerrestrePoints[2][1], TerrestrePoints[2][2], 10);
- point[playerid] = 2;
- return 1;
- }
- case 2:
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, TerrestrePoints[2][0], TerrestrePoints[2][1], TerrestrePoints[2][2],TerrestrePoints[3][0], TerrestrePoints[3][1], TerrestrePoints[3][2], 10);
- point[playerid] = 3;
- return 1;
- }
- case 3:
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, TerrestrePoints[3][0], TerrestrePoints[3][1], TerrestrePoints[3][2],TerrestrePoints[4][0], TerrestrePoints[4][1], TerrestrePoints[4][2], 10);
- point[playerid] = 4;
- return 1;
- }
- case 4:
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, TerrestrePoints[4][0], TerrestrePoints[4][1], TerrestrePoints[4][2],TerrestrePoints[5][0], TerrestrePoints[5][1], TerrestrePoints[5][2], 10);
- point[playerid] = 5;
- return 1;
- }
- case 5:
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, TerrestrePoints[5][0], TerrestrePoints[5][1], TerrestrePoints[5][2],TerrestrePoints[6][0], TerrestrePoints[6][1], TerrestrePoints[6][2], 10);
- point[playerid] = 6;
- return 1;
- }
- case 6:
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, TerrestrePoints[6][0], TerrestrePoints[6][1], TerrestrePoints[6][2],TerrestrePoints[7][0], TerrestrePoints[7][1], TerrestrePoints[7][2], 10);
- point[playerid] = 7;
- return 1;
- }
- case 7:
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, TerrestrePoints[7][0], TerrestrePoints[7][1], TerrestrePoints[7][2],TerrestrePoints[7][0], TerrestrePoints[7][1], TerrestrePoints[7][2], 10);
- point[playerid] = 8;
- return 1;
- }
- case 8:{
- if(IsPlayerInVehicle(playerid, carroauto[playerid])){
- new Float:lataria;
- GetVehicleHealth(carroauto[playerid], lataria);
- if(lataria <= 800)
- {
- DisablePlayerRaceCheckpoint(playerid);
- new currentveh;
- currentveh = GetPlayerVehicleID(playerid);
- DestroyVehicle(currentveh);
- SendClientMessage(playerid,VERMELHO,"|AUTO-ESCOLA| Reprovado! Lataria do Veiculo Muito Danificada!");
- return 1;
- }
- DisablePlayerRaceCheckpoint(playerid);
- GameTextForPlayer(playerid, "AUTO-ESCOLA Completa", 3000, 1);
- SendClientMessage(playerid,VERDE,"|AUTO-ESCOLA| Situação: Aprovado! Dirija com Cuidado para Não perder a Carteira!");
- new currentveh;
- currentveh = GetPlayerVehicleID(playerid);
- DestroyVehicle(currentveh);
- return 1;
- }
- else
- {
- DisablePlayerRaceCheckpoint(playerid);
- new currentveh;
- currentveh = GetPlayerVehicleID(playerid);
- DestroyVehicle(currentveh);
- SendClientMessage(playerid,VERMELHO,"|AUTO-ESCOLA| Reprovado! Você não esta em um veiculo da Auto-Escola.");
- return 1;
- }
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
- if(dialogid == Dialog_AutoEscola){ //Dialog do Menu da Auto-Escola
- if(listitem == 0){ //terrestre
- carroauto[playerid] = CreateVehicle(589, 1518.3596,-1459.9932,9.5000,181.0488, 0, 0, 0);
- PutPlayerInVehicle(playerid, carroauto[playerid], 0);
- SendClientMessage(playerid,-1,"|AUTO-ESCOLA| Você iniciou o Teste para Habilitação Terrestre! Siga os Chekpoints e Cuide para não Bater!");
- SetPlayerRaceCheckpoint(playerid, 0, TerrestrePoints[0][0], TerrestrePoints[0][1], TerrestrePoints[0][2],TerrestrePoints[1][0], TerrestrePoints[1][1], TerrestrePoints[1][2], 10);
- point[playerid] = 1;
- GivePlayerMoney(playerid, -6000);
- return 1;
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment