Jack_Shepard
Умник
Можно как-то оптимизировать?
PHP:
if(MarhJob[playerid] > 0)
{
new type = GetPVarInt(playerid, "TypeBus"), e_type, name[32], string[156];
switch(GetPVarInt(playerid, "TypeBus"))
{
case 1: name = "Внутри-городской ЛС";
}
if(type == 1)
{
if(TestProgres[playerid] == 1 || TestProgres[playerid] == 6 || TestProgres[playerid] == 13 || TestProgres[playerid] == 19 || TestProgres[playerid] == 23 || TestProgres[playerid] == 32 || TestProgres[playerid] == 38 || TestProgres[playerid] == 40 || TestProgres[playerid] == 45 || TestProgres[playerid] == 49 || TestProgres[playerid] == 60 || TestProgres[playerid] == 68 || TestProgres[playerid] == 72 || TestProgres[playerid] == 77 || TestProgres[playerid] == 84)
{
if(GetPVarInt(playerid, "BusStop") == 0)
{
SetPVarInt(playerid, "TimeBus", 11);
DisablePlayerRaceCheckpoint(playerid);
format(string, 128, "Маршрутка отъезжает через несколько секунд, маршрут (%s)",name);
ProxDetector(25.0, playerid, string, COLOR_GREN, COLOR_GREN, COLOR_GREN, COLOR_GREN, COLOR_GREN);
}
else
{
if(TestProgres[playerid] == 18) TestProgres[playerid] = 0;
else TestProgres[playerid]++;
new i = TestProgres[playerid];
SetPlayerRaceCheckpoint(playerid, 0, MarhLS[i][0], MarhLS[i][1], MarhLS[i][2], MarhLS[i][3], MarhLS[i][4], MarhLS[i][5],5.0);
SetPVarInt(playerid, "BusStop", 0);
}
}
else
{
TestProgres[playerid]++;
SetPVarInt(playerid, "BusMoney", GetPVarInt(playerid, "BusMoney") + 50);
if(TestProgres[playerid] == 1 || TestProgres[playerid] == 6 || TestProgres[playerid] == 13 || TestProgres[playerid] == 19 || TestProgres[playerid] == 23 || TestProgres[playerid] == 32 || TestProgres[playerid] == 38 || TestProgres[playerid] == 40 || TestProgres[playerid] == 45 || TestProgres[playerid] == 49 || TestProgres[playerid] == 60 || TestProgres[playerid] == 68 || TestProgres[playerid] == 72 || TestProgres[playerid] == 77 || TestProgres[playerid] == 84) e_type = 1;
else e_type = 0;
new i = TestProgres[playerid];
SetPlayerRaceCheckpoint(playerid, e_type, MarhLS[i][0], MarhLS[i][1], MarhLS[i][2], MarhLS[i][3], MarhLS[i][4], MarhLS[i][5],5.0);
}
}
}
