05.06.2014, 15:36
Ok
PHP Code:
public OnPlayerEnterCheckpoint(playerid)
{
switch(GetPVarInt(playerid,"autoescola"))
{
case 1:
{
SetPlayerCheckpoint(playerid, 915.7407,-1339.2396,13.1626, 8.0);
SetPVarInt(playerid,"autoescola",2);
return 1;
}
case 2:
{
SetPlayerCheckpoint(playerid,915.4448,-1559.5372,13.1780, 8.0);
SetPVarInt(playerid,"autoescola",3);
return 1;
}
case 3:
{
SetPlayerCheckpoint(playerid, 1285.0886,-1574.0343,13.1890, 8.0);
SetPVarInt(playerid,"autoescola",4);
return 1;
}
case 4:
{
SetPlayerCheckpoint(playerid, 1295.1682,-1839.3160,13.1896, 8.0);
SetPVarInt(playerid,"autoescola",5);
return 1;
}
case 5:
{
SetPlayerCheckpoint(playerid, 1569.1729,-1874.7198,13.1879, 8.0);
SetPVarInt(playerid,"autoescola",6);
return 1;
}
case 6:
{
SetPlayerCheckpoint(playerid, 1573.1563,-1744.4418,13.2945, 8.0);
SetPVarInt(playerid,"autoescola",7);
return 1;
}
case 7:
{
SetPlayerCheckpoint(playerid,1533.2953,-1603.8513,13.2910, 8.0);
SetPVarInt(playerid,"autoescola",8);
return 1;
}
case 8:
{
SetPlayerCheckpoint(playerid, 1324.8246,-1569.5563,13.1745, 8.0);
SetPVarInt(playerid,"autoescola",9);
return 1;
}
case 9:
{
SetPlayerCheckpoint(playerid, 1365.3812,-1055.9595,26.4477, 8.0);
SetPVarInt(playerid,"autoescola",10);
return 1;
}
case 10:
{
SetPlayerCheckpoint(playerid, 1351.2931,-929.0810,34.2682, 8.0);
SetPVarInt(playerid,"autoescola",11);
return 1;
}
case 11:
{
SetPlayerCheckpoint(playerid, 990.1336,-952.5511,41.1097, 8.0);
SetPVarInt(playerid,"autoescola",12);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Prepare-se: Mais a frente execute a baliza de forma correta!");
PlayerInfo[playerid][pAutorizado2] = 1;
return 1;
}
case 12:
{
SetPlayerCheckpoint(playerid,979.6470,-937.2894,40.9986, 8.0);
return 1;
}
}
if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
{
TaxiAccepted[playerid] = 999;
GameTextForPlayer(playerid, "~w~Chegou ao destino", 5000, 1);
TaxiCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] < 999)
{
BusAccepted[playerid] = 999;
GameTextForPlayer(playerid, "~w~Chegou ao destino", 5000, 1);
BusCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(MedicCallTime[playerid] > 0 && MedicAccepted[playerid] < 999)
{
MedicAccepted[playerid] = 999;
GameTextForPlayer(playerid, "~w~Chegou ao destino", 5000, 1);
MedicCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(MechanicCallTime[playerid] > 0 && MechanicAccepted[playerid] < 999)
{
MechanicAccepted[playerid] = 999;
GameTextForPlayer(playerid, "~w~Chegou ao destino", 5000, 1);
MechanicCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(CopsrondaCallTime[playerid] > 0 && CopsrondaAccepted[playerid] < 999)
{
CopsrondaAccepted[playerid] = 999;
GameTextForPlayer(playerid, "~w~Chegou ao destino", 5000, 1);
CopsrondaCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(CP[playerid] == 5)
{
GameTextForPlayer(playerid, "~y~Complete a Missao indo nos Checkpoint", 2500, 1);
CP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
else if(TruckMission[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк obteve R$1000 por entregar a carga, espere sua recarga por 5 minutos.");
DisablePlayerCheckpoint(playerid);
TruckMission[playerid] = 0;
GivePlayerMoney(playerid, 1000);
var1[playerid] = 1;
TempoRecarga = SetTimerEx("ZerarRecarga", 180000, 0, "i", playerid);
}
else if(TruckMission[playerid] == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк obteve R$1500 por entregar a carga, espere sua recarga por 5 minutos.");
DisablePlayerCheckpoint(playerid);
TruckMission[playerid] = 0;
GivePlayerMoney(playerid, 1500);
var1[playerid] = 1;
TempoRecarga = SetTimerEx("ZerarRecarga", 180000, 0, "i", playerid);
}
else if(TruckMission[playerid] == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк obteve R$2000 por entregar a carga, espere sua recarga por 5 minutos.");
DisablePlayerCheckpoint(playerid);
TruckMission[playerid] = 0;
GivePlayerMoney(playerid, 2000);
var1[playerid] = 1;
TempoRecarga = SetTimerEx("ZerarRecarga", 180000, 0, "i", playerid);
}
if(PlayerToPoint(8.0,playerid,1481.1926,-1764.2736,18.7958))//Prefeitura
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou na ~b~Prefeitura", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1462.395751,-1012.391174,26.843799))//Banco
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Banco", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1546.2761,-1675.5995,13.5620))//DP
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou ao ~b~Departamento de Policia", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1350.4865,-1753.2505,13.3582))//24-7
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Mercado de Commerce", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1790.5725,-1167.3705,23.8281))//Loja de Armas
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou a ~b~Loja de Armas", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1362.2240,-1279.7227,13.3828))//Ammu Nation
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou a ~b~Ammu Nation", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,2244.7954,-1663.5021,15.4766))//Binco
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou na ~b~Binco", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,2155.4363,-1171.3413,23.8206))//Aluguel de Carros
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Aluguel de Carros", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1411.5593,-1699.5270,13.5395))//Centro de Licencas
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Centro de Licencas", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,2003.4354,-1444.1321,13.5621))//Hospital
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Hospital", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1928.826904,-1776.405517,13.546895))//Posto idlewood
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou ao ~b~Posto de Idlewood", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,2232.5723,-1332.8412,23.9815))//Igreja
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou na ~b~Igreja", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1460.6941,-1142.9766,24.3906))//Zip
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou na ~b~Zip", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,550.7012,-1278.5721,17.2482))//Aluguel de Carros 1
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~p~|Voce chegou no ~b~Aluguel de Carros", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,454.1039,-1501.5459,30.8761))//victim
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou na ~b~VICTIM", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,661.0214,-573.4525,16.3359))//Posto Dillimore
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Posto de Dillimore", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1003.0009,-941.7861,41.6509))//Posto temple
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Posto de Temple", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,1637.6385,-1148.0294,23.90636))//Concessionaria
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou na ~b~Concessionaria", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,2420.6565,-1738.9923,13.5469))//mercado ganton
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou no ~b~Mercado de Ganton", 5000, 3);
}
if(PlayerToPoint(8.0,playerid,961.7795,-944.9980,40.3419))//D.E.T.R.A.N
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~w~Voce chegou ao ~b~D.E.T.R.A.N", 5000, 3);
}
if(PlayerToPoint(1.7,playerid,246.4971,74.3957,1003.6406))//Postao Presos DP
{
OnPlayerCommandText(playerid,"/pp");
GameTextForPlayer(playerid, " ~w~Portao Celas ~b~Aberto", 5000, 3);
}
if(PlayerToPoint(2.0,playerid,367.3167,162.2013,1025.7891))//Postao Interno Prefeitura
{
OnPlayerCommandText(playerid,"/ppre");
GameTextForPlayer(playerid, " ~w~Porta Prefeitura ~b~Aberto", 5000, 3);
}
//auto escola//
else
{
switch (gPlayerCheckpointStatus[playerid])
{
case CHECKPOINT_HOME:
{
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_Nenhum;
GameTextForPlayer(playerid, "~w~Chegou em~n~~y~Casa", 5000, 1);
}
}
}
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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(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);
Controle(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTRED, "Aguarde 10 segundos nesse ponto para esperar passageiros.");
}
case 13:
{
new conta = gPlayerTerminal[playerid]*50;
format(gstring, 128, "Vocк completou a 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 /saircarro para sair do фnibus.");
BusrouteEnd(playerid);
}
}
gPlayerTerminal[playerid]++;
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
return true;
}
}
DisablePlayerCheckpoint(playerid);
return true;
}