Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define COLOR_DARKGOLD 0x808000AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- new Float: Check[14][3] = {
- {-328.4167,-1552.9139,15.5328},
- {-306.4614,-1553.0569,11.3687},
- {-279.2884,-1552.2289,5.5194},
- {-262.2101,-1551.6943,3.9480},
- {-240.3530,-1551.7698,4.2680},
- {-243.3577,-1520.8546,6.9886},
- {-278.0255,-1519.9550,5.6185},
- {-322.5374,-1523.1648,13.5656},
- {-333.5644,-1490.2140,14.6061},
- {-310.1936,-1489.2799,11.2921},
- {-281.8345,-1488.7229,6.1618},
- {-258.2838,-1488.9459,5.7324},
- {-229.4267,-1488.0614,7.0033},
- {-212.2727,-1486.5249,8.7372}
- };
- new combinejobrunning = 0;
- new info;
- forward GivePlayerOneExp(playerid);
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/colher", cmdtext, true, 10) == 0)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
- {
- SetPlayerCheckpoint(playerid, Check[0][0],Check[0][1],Check[0][2], 3.0);
- CreateObject(823,-256.0010,-1542.3809,3.9930,0,0,0);
- combinejobrunning = 1;
- new name[MAX_PLAYER_NAME], string[48];
- GetPlayerName(playerid, name, sizeof(name));
- SendClientMessageToAll(COLOR_RED, string);
- return 1;
- }
- SendClientMessage(playerid, COLOR_RED,"[Aviso] Voce deve estar em uma colheitadeira da fazenda para trabalhar de colhedor");
- }
- if (strcmp("/ajudacolhedor", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "para comecar a colher entre em uma colheitadeira e use /colher.");
- SendClientMessage(playerid, COLOR_YELLOW, "Assim que usar o comando /colher, checkpoints serão criados em seu mapa, passe sobre eles para colher.");
- SendClientMessage(playerid, COLOR_YELLOW, "Assim que terminar a colheita entregue a colheitadeira no armazem para receber seu pagamento.");
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
- {
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[0][0],Check[0][1],Check[0][2]))
- {
- SetPlayerCheckpoint(playerid, Check[1][0],Check[1][1],Check[1][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[1][0],Check[1][1],Check[1][2]))
- {
- SetPlayerCheckpoint(playerid, Check[2][0],Check[2][1],Check[2][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[2][0],Check[2][1],Check[2][2]))
- {
- SetPlayerCheckpoint(playerid, Check[3][0],Check[3][1],Check[3][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[3][0],Check[3][1],Check[3][2]))
- {
- SetPlayerCheckpoint(playerid, Check[4][0],Check[4][1],Check[4][2], 7.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 7.0,Check[4][0],Check[4][1],Check[4][2]))
- {
- SetPlayerCheckpoint(playerid, Check[5][0],Check[5][1],Check[5][2], 7.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 7.0,Check[5][0],Check[5][1],Check[5][2]))
- {
- SetPlayerCheckpoint(playerid, Check[6][0],Check[6][1],Check[6][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[6][0],Check[6][1],Check[6][2]))
- {
- SetPlayerCheckpoint(playerid, Check[7][0],Check[7][1],Check[7][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[7][0],Check[7][1],Check[7][2]))
- {
- SetPlayerCheckpoint(playerid, Check[8][0],Check[8][1],Check[8][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[8][0],Check[8][1],Check[8][2]))
- {
- SetPlayerCheckpoint(playerid, Check[9][0],Check[9][1],Check[9][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[9][0],Check[9][1],Check[9][2]))
- {
- SetPlayerCheckpoint(playerid, Check[10][0],Check[10][1],Check[10][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[10][0],Check[10][1],Check[10][2]))
- {
- SetPlayerCheckpoint(playerid, Check[11][0],Check[11][1],Check[11][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[11][0],Check[11][1],Check[11][2]))
- {
- SetPlayerCheckpoint(playerid, Check[12][0],Check[12][1],Check[12][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[12][0],Check[12][1],Check[12][2]))
- {
- SetPlayerCheckpoint(playerid, Check[13][0],Check[13][1],Check[13][2], 7.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 7.0,Check[13][0],Check[13][1],Check[13][2]))
- {
- GivePlayerMoney(playerid, 500);
- SendClientMessage (playerid, COLOR_DARKGOLD, "Voce fez uma otima colheita e Recebeu 600 Reais");
- SetVehicleToRespawn(1);
- combinejobrunning = 0;
- DisablePlayerCheckpoint(playerid);
- }
- }
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
- {
- SendClientMessage(playerid, COLOR_RED, "Para começar acolher use: /colher");
- }
- return 0;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if((combinejobrunning) == 1)
- {
- combinejobrunning = 0;
- SendClientMessage(playerid, COLOR_RED, "[INFO] Para continuar a colher entre em uma Colheitadeira.");
- }else if((combinejobrunning) == 0){
- //Nothing
- }
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == info)
- {
- info = CreatePickup(1239,1,-377.5488600,-1449.9626500,24.9352300);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement