Szerző Téma: Hibák a versenyben.  (Megtekintve 2206 alkalommal)

[MM]Encoder

  • Vendég
Hibák a versenyben.
« Dátum: 2010. július 31. - 13:46:29 »
0 Show voters
Nos újra segítségre szorulok, egy leírás alapján elkezdtem egy versenyt csinálni de egy picit változtattam rajta mivel én több checkpointot akartam 26 hibát kaptam a végére.  :o  :(
A hibák:
 
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(148) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(170) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(171) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(177) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(178) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(184) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(185) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(191) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(192) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(198) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(199) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(205) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(206) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(212) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(213) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(219) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(220) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(226) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(227) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(233) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(234) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(240) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(241) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(247) : error 032: array index out of bounds (variable \"Checkpoints\")
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(248) : error 017: undefined symbol \"i\"
C:\\Documents and Settings\\Bakos Attila\\Asztal\\SERVER_2\\gamemodes\\RACE2.pwn(254) : error 032: array index out of bounds (variable \"Checkpoints\")
Compilation aborted.Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
26 Errors.
 
[/quote]
Ebben a részben jelzi a hibákat:
 
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
new rand = random(sizeof(PositionSpawns));
SetPlayerPos(playerid, PositionSpawns[rand][0], PositionSpawns[rand][1], PositionSpawns[rand][2]);
    PlayerPlaySound( playerid, 1188, 0.0, 0.0, 0.0 );
TogglePlayerControllable(playerid,1);
SetTimer(\"GiveVehicle\", 8400, false);
SetTimer(\"StartRace\", 12000, false);
return 1;
}
forward StartRace(playerid);
public StartRace(playerid)
{
GameTextForAll(\"GO!\", 5000, 6);
    PlaySoundForAll(1057, 0.0, 0.0, 0.0 );
    ToggleAllControllable(0);
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
       if(IsPlayerConnected(i))
              {
                  SetPlayerRaceCheckpoint(i, 0, Checkpoints[1][1], Checkpoints[1][2], Checkpoints[1][3], Checkpoints[2][1], Checkpoints[2][2], Checkpoints[2][3], 10);
                  Stats = 1;
                  return 1;
              }
         }
    return 1;
}
forward GiveVehicle(playerid);
public GiveVehicle(playerid)
{
GivePlayerVehicle(playerid,463);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
     switch(Stats[playerid])
     {
         case 1:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[2][1], Checkpoints[2][2], Checkpoints[2][3], Checkpoints[3][1], Checkpoints[3][2], Checkpoints[3][3], 10);
              Stats = 2;
              return 1;
         }
         case 2:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[3][1], Checkpoints[3][2], Checkpoints[3][3], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3], 10);
              Stats = 3;
              return 1;
         }
         case 3:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3], Checkpoints[5][1], Checkpoints[5][2], Checkpoints[5][3]-5, 10);
              Stats = 4;
              return 1;
         }
         case 4:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[5][1], Checkpoints[5][2], Checkpoints[5][3], Checkpoints[6][1], Checkpoints[6][2], Checkpoints[6][3]-5, 10);
              Stats = 5;
              return 1;
         }
         case 5:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[6][1], Checkpoints[6][2], Checkpoints[6][3], Checkpoints[7][1], Checkpoints[7][2], Checkpoints[7][3]-5, 10);
              Stats = 6;
              return 1;
         }
         case 6:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[7][1], Checkpoints[7][2], Checkpoints[7][3], Checkpoints[8][1], Checkpoints[8][2], Checkpoints[8][3]-5, 10);
              Stats = 7;
              return 1;
         }
         case 7:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[8][1], Checkpoints[8][2], Checkpoints[8][3], Checkpoints[9][1], Checkpoints[9][2], Checkpoints[9][3]-5, 10);
              Stats = 8;
              return 1;
         }
         case 8:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[9][1], Checkpoints[9][2], Checkpoints[9][3], Checkpoints[10][1], Checkpoints[10][2], Checkpoints[10][3]-5, 10);
              Stats = 9;
              return 1;
         }
         case 9:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[10][1], Checkpoints[10][2], Checkpoints[10][3], Checkpoints[11][1], Checkpoints[11][2], Checkpoints[11][3]-5, 10);
              Stats = 10;
              return 1;
         }
         case 10:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[11][1], Checkpoints[11][2], Checkpoints[11][3], Checkpoints[12][1], Checkpoints[12][2], Checkpoints[12][3]-5, 10);
              Stats = 11;
              return 1;
         }
         case 11:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[12][1], Checkpoints[12][2], Checkpoints[12][3], Checkpoints[13][1], Checkpoints[13][2], Checkpoints[13][3]-5, 10);
              Stats = 12;
              return 1;
         }
         case 12:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[13][1], Checkpoints[13][2], Checkpoints[13][3], Checkpoints[14][1], Checkpoints[14][2], Checkpoints[14][3]-5, 10);
              Stats = 13;
              return 1;
         }
         case 13:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[14][1], Checkpoints[14][2], Checkpoints[14][3], Checkpoints[15][1], Checkpoints[15][2], Checkpoints[15][3]-5, 10);
              Stats = 14;
              return 1;
         }
         case 14:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[15][1], Checkpoints[15][2], Checkpoints[15][3], Checkpoints[16][1], Checkpoints[16][2], Checkpoints[16][3]-5, 10);
              Stats = 15;
              return 1;
         }
         case 15:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[16][1], Checkpoints[16][2], Checkpoints[16][3], Checkpoints[17][1], Checkpoints[17][2], Checkpoints[17][3]-5, 10);
              Stats = 16;
              return 1;
         }
         case 16:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[17][1], Checkpoints[17][2], Checkpoints[17][3], Checkpoints[18][1], Checkpoints[18][2], Checkpoints[18][3]-5, 10);
              Stats = 17;
              return 1;
         }
         case 17:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[18][1], Checkpoints[18][2], Checkpoints[18][3], Checkpoints[19][1], Checkpoints[19][2], Checkpoints[19][3]-5, 10);
              Stats = 18;
              return 1;
         }
         case 18:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[19][1], Checkpoints[19][2], Checkpoints[19][3], Checkpoints[20][1], Checkpoints[20][2], Checkpoints[20][3]-5, 10);
              Stats = 19;
              return 1;
         }
         case 19:
         {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[20][1], Checkpoints[20][2], Checkpoints[20][3], Checkpoints[20][1], Checkpoints[20][2], Checkpoints[20][3]-5, 10);
              Stats = 20;
              return 1;
         }
         case 20:
         {
              DisablePlayerRaceCheckpoint(playerid);
              GameTextForPlayer(playerid, \"~w~Megnyerted a versenyt!\", 3000, 1);
              GivePlayerMoney(playerid, 1250);
     new name[MAX_PLAYER_NAME];
     GetPlayerName( playerid, name, sizeof name );
     format(string, sizeof(string), \"* %s nyerte a versenyt!\", name);
      SendClientMessageToAll(GRASS, string);
              return 1;
         }
     }
}

 
Valaki tud segíteni?  :-\\  :dead:

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Hibák a versenyben.
« Válasz #1 Dátum: 2010. augusztus 01. - 21:56:46 »
0 Show voters
Azokban a sorokban ahol hibát ír, cseréld ki az \'i\'-t \'playerid\'-re.

Nem elérhető hpeter94

  • 1450
  • Fórum fenntartó
    • Profil megtekintése
Hibák a versenyben.
« Válasz #2 Dátum: 2010. augusztus 01. - 22:06:17 »
0 Show voters
ideoközben javítgattam énis neki mostmár csak a checkpointoknál van valami...

[MM]Encoder

  • Vendég
Hibák a versenyben.
« Válasz #3 Dátum: 2010. augusztus 01. - 22:08:30 »
0 Show voters
Énis ezt akartam írni  ;D igen már csak a Checkpointtal van vmi  :(

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Hibák a versenyben.
« Válasz #4 Dátum: 2010. augusztus 01. - 22:14:18 »
0 Show voters
Nem muszáj switch elágazással dolgozni.
 

if ( Stats [ playerid ] == 1 )
{
    /*  */
    return 1;
}
else if ( Stats [ playerid ] == 2 )
{
    /*  */
    return 1;
}

 
·· Lehet így is.  :D
De ebe volt egy kis HSZ hunterkedés is.  :angry:

[MM]Encoder

  • Vendég
Hibák a versenyben.
« Válasz #5 Dátum: 2010. augusztus 02. - 22:29:31 »
0 Show voters
Nos megcsináltam ahogy javasoltad és az végre jó semmi errort nem ír de viszont semmit nem csinál a CP , amikor áthaladok rajta nem vált a következore   :o  :(
 
new Float:PositionSpawns[16][3] = {
{843.5294,684.0903,11.6951},
{841.3345,688.3810,11.6421},
{849.7034,692.1505,11.6883},
{851.6354,686.3328,11.7458},
{864.4026,692.5613,11.7707},
{864.4026,692.5613,11.7707},
{876.3006,702.7131,11.3867},
{877.8871,697.4048,11.3977},
{897.3527,705.6249,10.7688},
{894.9045,711.7098,10.7723},
{910.4606,717.9435,10.7186},
{912.8830,712.7986,10.7109},
{927.9348,718.8174,10.7130},
{925.6396,724.1364,10.7132,},
{938.3838,727.8918,10.6958},
{940.5068,721.6165,10.6963}
};
new Stats[MAX_PLAYERS];
new Float:Checkpoints[20][3] = {
{779.4153,666.0378,11.3294},
{540.4055,679.7401,3.3386},
{384.2715,754.6032,6.1344},
{215.8735,729.2396,6.1377},
{50.9785,642.2468,6.5987},
{-23.3371,605.1353,10.8010},
{-121.6257,570.7854,15.8794},
{-274.7844,550.7006,16.1792},
{-407.3480,559.0037,17.0495},
{-525.4532,595.2121,16.6398},
{-727.0151,686.5873,17.3965},
{-786.7443,714.0154,18.5722},
{-855.3204,766.7495,19.7021},
{-892.3096,863.9409,19.4531},
{-916.7264,983.7038,19.2493},
{-973.5539,1120.9655,29.9276},
{-1013.9644,1175.9628,34.7805},
{-1133.6501,1094.7911,38.5184},
{-1296.8649,923.3022,45.8823},
{-1656.8535,543.9624,38.3067}
};
main()
{
print(\"----------------------------------\");
print(\"23# Freeway | Magyar Mini-Missions\");
print(\"----------------------------------\");
}
public OnGameModeInit()
{
SetGameModeText(\"Freeway\");
AddPlayerClass(247,0.0,0.0,0.0,0.0,0,0,0,0,0,0);
AddPlayerClass(248,0.0,0.0,0.0,0.0,0,0,0,0,0,0);
AddPlayerClass(254,0.0,0.0,0.0,0.0,0,0,0,0,0,0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
   PlayerPlaySound( playerid, 1187, 0.0, 0.0, 0.0 );
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerPos(playerid,1605.6316,-1691.6774,28.3432);
SetPlayerCameraPos(playerid,1605.9249,-1697.3828,28.3167);
SetPlayerCameraLookAt(playerid,1605.6316,-1691.6774,28.3432);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerFacingAngle(playerid,360);
SetPlayerInterior(playerid,0);
new rand = random(sizeof(PositionSpawns));
SetPlayerPos(playerid, PositionSpawns[rand][0], PositionSpawns[rand][1], PositionSpawns[rand][2]);
   PlayerPlaySound( playerid, 1188, 0.0, 0.0, 0.0 );
TogglePlayerControllable(playerid,0);
SetTimer(\"GiveVehicle\", 8400, false);
SetTimer(\"StartRace\", 12000, false);
SendClientMessage(playerid,ORANGE,\"[ Server ]: A verseny másodperceken belül elindul!\");
return 1;
}
forward StartRace(playerid);
public StartRace(playerid)
{
GameTextForAll(\"GO!\", 5000, 6);
   PlaySoundForAll(1057, 0.0, 0.0, 0.0 );
   ToggleAllControllable(1);
   if(IsPlayerConnected(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] = 0;
   return 1;
}
   return 1;
}
forward GiveVehicle(playerid);
public GiveVehicle(playerid)
{
GivePlayerVehicle(playerid,463);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
     if ( Stats [ playerid ] == 0 )
     {
            SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], 10);
     return 1;
     }
             else if ( Stats [ playerid ] == 1 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 2 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 3 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 4 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 5 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], 10);
          return 1;
     }
             else if ( Stats [ playerid ] == 6 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 7 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 8 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 9 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 10 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 11 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 12 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 13 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 14 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][2], 10);
          return 1;
     }
             else if ( Stats [ playerid ] == 15 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][2], Checkpoints[17][0], Checkpoints[17][1], Checkpoints[17][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 16 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[17][0], Checkpoints[17][1], Checkpoints[17][2], Checkpoints[18][0], Checkpoints[18][1], Checkpoints[18][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 17 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[18][0], Checkpoints[18][1], Checkpoints[18][2], Checkpoints[19][0], Checkpoints[19][1], Checkpoints[19][2], 10);
          return 1;
     }
             else if ( Stats [ playerid ] == 18 )
      {
             SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[19][0], Checkpoints[19][1], Checkpoints[19][2], Checkpoints[19][0], Checkpoints[19][1], Checkpoints[19][2], 10);
          return 1;
     }
            else if ( Stats [ playerid ] == 19 )
      {
     new string[128];
             DisablePlayerRaceCheckpoint(playerid);
             GameTextForPlayer(playerid, \"~w~Megnyerted a versenyt!\", 3000, 1);
             GivePlayerMoney(playerid, 1250);
     new name[MAX_PLAYER_NAME];
     GetPlayerName( playerid, name, sizeof name );
     format(string, sizeof(string), \"* %s nyerte a versenyt!\", name);
      SendClientMessageToAll(GREEN, string);
          return 1;
     }
     return 0;
     }
« Utoljára szerkesztve: 2010. augusztus 03. - 08:49:20 írta [MM]Encoder »

Nem elérhető hpeter94

  • 1450
  • Fórum fenntartó
    • Profil megtekintése
Hibák a versenyben.
« Válasz #6 Dátum: 2010. augusztus 03. - 08:54:30 »
0 Show voters
persze hogy nem vált... az még ezé kell bele hogy eltüntesse a chackpointot meg hogy megváltoztassa a stats értékét....

[MM]Encoder

  • Vendég
Hibák a versenyben.
« Válasz #7 Dátum: 2010. augusztus 03. - 15:46:13 »
0 Show voters
Hiába úgyse megy  :D

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Hibák a versenyben.
« Válasz #8 Dátum: 2010. augusztus 03. - 17:38:19 »
0 Show voters
Encoder\" post=\"71482\" timestamp=\"1280843173\"]
Hiába úgyse megy  :D
 
[/quote]
Mennie kell, nekem így van megcsinálva a buszos meló az RP módomba.  :D
 

if ( Stats [ playerid ] == 0 )
{
    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;
}
else if ( Stats [ playerid ] == 1 )
{
    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 ] = 2;
    return 1;
}
/*   */

[MM]Encoder

  • Vendég
Hibák a versenyben.
« Válasz #9 Dátum: 2010. augusztus 03. - 20:07:29 »
0 Show voters
Kipróbáltam de nemjó valamiért egyszeruen nem akar tovább beadni a CP ket amikor az elson áthaladok.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal