if(strcmp(cmd,"/terminais",true)==0)
{
if(IsPlayerConnected(playerid))
{
new Veh = GetPlayerVehicleID(playerid);
if(!IsAOniCar(Veh))
{
SendClientMessage(playerid, COLOR_GREY, " Voce nгo estб em um фnibus!");
return 1;
}
if(PlayerInfo[playerid][pEmprego] == 9)
{
if(TransportDuty[playerid] > 0)
{
if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
TransportDuty[playerid] = 0;
format(string, sizeof(string), "* Voce estб de folga e recebeu $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GranaRockstar(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
return 1;
}
else
{
BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid] = 400;
format(string, sizeof(string), "Motorista de onibus %s estб em serviзo, Corrida: $400 - Vб para o terminal mais prуximo", PlayerName(playerid));
OOCNews(TEAM_GROVE_COLOR,string);
SendClientMessage(playerid, COLOR_RED,"Vocк comeзou o circuito, siga os checkpoints atй finalizar a viajem");
SendClientMessage(playerid, COLOR_RED,"Vocк receberб R$300 a cada checkpoint que passar.");
SendClientMessage(playerid, COLOR_RED,"USE: /terminais novamente para parar o serviзo");
SetPlayerCheckpoint(playerid, 1369.0927,-1736.0730,13.4787,8.0);
gPlayerTerminal[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"Vocк nгo й um motorista de фnibus.");
}
}
return 1;
}
DisablePlayerCheckpoint(playerid);
if (gPlayerTerminal[playerid] != 0) { if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2) { switch(gPlayerTerminal[playerid]) { case 1: { SetPlayerCheckpoint(playerid,1533.1049,-1610.5599,13.4766, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 2: { SetPlayerCheckpoint(playerid,1736.9674,-1601.5439,13.5225, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 3: { SetPlayerCheckpoint(playerid,1818.3682,-1694.8099,13.4831, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 4: { SetPlayerCheckpoint(playerid,1819.0150,-1872.5851,13.5023, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 5: { SetPlayerCheckpoint(playerid,1987.3519,-2169.5242,13.4809, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 6: { SetPlayerCheckpoint(playerid,2274.7886,-2274.3623,13.4837, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 7: { SetPlayerCheckpoint(playerid,1996.1328,-2163.6931,13.4833, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 8: { SetPlayerCheckpoint(playerid,1964.8201,-2077.6494,13.4842, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 9: { SetPlayerCheckpoint(playerid,1825.4634,-1906.8052,13.5044, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 10: { SetPlayerCheckpoint(playerid,1824.8920,-1705.7137,13.4842, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 11: { SetPlayerCheckpoint(playerid,1526.6500,-1612.1188,13.4907, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 12: { SetPlayerCheckpoint(playerid,1373.5723,-1729.5554,13.4952, 5.0); SetTimerEx("busstoptimer", 10000, false, "i", playerid); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros."); } case 13: { new conta = gPlayerTerminal[playerid]*300; format(gstring,sizeof(gstring), "Vocк completou o ROTA do фnibus e ganhou R$%d, use /terminais para iniciar novamente a ROTA.", conta); SendClientMessage(playerid, COLOR_YELLOW, gstring); SendClientMessage(playerid, COLOR_YELLOW, "Use /sair para sair do фnibus."); BusrouteEnd(playerid); } } gPlayerTerminal[playerid]++; PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); return 1; } } DisablePlayerCheckpoint(playerid); return 1; } |
else if(strcmp(x_Emprego,"bus",true) == 0 || strcmp(x_Emprego,"onibus",true) == 0) { if(TransportDuty[playerid] == 2 && BusCallTime[playerid] > 0) { BusAccepted[playerid] = 999; GameTextForPlayer(playerid, "~w~Voce~n~~r~Cancelou a Chamada", 5000, 1); BusCallTime[playerid] = 0; DisablePlayerCheckpoint(playerid); BusCall = 999; } else { if(IsPlayerConnected(BusCall)) { if(BusCall == playerid) { BusCall = 999; } } for(new i = 0; i < MaiorID; i++) { if(IsPlayerConnected(i)) { if(BusAccepted[i] < 999) { if(BusAccepted[i] == playerid) { BusAccepted[i] = 999; GameTextForPlayer(i, "~w~Cliente~n~~r~Cancelou a Chamada", 5000, 1); BusCallTime[i] = 0; DisablePlayerCheckpoint(i); } } } } } } |