[Ajuda] O q tem de errado
#1

me ajudem por favor esse code с esta funcionando me ajudem com esse bug

No topo do GM depois das includes

PHP код:
new Stats[MAX_PLAYERS];
new 
Float:Checkpoints[17][3]= {
{
2021.9279,851.2713,6.4387},
{
1806.2888,851.1154,10.3762},
{
1597.7745,850.9503,6.4374},
{
1315.8704,886.0849,6.5154},
{
1227.3850,1170.5470,6.5219},
{
1228.7192,1804.4149,6.4378},
{
1229.5260,2301.2026,6.4387},
{
1447.5416,2452.2988,6.4377},
{
1849.4731,2497.6997,6.5153},
{
2287.5569,2607.9063,6.4585},
{
2609.7202,2514.3423,5.8201},
{
2706.6592,2158.3931,6.4492},
{
2705.5173,1674.4374,6.4448},
{
2706.8931,1278.5399,6.4373},
{
2624.1135,932.2136,6.4433},
{
2312.5583,854.1749,6.4375},
{
2049.3154,853.4050,6.4387}
}; 
Agora no OnPlayerComandText

PHP код:
if(strcmp(cmdtext"/partida"true) == 0)
{
     if(
IsPlayerAdmin(playerid))
     {
         for(new 
0GetMaxPlayers(); i++)
         {
              if(
IsPlayerConnected(i))
              {
                  
SetPlayerRaceCheckpoint(i0Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], 10);
                  
Stats[i] = 1;
                  return 
1;
              }
         }
     }
     else
     {
         
SendClientMessage(playerid0x456EAF67"Apenas Para Admins");
     } 
E por ultimo no OnPlayerEnterRaceCheckpoint

PHP код:
{
    for(new 
0GetMaxPlayers(); i++)
         {
              if(
IsPlayerConnected(i))
              {
     switch(
Stats[playerid])
     {
         case 
0:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[0][0], Checkpoints[0][1], Checkpoints[0][2], Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], 10);
              
Stats[i] = 0;
              return 
1;
         }
         case 
1:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], 10);
              
Stats[i] = 1;
              return 
1;
         }
         case 
2:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], 10);
              
Stats[i] = 2;
              return 
1;
         }
         case 
3:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], 10);
              
Stats[i] = 3;
              return 
1;
         }
         case 
4:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], 10);
              
Stats[i] = 4;
              return 
1;
         }
         case 
5:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], 10);
              
Stats[i] = 5;
              return 
1;
         }
         case 
6:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], 10);
              
Stats[i] = 6;
              return 
1;
         }
         case 
7:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], 10);
              
Stats[i] = 7;
              return 
1;
         }
         case 
8:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], 10);
              
Stats[i] = 8;
              return 
1;
         }
         case 
9:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], 10);
              
Stats[i] = 9;
              return 
1;
         }
         case 
10:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], 10);
              
Stats[i] = 10;
              return 
1;
         }
         case 
11:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], 10);
              
Stats[i] = 11;
              return 
1;
         }
         case 
12:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], 10);
              
Stats[i] = 12;
              return 
1;
         }
         case 
13:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], 10);
              
Stats[i] = 13;
              return 
1;
         }
         case 
14:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], 10);
              
Stats[i] = 14;
              return 
1;
         }
         case 
15:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], 10);
              
Stats[i] = 15;
              return 
1;
         }
         case 
17:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid1Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][2], Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][0], 10);
              
Stats[i] = 15;
              return 
1;
         }
         case 
16:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
GameTextForPlayer(playerid"Voce ganhou a corrida!!|voce ganhou $10000"30001);
              
GivePlayerMoney(playerid10000);
              return 
1;
         }
     }
     }
     }
    return 
0;
}
//17 
Espero ter ajudado,desculpe por nгo ter explicado muito bem,primeiro post meu no forum[/QUOTE]
Reply
#2

oks mais vc tem que explicar o qe nele que nao funciona
Reply
#3

pawn Код:
{
     switch(Stats[playerid])
     {
         case 0:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[0][0], Checkpoints[0][1], Checkpoints[0][2], Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], 10);
              Stats[playerid] = 1;
              return 1;
         }
         case 1:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], 10);
              Stats[playerid] = 2;
              return 1;
         }
         case 2:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], 10);
              Stats[playerid] = 3;
              return 1;
         }
         case 3:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], 10);
              Stats[playerid] = 4;
              return 1;
         }
         case 4:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], 10);
              Stats[playerid] = 5;
              return 1;
         }
         case 5:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], 10);
              Stats[playerid] = 6;
              return 1;
         }
         case 6:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], 10);
              Stats[playerid] = 7;
              return 1;
         }
         case 7:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], 10);
              Stats[playerid] = 8;
              return 1;
         }
         case 8:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], 10);
              Stats[playerid] = 9;
              return 1;
         }
         case 9:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], 10);
              Stats[playerid] = 10;
              return 1;
         }
         case 10:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], 10);
              Stats[playerid] = 11;
              return 1;
         }
         case 11:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], 10);
              Stats[playerid] = 12;
              return 1;
         }
         case 12:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], 10);
              Stats[playerid] = 13;
              return 1;
         }
         case 13:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], 10);
              Stats[playerid] = 14;
              return 1;
         }
         case 14:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], 10);
              Stats[playerid] = 15;
              return 1;
         }
         case 15:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], 10);
              Stats[playerid] = 16;
              return 1;
         }
         case 16:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 1, Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][2], Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][0], 10);
              Stats[playerid] = 17;
              return 1;
         }
         case 17:
         {
              DisablePlayerRaceCheckpoint(playerid);
              GameTextForPlayer(playerid, "Voce ganhou a corrida!!|voce ganhou $10000", 3000, 1);
              GivePlayerMoney(playerid, 10000);
              return 1;
         }
     }
    return 0;
}//17
Reply


Forum Jump:


Users browsing this thread: