Topo:
Код:
new CorridaSM[MAX_PLAYERS];
new Float:SM[25][3] =
{
{2329.4314,-1752.2002,13.4879},
{2329.4314,-1752.2002,13.4879},
{2331.3296,-1381.6399,23.9373},
{2047.3384,-1131.9811,24.1766},
{1864.6791,-1155.6290,23.8034},
{1844.0037,-1362.7527,13.4998},
{1818.3904,-1686.3737,13.4836},
{1722.8043,-1729.1893,13.4806},
{1478.7445,-1729.1477,13.4811},
{1232.7397,-1708.8778,13.4836},
{1034.5973,-1750.6792,13.4717},
{681.1736,-1739.8635,13.4584},
{365.0974,-1775.0570,5.4187},
{693.3066,-1765.5120,13.5197},
{1040.0977,-1756.6244,13.4803},
{1237.4504,-1715.2510,13.4852},
{1500.6324,-1735.4116,13.4871},
{1733.8375,-1734.9551,13.4873},
{1824.7419,-1665.4003,13.4828},
{1854.4298,-1362.6259,13.4920},
{1869.1370,-1164.4412,23.7721},
{2044.4489,-1138.9502,24.1758},
{2147.9329,-1118.3199,25.4016},
{2322.3069,-1387.3453,23.9632},
{2329.9998,-1752.2317,13.4793}
};
public OnPlayerEnterCheckpoint(playerid) :
Код:
switch (CorridaSM[playerid])
{
case 1:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[2][0], SM[2][1], SM[2][2], 5.0);
CorridaSM[playerid] = 2;
GivePlayerMoneyEx(playerid,2);
}
case 2:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[3][0], SM[3][1], SM[3][2], 5.0);
CorridaSM[playerid] = 3;
GivePlayerMoneyEx(playerid,2);
}
case 3:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[4][0], SM[4][1], SM[4][2], 5.0);
CorridaSM[playerid] = 4;
GivePlayerMoneyEx(playerid,2);
}
case 4:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[5][0], SM[5][1], SM[5][2], 5.0);
CorridaSM[playerid] = 5;
GivePlayerMoneyEx(playerid,2);
}
case 5:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[6][0], SM[6][1], SM[6][2], 5.0);
CorridaSM[playerid] = 6;
GivePlayerMoneyEx(playerid,2);
}
case 6:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[7][0], SM[7][1], SM[7][2], 5.0);
CorridaSM[playerid] = 7;
GivePlayerMoneyEx(playerid,2);
}
case 7:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[8][0], SM[8][1], SM[8][2], 5.0);
CorridaSM[playerid] = 8;
GivePlayerMoneyEx(playerid,2);
}
case 8:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[9][0], SM[9][1], SM[9][2], 5.0);
CorridaSM[playerid] = 9;
GivePlayerMoneyEx(playerid,2);
}
case 9:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[10][0], SM[10][1], SM[10][2], 5.0);
CorridaSM[playerid] = 10;
GivePlayerMoneyEx(playerid,2);
}
case 10:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[11][0], SM[11][1], SM[11][2], 5.0);
CorridaSM[playerid] = 11;
GivePlayerMoneyEx(playerid,2);
}
case 11:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[12][0], SM[12][1], SM[12][2], 5.0);
CorridaSM[playerid] = 12;
GivePlayerMoneyEx(playerid,2);
}
case 12:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[13][0], SM[13][1], SM[13][2], 5.0);
CorridaSM[playerid] = 13;
GivePlayerMoneyEx(playerid,2);
}
case 13:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[14][0], SM[14][1], SM[14][2], 5.0);
CorridaSM[playerid] = 14;
GivePlayerMoneyEx(playerid,2);
}
case 14:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[15][0], SM[15][1], SM[15][2], 5.0);
CorridaSM[playerid] = 15;
GivePlayerMoneyEx(playerid,2);
}
case 15:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[16][0], SM[16][1], SM[16][2], 5.0);
CorridaSM[playerid] = 16;
GivePlayerMoneyEx(playerid,2);
}
case 16:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[17][0], SM[17][1], SM[17][2], 5.0);
CorridaSM[playerid] = 17;
GivePlayerMoneyEx(playerid,2);
}
case 17:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[18][0], SM[18][1], SM[18][2], 5.0);
CorridaSM[playerid] = 18;
GivePlayerMoneyEx(playerid,2);
}
case 18:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[19][0], SM[19][1], SM[19][2], 5.0);
CorridaSM[playerid] = 19;
GivePlayerMoneyEx(playerid,2);
}
case 19:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[20][0], SM[20][1], SM[20][2], 5.0);
CorridaSM[playerid] = 20;
GivePlayerMoneyEx(playerid,2);
}
case 20:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[21][0], SM[21][1], SM[21][2], 5.0);
CorridaSM[playerid] = 21;
GivePlayerMoneyEx(playerid,2);
}
case 21:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[22][0], SM[22][1], SM[22][2], 5.0);
CorridaSM[playerid] = 22;
GivePlayerMoneyEx(playerid,2);
}
case 22:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[23][0], SM[23][1], SM[23][2], 5.0);
CorridaSM[playerid] = 23;
GivePlayerMoneyEx(playerid,2);
}
case 23:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[24][0], SM[24][1], SM[24][2], 5.0);
CorridaSM[playerid] = 24;
GivePlayerMoneyEx(playerid,2);
}
case 24:
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, SM[24][0], SM[24][1], SM[24][2], 5.0);
CorridaSM[playerid] = 25;
GivePlayerMoneyEx(playerid,2);
}
case 25:
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,LARANJA,"Vocк deu a volta, recebeu R$25.");
GivePlayerMoneyEx(playerid,25);
return 1;
}
}
as outra CP estao iguais a estas, mas com as news dsiferentes.
Ex: essa q eu postei й CorridaSM. Float: SM
As outras sao CorridaAP. Float AP
e assim vai.