Advertisement
LeleziN123

FS Profissao motorista de onibus

Feb 13th, 2021
1,207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define TEMPO 1500
  5. forward RotaBus(playerid);
  6. new BusJob[256];
  7. new TimerBus[MAX_PLAYERS];
  8. new RotaBusJob[MAX_PLAYERS] = 0;
  9.  
  10. AntiDeAMX()
  11. {
  12.     new a[][] =
  13.     {
  14.         "Unarmed (Fist)",
  15.         "Brass K"
  16.     };
  17.     #pragma unused a
  18. }
  19.  
  20. #pragma tabsize 0
  21.  
  22. main()
  23. {
  24.     if(dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
  25.     {
  26.         SendRconCommand("reloadfs admin");
  27.         print("\n------------~~~~~~~~~~~~---------------------~~~~~~~~-");
  28.         print(" Sistema de Motorista de Onibus feito por [TSVR]LeleziN ");
  29.         print("--------------------------~~~~~~~~~~~~--------~~~~~~~~\n");
  30.     }
  31. }
  32.  
  33. public OnGameModeInit()
  34. {
  35.     if(!dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
  36.     {
  37.        for(new I = 0; I < 50; I ++) printf("| INFO | Você não está autorizado a utilizar esse Sistema!");
  38.         sleep(5);
  39.         SendRconCommand("exit");
  40.         return 1;
  41.     }
  42.  
  43.     print("\n----------------------------------~~~~~~~~~~~~~~~~~~~~");
  44.     print(" Não retire os Creditos pfvr - Criador [TSVR]LeleziN ");
  45.     print("----------------------------------~~~~~~~~~~~~~~~~~~~~\n");
  46.    
  47.     SetGameModeText("Criador:[TSVR]LeleziN - TSVR Brasil Ownaa");
  48.     AddPlayerClass(0, 2183.8916,-2252.5754,14.7710, 0, 0, 0, 0, 0, 0);
  49.     return 1;
  50. }
  51.  
  52. public OnGameModeExit()
  53. {
  54.     return 1;
  55. }
  56.  
  57. public OnPlayerConnect(playerid)
  58. {
  59.     AntiDeAMX();
  60.     return 1;
  61. }
  62.  
  63. public OnPlayerRequestClass(playerid, classid)
  64. {
  65.     SetPlayerPos(playerid, -1629.1534,-2239.1914,31.4766);
  66.     SetPlayerCameraPos(playerid, -1632.6943,-2239.0200,31.4766);
  67.     SetPlayerCameraLookAt(playerid, -1632.6943,-2239.0200,31.4766);
  68.     return 1;
  69. }
  70.  
  71. public OnPlayerSpawn(playerid)
  72. {
  73.     SetPlayerPos(playerid, -1632.6943,-2239.0200,31.4766);
  74.     return 1;
  75. }
  76.  
  77. public OnPlayerConnect(playerid)
  78. {
  79.     RotaBusJob[playerid] = 0;
  80.     return 1;
  81. }
  82.  
  83. CMD:iniciarrota1(playerid)
  84. {
  85.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
  86.     {
  87.         SendClientMessage(playerid, -1,"| INFO | Serviço iniciado com sucesso! Siga o ícone vermelho no mapa para chegar ao primeiro ponto de ônibus!");
  88.         if(BusJob[playerid] == 0)
  89.         {
  90.             BusJob[playerid] = 1;
  91.             SetPlayerPos(playerid, 2183.8916,-2252.5754,14.7710);
  92.             SetPlayerCheckpoint(playerid,2183.8916,-2252.5754,14.7710, 3.0);
  93.             TimerBus[playerid] = SetTimerEx("RotaBus", TEMPO, false, "i",playerid);
  94.         }
  95.     }
  96.     SendClientMessage(playerid, -1,"| ERRO | Você tem que estar em uma ônibus para começar a rota!");
  97.     return 1;
  98. }
  99.  
  100. public OnPlayerEnterCheckpoint(playerid)
  101. {
  102.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
  103.     {
  104.         if(BusJob[playerid] == 1)
  105.         {
  106.             BusJob[playerid] = 2;
  107.             TogglePlayerControllable(playerid,0);
  108.             SetPlayerCheckpoint(playerid,2029.1879,-2106.7595,13.0503,10);
  109.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  110.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  111.             return 1;
  112.         }
  113.         if(BusJob[playerid] == 2)
  114.         {
  115.             BusJob[playerid] = 3;
  116.             TogglePlayerControllable(playerid,0);
  117.             SetPlayerCheckpoint(playerid,1965.0934,-1879.8435,13.0460,10);
  118.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  119.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  120.             return 1;
  121.         }
  122.         if(BusJob[playerid] == 3)
  123.         {
  124.             BusJob[playerid] = 4;
  125.             TogglePlayerControllable(playerid,0);
  126.             SetPlayerCheckpoint(playerid,1825.0763,-1641.5555,13.0406,10);
  127.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  128.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  129.             return 1;
  130.         }
  131.         if(BusJob[playerid] == 4)
  132.         {
  133.             BusJob[playerid] = 5;
  134.             TogglePlayerControllable(playerid,0);
  135.             SetPlayerCheckpoint(playerid,1661.4106,-1513.8069,13.0394,10);
  136.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  137.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  138.             return 1;
  139.         }
  140.         if(BusJob[playerid] == 5)
  141.         {
  142.             BusJob[playerid] = 6;
  143.             TogglePlayerControllable(playerid,0);
  144.             SetPlayerCheckpoint(playerid,1718.1519,-1355.8612,13.0379,10);
  145.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  146.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  147.             return 1;
  148.         }
  149.         if(BusJob[playerid] == 6)
  150.         {
  151.             BusJob[playerid] = 7;
  152.             TogglePlayerControllable(playerid,0);
  153.             SetPlayerCheckpoint(playerid,1515.8977,-1157.4445,23.5693,10);
  154.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  155.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  156.             return 1;
  157.         }
  158.         if(BusJob[playerid] == 7)
  159.         {
  160.             BusJob[playerid] = 8;
  161.             TogglePlayerControllable(playerid,0);
  162.             SetPlayerCheckpoint(playerid,1007.3337,-1137.6353,23.3041,10);
  163.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  164.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  165.             return 1;
  166.         }
  167.         if(BusJob[playerid] == 8)
  168.         {
  169.             BusJob[playerid] = 9;
  170.             TogglePlayerControllable(playerid,0);
  171.             SetPlayerCheckpoint(playerid,913.9140,-1512.6134,13.0294,10);
  172.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  173.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  174.             return 1;
  175.         }
  176.         if(BusJob[playerid] == 9)
  177.         {
  178.             BusJob[playerid] = 10;
  179.             TogglePlayerControllable(playerid,0);
  180.             SetPlayerCheckpoint(playerid,668.9059,-1735.8870,13.1442,10);
  181.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  182.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  183.             return 1;
  184.         }
  185.         if(BusJob[playerid] == 10)
  186.         {
  187.             BusJob[playerid] = 11;
  188.             TogglePlayerControllable(playerid,0);
  189.             SetPlayerCheckpoint(playerid,716.0936,-1323.2404,13.0542,10);
  190.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  191.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  192.             return 1;
  193.         }
  194.         if(BusJob[playerid] == 11)
  195.         {
  196.             BusJob[playerid] = 12;
  197.             TogglePlayerControllable(playerid,0);
  198.             SetPlayerCheckpoint(playerid,1105.4869,-1284.3621,13.0984,10);
  199.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  200.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  201.             return 1;
  202.         }
  203.         if(BusJob[playerid] == 12)
  204.         {
  205.             BusJob[playerid] = 13;
  206.             TogglePlayerControllable(playerid,0);
  207.             SetPlayerCheckpoint(playerid,1248.8213,-1152.4312,23.2720,10);
  208.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  209.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  210.             return 1;
  211.         }
  212.         if(BusJob[playerid] == 13)
  213.         {
  214.             BusJob[playerid] = 14;
  215.             TogglePlayerControllable(playerid,0);
  216.             SetPlayerCheckpoint(playerid,1598.3813,-1164.2426,23.5697,10);
  217.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  218.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  219.             return 1;
  220.         }
  221.         if(BusJob[playerid] == 14)
  222.         {
  223.             BusJob[playerid] = 15;
  224.             TogglePlayerControllable(playerid,0);
  225.             SetPlayerCheckpoint(playerid,1931.6448,-1139.5239,24.7676,10);
  226.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  227.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  228.             return 1;
  229.         }
  230.         if(BusJob[playerid] == 15)
  231.         {
  232.             BusJob[playerid] = 16;
  233.             TogglePlayerControllable(playerid,0);
  234.             SetPlayerCheckpoint(playerid,2113.3770,-1304.4203,23.5052,10);
  235.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  236.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  237.             return 1;
  238.         }
  239.         if(BusJob[playerid] == 16)
  240.         {
  241.             BusJob[playerid] = 17;
  242.             TogglePlayerControllable(playerid,0);
  243.             SetPlayerCheckpoint(playerid,2349.2502,-1304.5952,23.6209,10);
  244.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  245.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  246.             return 1;
  247.         }
  248.         if(BusJob[playerid] == 17)
  249.         {
  250.             BusJob[playerid] = 18;
  251.             TogglePlayerControllable(playerid,0);
  252.             SetPlayerCheckpoint(playerid,2598.7876,-1260.2065,46.9628,10);
  253.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  254.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  255.             return 1;
  256.         }
  257.         if(BusJob[playerid] == 18)
  258.         {
  259.             BusJob[playerid] = 19;
  260.             TogglePlayerControllable(playerid,0);
  261.             SetPlayerCheckpoint(playerid,2677.5920,-1051.4144,69.0702,10);
  262.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  263.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  264.             return 1;
  265.         }
  266.         if(BusJob[playerid] == 19)
  267.         {
  268.             BusJob[playerid] = 20;
  269.             TogglePlayerControllable(playerid,0);
  270.             SetPlayerCheckpoint(playerid,2834.8110,-1140.3776,24.4193,10);
  271.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  272.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  273.             return 1;
  274.         }
  275.         if(BusJob[playerid] == 20)
  276.         {
  277.             BusJob[playerid] = 21;
  278.             TogglePlayerControllable(playerid,0);
  279.             SetPlayerCheckpoint(playerid,2830.0747,-1602.7433,10.5848,10);
  280.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  281.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  282.             return 1;
  283.         }
  284.         if(BusJob[playerid] == 21)
  285.         {
  286.             BusJob[playerid] = 22;
  287.             TogglePlayerControllable(playerid,0);
  288.             SetPlayerCheckpoint(playerid,2819.3320,-1923.2450,10.5925,10);
  289.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  290.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  291.             return 1;
  292.         }
  293.         if(BusJob[playerid] == 22)
  294.         {
  295.             BusJob[playerid] = 23;
  296.             TogglePlayerControllable(playerid,0);
  297.             SetPlayerCheckpoint(playerid,2646.7800,-2151.7402,10.5687,10);
  298.             SendClientMessage(playerid, -1,"| INFO | Os passageiros estão saindo e/ou entrando no ônibus! Aguarde...");
  299.             TimerBus[playerid] = SetTimerEx("RotaBus", 1000, false, "i",playerid);
  300.             return 1;
  301.         }
  302.         if(BusJob[playerid] == 23)
  303.         {
  304.             BusJob[playerid] = 0;
  305.             DisablePlayerCheckpoint(playerid);
  306.             SendClientMessage(playerid, -1,"| INFO | Serviço finalizado! Você recebeu R$300 por ter completado todo o percurso!");
  307.             SendClientMessage(playerid, -1,"| INFO | Volte ao spawn da profissão e inicie o serviço para fazer o percurso novamente!");
  308.             GivePlayerMoney(playerid,300);
  309.         }
  310.     }
  311.     return 1;
  312. }
  313.  
  314. public RotaBus(playerid)
  315. {
  316.     TimerBus[playerid] = SetTimerEx("MsgBus", 100, false, "i",playerid);
  317.     TogglePlayerControllable(playerid,1);
  318.     return 1;
  319. }
  320.  
  321. forward MsgBus(playerid);
  322. public MsgBus(playerid)
  323. {
  324.     new quantia = 80;
  325.     new msg[256];
  326.     format(msg, sizeof(msg),"| INFO | Você recebeu R$%d! Siga o ícone vermelho no mapa para chegar ao próximo ponto de ônibus [ %d / 23 ]", quantia, BusJob[playerid]);
  327.     SendClientMessage(playerid, -1, msg);
  328.     return 1;
  329. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement