• Страница 1 из 1
  • 1
Гонка для фракции Стритрейсеры
Дмитрий Дата: Понедельник, 03.11.2014, 23:34 | Сообщение # 1 | Сообщить о нерабочей теме


Аватар для Дмитрий

Гонка для фракции Стритрейсеры
Здравствуйте форумчане, вот сделал себе фракцию стритрейсеры, и придумал для них уличные гонки.
1) Во фракции есть ранг Король Переулков, так вот эту гонку начинает он.
ко всем new:

Код
new murder[MAX_PLAYERS];  
new Murderchet[MAX_PLAYERS];   
new EndingMurderRound = 1;  
new MurderPlayers = 0;  
new race;  
new FirstMurderWinner = 999;  
new PlayerMurder[MAX_PLAYERS];  
new SecondMurderWinner = 999;  
new ThirdMurderWinner = 999;  
new Float:murderace[61][3] = {  
{1078.36,-867.87,42.99},// чек  
{997.22,-908.53,41.95},// чек  
{983.82,-956.16,40.31},// чек  
{876.83,-994.91,34.98},// чек  
{793.37,-1065.21,24.40},// чек  
{782.17,-1137.27,23.60},// чек  
{719.07,-1170.51,15.83},// чек  
{695.90,-1184.51,15.29},// чек  
{628.43,-1249.95,17.29},// чек  
{614.54,-1348.05,13.42},// чек  
{517.20,-1383.38,15.64},// че  
{497.74,-1456.05,16.72},// чек  
{498.46,-1558.01,16.77},// чек  
{532.34,-1605.51,15.84},// чек  
{560.35,-1671.65,17.98},// чек  
{624.70,-1703.55,14.53},// чек  
{652.22,-1765.73,13.31},// че  
{650.39,-1838.68,5.83},// чек  
{720.84,-1847.05,11.60},// чек  
{771.48,-1847.24,5.82},// чек  
{824.08,-1855.67,8.06},// чек  
{968.22,-1855.37,11.52},// чек  
{1036.80,-1792.77,13.45},// че  
{1051.56,-1665.99,13.40},// чек  
{1151.44,-1647.90,13.55},// чек  
{1131.59,-1555.08,13.75},// чек  
{1145.66,-1486.47,15.56},// чек  
{1145.63,-1355.22,13.42},// чек  
{1149.96,-1265.43,13.61},// чек  
{1169.80,-1207.93,19.38},// чек  
{1218.11,-1171.34,22.43},// чек  
{1254.38,-1161.46,23.59},// чек  
{1257.23,-1230.90,16.20},// чек  
{1291.08,-1282.36,13.14},// че  
{1356.58,-1272.09,13.14},// чек  
{1376.67,-1241.71,13.15},// чек  
{1419.50,-1254.73,13.35},// чек  
{1431.21,-1328.88,13.34},// чек  
{1451.61,-1352.28,13.15},// чек  
{1463.25,-1496.98,13.31},// чек  
{1576.81,-1515.59,13.32},// чек  
{1640.42,-1539.66,13.35},// чек  
{1716.60,-1564.79,13.31},// чек  
{1704.21,-1590.40,13.13},// чек  
{1538.02,-1590.37,13.15},// че  
{1371.56,-1602.80,13.33},// чек  
{1373.63,-1675.71,12.60},// чек  
{1487.14,-1734.99,6.46},// чек  
{1633.26,-1770.48,3.72},// чек  
{1811.30,-1812.45,3.75},// чек  
{1995.18,-1851.02,3.75},// чек  
{2335.86,-1853.94,0.86},// чек  
{2580.53,-1813.41,1.76},// чек  
{2597.59,-1649.55,2.10},// чек  
{2611.73,-1536.74,12.78},// чек  
{2631.55,-1485.02,16.10},// чек  
{2753.83,-1422.54,16.02},// че  
{2823.92,-1429.17,16.02},// чек  
{2823.26,-1480.62,13.92},// чек  
{2812.25,-1474.90,16.46},  
{2816.7688,-1487.1580,15.2163}// чек  
};


ко всем forward:
Код
//murderace  
forward MurderGonkaEnded();   
forward MurderStartGonka(playerid);   
forward MurderStartGonka1(playerid);  
forward MurderStartGonka2();  
forward MurderStartGonka3();


создаём public:
Код
public MurderStartGonka1(playerid)  
{  
new string[256];  
EndingMurderRound = 0;  
for(new i = 0; i < MAX_PLAYERS; i++)  
     {  
         if(IsPlayerConnected(i))  
         {  
             if(PlayerMurder [i]!= 0)  
             {  
                 format(string, sizeof(string), "3");  
                 GameTextForPlayer(i, string, 1000, 3);  
                  TogglePlayerControllable(i, 0);  
                 SetPlayerInterior(i,0);  
             }  
         }  
     }  
     SetTimer("MurderStartGonka2", 1000, 0);  
     return true;  
}  
public MurderStartGonka2()  
{  
new string[256];  
     EndingMurderRound = 0;  
         for(new i = 0; i < MAX_PLAYERS; i++)  
     {  
         if(IsPlayerConnected(i))  
         {  
             if(PlayerMurder [i]!= 0)  
             {  
                 format(string, sizeof(string), "2");  
                  GameTextForPlayer(i, string, 1000, 3);  
             }  
         }  
     }  
     SetTimer("MurderStartGonka3", 1000, 0);  
     return true;  
}  
public MurderStartGonka3()  
{  
new string[256];  
EndingMurderRound = 0;  
         for(new i = 0; i < MAX_PLAYERS; i++)  
     {  
         if(IsPlayerConnected(i))  
         {  
             if(PlayerMurder [i]!= 0)  
             {  
                 format(string, sizeof(string), "1");  
                 GameTextForPlayer(i, string, 1000, 3);  
             }  
         }  
     }  
     SetTimer("MurderStartGonka", 1000, 0);  
     return true;  
}  
forward SendCop(playerid);  
public SendCop(playerid)   
{    
     new string[64];  
     format(string, sizeof(string), "Рация: Cообщает: Неизвестный. Преступление: Уличные Гонки. Центр Лос-Сантоса");   
     SendCopsMessage(playerid, COLOR_NEWS, string);   
     return true;   
}   
public MurderStartGonka(playerid)  
{  
     new string[256];  
     for(new i = 0; i < MAX_PLAYERS; i++)  
     {  
     if(MurderPlayers < 1)  
     {  
     if(PlayerMurder [i]!= 0)  
          {  
         OOCOff(0x00B95CAA,string);  
         EndingMurderRound = 1;  
         PlayerMurder [i]= 0;  
         MurderPlayers = 0;  
         TogglePlayerControllable(i, 1);  
         return true;  
     }  
     }  
     FirstMurderWinner = 999;  
     SecondMurderWinner = 999;  
     ThirdMurderWinner = 999;  
         if(IsPlayerConnected(i))  
         {  
             if(PlayerMurder [i]!= 0)  
                 {  
                     RaceCP [i]= 400;  
                  GameTextForPlayer(i, "~r~GO! GO! GO!", 5000, 3);  
                 PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);  
                 Murderchet [i]+=1;  
                    SetPlayerRaceCheckpoint(i,1,murderace[0][0],murderace[0][1],murderace[0][2], murderace[1][0],murderace[1][1],murderace[1][2],8.0);  
                 TogglePlayerControllable(i, 1);  
                 PlayerMurder [i]= 1;  
                 murder [i]= 1;  
                 SetVehicleParamsEx(GetPlayerVehicleID(i) ,VEHICLE_PARAMS_ON,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);  
                  zavodis [i]= 1;  
              }  
         }  
     }  
     SetTimer("MurderGonkaEnded", 360000, 0);  
     EndingMurderRound = 1;  
     MurderPlayers = 0;  
     return true;  
}  
public MurderGonkaEnded()  
{  
     for(new i = 0; i < MAX_PLAYERS; i++)  
     {  
         if(IsPlayerConnected(i))  
         {  
         new string[256];  
          RaceCP [i]= 0;  
         DisablePlayerCheckpoint(i);  
         OOCOff(0x00B95CAA,string);  
         if(PlayerMurder [i]!= 0)  
          {  
             DestroyVehicle(GetPlayerVehicleID(i));  
             }  
             PlayerMurder [i]= 0;  
               EndingMurderRound = 1;  
               MurderPlayers = 0;  
             murder [i]= 0;  
               return true;  
         }  
     }  
     return true;  
}


From Russia With Love!
Дмитрий Дата: Понедельник, 03.11.2014, 23:36 | Сообщение # 2 | Сообщить о нерабочей теме


Аватар для Дмитрий

в public OnPlayerEnterRaceCheckpoint(playerid) после закрытых скобок вставляем :
Код
if(RaceCP [playerid]== 400) { RaceCP [playerid]= 401; DisablePlayerRaceCheckpoint(playerid);     Murderchet [playerid]+=0; SetPlayerRaceCheckpoint(playerid,1,murderace[1][0],murderace[1][1],murderace[1][2], murderace[2][0],murderace[2][1],murderace[2][2],8.0); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 401) { RaceCP [playerid]= 402; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[2][0],murderace[2][1],murderace[2][2],murderace[3][0],murderace[3][1],murderace[3][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 402) { RaceCP [playerid]= 403; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[3][0],murderace[3][1],murderace[3][2],murderace[4][0],murderace[4][1],murderace[4][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 403) { RaceCP [playerid]= 404; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[4][0],murderace[4][1],murderace[4][2],murderace[5][0],murderace[5][1],murderace[5][2],8);    format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 404) { RaceCP [playerid]= 405; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[5][0],murderace[5][1],murderace[5][2],murderace[6][0],murderace[6][1],murderace[6][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 405) { RaceCP [playerid]= 406; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[6][0],murderace[6][1],murderace[6][2],murderace[7][0],murderace[7][1],murderace[7][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 406) { RaceCP [playerid]= 407; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[7][0],murderace[7][1],murderace[7][2],murderace[8][0],murderace[8][1],murderace[8][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 407) { RaceCP [playerid]= 408; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[8][0],murderace[8][1],murderace[8][2],murderace[9][0],murderace[9][1],murderace[9][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 408) { RaceCP [playerid]= 409; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[9][0],murderace[9][1],murderace[9][2],murderace[10][0],murderace[10][1],murderace[10][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 409) { RaceCP [playerid]= 410; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[10][0],murderace[10][1],murderace[10][2],murderace[11][0],murderace[11][1],murderace[11][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 410) { RaceCP [playerid]= 411; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[11][0],murderace[11][1],murderace[11][2],murderace[12][0],murderace[12][1],murderace[12][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 411) { RaceCP [playerid]= 412; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[12][0],murderace[12][1],murderace[12][2],murderace[13][0],murderace[13][1],murderace[13][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 412) { RaceCP [playerid]= 413; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[13][0],murderace[13][1],murderace[13][2],murderace[14][0],murderace[14][1],murderace[14][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 413) { RaceCP [playerid]= 414; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[14][0],murderace[14][1],murderace[14][2],murderace[15][0],murderace[15][1],murderace[15][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 414) { RaceCP [playerid]= 415; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[15][0],murderace[15][1],murderace[15][2],murderace[16][0],murderace[16][1],murderace[16][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 415) { RaceCP [playerid]= 416; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[16][0],murderace[16][1],murderace[16][2],murderace[17][0],murderace[17][1],murderace[17][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 416) { RaceCP [playerid]= 417; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[17][0],murderace[17][1],murderace[17][2],murderace[18][0],murderace[18][1],murderace[18][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 417) { RaceCP [playerid]= 418; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[18][0],murderace[18][1],murderace[18][2],murderace[19][0],murderace[19][1],murderace[19][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 418) { RaceCP [playerid]= 419; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[19][0],murderace[19][1],murderace[19][2],murderace[20][0],murderace[20][1],murderace[20][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 419) { RaceCP [playerid]= 420; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[20][0],murderace[20][1],murderace[20][2],murderace[21][0],murderace[21][1],murderace[21][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 420) { RaceCP [playerid]= 421; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[21][0],murderace[21][1],murderace[21][2],murderace[22][0],murderace[22][1],murderace[22][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 421) { RaceCP [playerid]= 422; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[22][0],murderace[22][1],murderace[22][2],murderace[23][0],murderace[23][1],murderace[23][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 422) { RaceCP [playerid]= 423; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[23][0],murderace[23][1],murderace[23][2],murderace[24][0],murderace[24][1],murderace[24][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 423) { RaceCP [playerid]= 424; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[24][0],murderace[24][1],murderace[24][2],murderace[25][0],murderace[25][1],murderace[25][2],8);    format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 424) { RaceCP [playerid]= 425; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[25][0],murderace[25][1],murderace[25][2],murderace[26][0],murderace[26][1],murderace[26][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 425) { RaceCP [playerid]= 426; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[26][0],murderace[26][1],murderace[26][2],murderace[27][0],murderace[27][1],murderace[27][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 426) { RaceCP [playerid]= 427; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[27][0],murderace[27][1],murderace[27][2],murderace[28][0],murderace[28][1],murderace[28][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 427) { RaceCP [playerid]= 428; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[28][0],murderace[28][1],murderace[28][2],murderace[29][0],murderace[29][1],murderace[29][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 428) { RaceCP [playerid]= 429; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[29][0],murderace[29][1],murderace[29][2],murderace[30][0],murderace[30][1],murderace[30][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 429) { RaceCP [playerid]= 430; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[30][0],murderace[30][1],murderace[30][2],murderace[31][0],murderace[31][1],murderace[31][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 430) { RaceCP [playerid]= 431; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[31][0],murderace[31][1],murderace[31][2],murderace[32][0],murderace[32][1],murderace[32][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 431) { RaceCP [playerid]= 432; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[32][0],murderace[32][1],murderace[32][2],murderace[33][0],murderace[33][1],murderace[33][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 432) { RaceCP [playerid]= 433; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[33][0],murderace[33][1],murderace[33][2],murderace[34][0],murderace[34][1],murderace[34][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 433) { RaceCP [playerid]= 434; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[34][0],murderace[34][1],murderace[34][2],murderace[35][0],murderace[35][1],murderace[35][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 434) { RaceCP [playerid]= 435; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[35][0],murderace[35][1],murderace[35][2],murderace[36][0],murderace[36][1],murderace[36][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 435) { RaceCP [playerid]= 436; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[36][0],murderace[36][1],murderace[36][2],murderace[37][0],murderace[37][1],murderace[37][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 436) { RaceCP [playerid]= 437; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[37][0],murderace[37][1],murderace[37][2],murderace[38][0],murderace[38][1],murderace[38][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 437) { RaceCP [playerid]= 438; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[38][0],murderace[38][1],murderace[38][2],murderace[39][0],murderace[39][1],murderace[39][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 438) { RaceCP [playerid]= 439; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[39][0],murderace[39][1],murderace[39][2],murderace[40][0],murderace[40][1],murderace[40][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 439) { RaceCP [playerid]= 440; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[40][0],murderace[40][1],murderace[40][2],murderace[41][0],murderace[41][1],murderace[41][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 440) { RaceCP [playerid]= 441; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[41][0],murderace[41][1],murderace[41][2],murderace[42][0],murderace[42][1],murderace[42][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 441) { RaceCP [playerid]= 442; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[42][0],murderace[42][1],murderace[42][2],murderace[43][0],murderace[43][1],murderace[43][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 442) { RaceCP [playerid]= 443; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[43][0],murderace[43][1],murderace[43][2],murderace[44][0],murderace[44][1],murderace[44][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 443) { RaceCP [playerid]= 444; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[44][0],murderace[44][1],murderace[44][2],murderace[45][0],murderace[45][1],murderace[45][2],8);    format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 444) { RaceCP [playerid]= 445; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[45][0],murderace[45][1],murderace[45][2],murderace[46][0],murderace[46][1],murderace[46][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 445) { RaceCP [playerid]= 446; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[46][0],murderace[46][1],murderace[46][2],murderace[47][0],murderace[47][1],murderace[47][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 446) { RaceCP [playerid]= 447; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[47][0],murderace[47][1],murderace[47][2],murderace[48][0],murderace[48][1],murderace[48][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 447) { RaceCP [playerid]= 448; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[48][0],murderace[48][1],murderace[48][2],murderace[49][0],murderace[49][1],murderace[49][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 448) { RaceCP [playerid]= 449; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[49][0],murderace[49][1],murderace[49][2],murderace[50][0],murderace[50][1],murderace[50][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 449) { RaceCP [playerid]= 450; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[50][0],murderace[50][1],murderace[50][2],murderace[51][0],murderace[51][1],murderace[51][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 450) { RaceCP [playerid]= 451; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[51][0],murderace[51][1],murderace[51][2],murderace[52][0],murderace[52][1],murderace[52][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 451) { RaceCP [playerid]= 452; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[52][0],murderace[52][1],murderace[52][2],murderace[53][0],murderace[53][1],murderace[53][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 452) { RaceCP [playerid]= 453; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[53][0],murderace[53][1],murderace[53][2],murderace[54][0],murderace[54][1],murderace[54][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 453) { RaceCP [playerid]= 454; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[54][0],murderace[54][1],murderace[54][2],murderace[55][0],murderace[55][1],murderace[55][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 454) { RaceCP [playerid]= 455; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[55][0],murderace[55][1],murderace[55][2],murderace[56][0],murderace[56][1],murderace[56][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 455) { RaceCP [playerid]= 456; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[56][0],murderace[56][1],murderace[56][2],murderace[57][0],murderace[57][1],murderace[57][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 456) { RaceCP [playerid]= 457; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[57][0],murderace[57][1],murderace[57][2],murderace[58][0],murderace[58][1],murderace[58][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 457) { RaceCP [playerid]= 458; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[58][0],murderace[58][1],murderace[58][2],murderace[59][0],murderace[59][1],murderace[59][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   
     else if(RaceCP [playerid]== 458) { RaceCP [playerid]= 459; DisablePlayerRaceCheckpoint(playerid); Murderchet [playerid]+=1; SetPlayerRaceCheckpoint(playerid,1,murderace[59][0],murderace[59][1],murderace[59][2],murderace[60][0],murderace[60][1],murderace[60][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}   


From Russia With Love!
Дмитрий Дата: Понедельник, 03.11.2014, 23:38 | Сообщение # 3 | Сообщить о нерабочей теме


Аватар для Дмитрий

в public OnPlayerEnterRaceCheckpoint(playerid) после закрытых скобок вставляем : (ЭТОТ КОД СТАВИМ СРАЗУ ПОСЛЕ
Код
[1],murderace[59][2],murderace[60][0],murderace[60][1],murderace[60][2],8); format(tmp2, sizeof(tmp2), "~b~%d/60", Murderchet[playerid]); GameTextForPlayer(playerid, tmp2, 5000, 3);}
(ЭТО В КОДЕ ВЫШЕ, НЕ ВЛЕЗ ВЕСЬ КОД))

Код
   if(Murderchet [playerid]== 60)   
     {   
     RaceCP [playerid]= 459;   
     SetPlayerRaceCheckpoint(playerid,1,murderace[0][0],murderace[0][1],murderace[0][2],0.0,0.0,0.0,8);   
     }   
     if(RaceCP [playerid]== 459)   
     {   
      GetPlayerName(playerid, name, sizeof(name));  
          RaceCP [playerid]= 0;  
         murder [playerid]= 0;  
          DisablePlayerRaceCheckpoint(playerid);  
         Murderchet [playerid]= 0;  
         if(FirstMurderWinner == 999)  
         {  
             FirstMurderWinner = playerid;  
             for(new i = 0; i < MAX_PLAYERS; i++)  
             {  
                 if(IsPlayerConnected(i))  
                 {  
                     if(PlayerMurder [i]!= 0)  
                     {  
                         format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~g~%s Finished - 1st",name);  
                         GameTextForPlayer(i, string, 2500, 3);  
                           SendClientMessage(playerid, 0x6495EDFF, "Вы выиграли 12.000 $!");  
                    PlayerInfo [playerid][pCash]+=12000;  
                           PlayerMurder [playerid]= 0;  
                           EndingMurderRound = 1;  
                            return true;  

                     }  
                 }  
             }  
         }  
         else if(SecondMurderWinner == 999)  
         {  
             SecondMurderWinner = playerid;  
             for(new i = 0; i < MAX_PLAYERS; i++)  
             {  
                 if(IsPlayerConnected(i))  
                 {  
                     if(PlayerMurder [i]!= 0 )  
                     {  
                         format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~g~%s Finished - 2nd",name);  
                         GameTextForPlayer(i, string, 2500, 3);  
                         PlayerMurder [playerid]= 0;  
                           EndingMurderRound = 1;  
                           return true;  
                     }  
                 }  
             }  
         }  
         else if(ThirdMurderWinner == 999)  
         {  
             ThirdMurderWinner = playerid;  
             for(new i = 0; i < MAX_PLAYERS; i++)  
             {  
                 if(IsPlayerConnected(i))  
                 {  
                     if(PlayerMurder [i]!= 0)  
                     {  
                         format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~g~%s Finished - 3d",name);  
                         GameTextForPlayer(i, string, 2500, 3);  
                         PlayerMurder [playerid]= 0;  
                           EndingMurderRound = 1;  
                           return true;  
                     }  
                 }  
             }  
         }  
            PlayerMurder [playerid]= 0;  
         RaceCP [playerid]= 0;  
          DisablePlayerRaceCheckpoint(playerid);  
         Murderchet [playerid]= 0;  
              return true;  
     }


From Russia With Love!
Дмитрий Дата: Понедельник, 03.11.2014, 23:38 | Сообщение # 4 | Сообщить о нерабочей теме


Аватар для Дмитрий



куда нибудь в конец мода:
Код
stock SendRacersMessage(color, string[])  
{  
     for(new i = 0; i < MAX_PLAYERS; i++)  
     {  
         if(IsPlayerConnected(i))  
         {  
              if (!IsACop(i) || !IsAArm(i))  
             {  
                    if(!gFam[i])  
                 {  
                     SendClientMessage(i, color, string);  
                 }  
                }  
         }  
     }  
}


добавляем команды:
Код
if(strcmp(cmd, "/race", true) == 0)  
     {  
     if(PlayerInfo [playerid][pMember]== 23 && PlayerInfo [playerid][pRank]== 5)  
     {  
         if(IsPlayerConnected(playerid))  
         {  
             new length = strlen(cmdtext);  
             while ((idx < length) && (cmdtext [idx]<= ' '))  
             {  
                 idx++;  
             }  
             new offset = idx;  
             new result[64];  
             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))  
             {  
                 result[idx - offset] = cmdtext[idx];  
                 idx++;  
             }  
             result[idx - offset] = EOS;  
             if(!strlen(result))  
             {  
                 SendClientMessage(playerid, COLOR_GRAD2, "Введите: /race [текст]");  
                 return true;  
             }  
             format(string, sizeof(string), "SMS: %s. Отправитель: Стритрейсеры {1500FF}/gps->Развлечения->Регистрация на Переулки.",result);  
             SendRacersMessage(COLOR_YELLOW2, string);  
             EndingMurderRound = 0;   
         }  
     }  
         return 1;  
     }   
       else if (strcmp(cmd, "/startrace", true) == 0)   
     {   
      if(PlayerInfo [playerid][pMember]== 23 && PlayerInfo [playerid][pRank]== 5)  
          {  
          if(!PlayerToPoint(3.0,playerid,1130.1421,-862.8906,43.2831)) return SendClientMessage(playerid,COLOR_REDD,"Вы не у старта");  
            {  
          if(MurderPlayers < 4) return SendClientMessage(playerid,COLOR_WHITE,"Недостаточно игроков!");  
          {  
          new length = strlen(cmdtext);  
             while ((idx < length) && (cmdtext [idx]<= ' '))  
             {  
                 idx++;  
             }  
             new offset = idx;  
             new result[64];  
             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))  
             {  
                 result[idx - offset] = cmdtext[idx];  
                 idx++;  
             }  
             result[idx - offset] = EOS;  
             SendClientMessage(playerid,COLOR_WHITE,"Гонка началась");  
                 SetTimer("MurderStartGonka1", 100, 0);   
         }   
     }  
}  
     return 1;   
}


Команда для регистрации игроков:
Код
if(strcmp(cmd, "/reg", true) == 0)  
     {  
         if (IsPlayerConnected(playerid))  
         {  
         if(PlayerInfo [playerid][pMember]== 23 && PlayerInfo [playerid][pRank]== 5)  
         {  
                 if(!IsPlayerInRangeOfPoint(playerid, 30, 1053.9081,-908.9748,42.8060)) return SendClientMessage(playerid,COLOR_WHITE,"Вы не у места регистрации!");  
                 if(MurderPlayers >= 4) return SendClientMessage(playerid,COLOR_WHITE,"Много участников!");  
                 tmp = strtok(cmdtext, idx);  
                 if(strlen(tmp) == 0)  
                     return SendClientMessage(playerid, COLOR_SYSTEM, "Команда: /reg [id]");  
                 new pregidsss = strval(tmp);  
                     if (!ProxDetectorS(5.0, playerid, pregidsss))  
                     {  
                          SendClientMessage(playerid, COLOR_RED, "Этот игрок слишком далеко");  
                          return true;  
                      }  
                 new name[35];  
                 race = playerid;  
                    GetPlayerName(playerid, name, sizeof(name));  
                 SendClientMessage(playerid,COLOR_WHITE,"Вы предложили поучавствовать в гонке!");  
                    format(string, sizeof(string), "%s предлагает вам участие в гонке за 3500$\nХотите принять?",name);  
                 ShowPlayerDialog(pregidsss,9957,DIALOG_STYLE_MSGBOX,"Билет",string,"Да","Нет");  
                 SetTimer("SendCop",300000,0);  
                   return true;  
                 }  
          }  
}


в public OnDialogResponse вставляем:
Код
case 9957:  
     {  
         if(response)  
         {  
             if(PlayerInfo [playerid][pCash]< 3500) return SendClientMessage(playerid, COLOR_GRAD1, "Недостаточно денег!");  
             if(PlayerInfo [playerid][pCar]== 0) return SendClientMessage(playerid, COLOR_GRAD1, " У вас нет машины!");  
             if(PlayerMurder [playerid]== 1) return SendClientMessage(playerid,COLOR_WHITE,"Вы уже зарегистрированы на гонку!");  
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы зарегистрировались на гонку");  
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "Выйгрыш составляет 12.000 $");  
             PlayerInfo [playerid][pCash]-= 3500;  
             PlayerInfo [race][pCash]+= 3500;  
             MurderPlayers += 1;  
             PlayerMurder [playerid]= 1;  
         }  
         return true;  
     }


Обновлено
Координаты для регистрации :
Код
1053.9081,-908.9748,42.8060, советую впихнуть в /gps


Координаты старта гонки:
Код
1130.1421,-862.8906,43.2831, так же советую вставить в /gps


Обновил Мануал. Сейчас не надо заезжать на пикап, и тебя не будет тепать на старт. Сейчас ты приезжаешь на регистрацию, регистрируешься, дальше едешь на старт, и Король Переулков начинает гонку командой /startrace.

Автор: Murder


From Russia With Love!
  • Страница 1 из 1
  • 1
Поиск: