Jump to content

Fórum

  1. Obecné

    1. Všeobecné

      Sekce, jež sdružuje podsekce týkající se fóra.

      387
      témat
      5.8k
      příspěvků
    2. Všechno možné

      Sekce, kam lze vkládat vše, co nelze zařadit jinam.

      5.5k
      témat
      64.5k
      příspěvků
  2. Programování

    1. Poradna

      Podkategorie, jež sdružuje žádosti o pomoc.

      13.3k
      témat
      99.9k
      příspěvků
    2. Návody

      Podkategorie, jež sdružuje návody a tipy/triky.

      1.1k
      témat
      16.7k
      příspěvků
    3. Tvorba

      Podkategorie, jež sdružuje témata prezentující vlastní tvorbu.

      3.4k
      témat
      51.4k
      příspěvků
    4. Hledám programátora

      Hledáte programátora? Pište do této sekce.

      105
      témat
      532
      příspěvků
  3. Herní oblast

    1. Poradna

      Podkategorie, jež sdružuje žádosti o pomoc.

      6
      témat
      20
      příspěvků
    2. Jak na to?

      Podkategorie, jež sdružuje návody a tipy/triky.

      4
      témat
      13
      příspěvků
    3. Herní kontext

      Podkategorie, v níž jsou témata týkající se her.

      17
      témat
      161
      příspěvků
    4. Herní zážitky

      Podkategorie, kde lze sdílet zážitky z her.

      4
      témat
      17
      příspěvků
    5. Komunita

      Podkategorie, v níž lze prezentovat herní klany, hostingy a jiné projekty.

      314
      témat
      3.8k
      příspěvků
  4. Grafika

    1. Poradna

      Podkategorie, jež sdružuje žádosti o pomoc.

      291
      témat
      3.1k
      příspěvků
    2. Návody

      Podkategorie, jež sdružuje návody a tipy/triky.

      • Zatím bez příspěvků
    3. Tvorba

      Podkategorie, jež sdružuje témata prezentující vlastní tvorbu.

      305
      témat
      5.7k
      příspěvků
  5. Ostatní

    1. Hardware a software

      Sekce týkající se hardwaru a softwaru – počítače, mobily, tablety, operační systémy, aplikace atd.

      1k
      témat
      8.7k
      příspěvků
    2. Hledám/nabízím

      Sekce, ve které můžete zveřejňovat nabídky a poptávky.

      2.9k
      témat
      21.5k
      příspěvků
    3. Archiv

      Archiv starých a již nezařaditelných témat.

      1.1k
      témat
      15.8k
      příspěvků
    4. 3D Tisk

      3D tiskárny, printing a vše okolo plasto-tvorbě. 

      1
      téma
      19
      příspěvků
  • Reklama

  • Kdo je online? (Celý seznam)

    • There are no registered users currently online
  • Dnes mají narozeniny

    1. FlipSyd3
      FlipSyd3
      (28 let)
  • Změny statusů

  • Příspěvky

    • milous sa ti snažil naznačiť, že chyba je tu:   case CCP1: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1142.7788,1264.6090,11.4266,5.0); autoskolac[playerid] = CCP1; } AK hráč vezme 1. checkpoint Cčka, do autoskolac ukladáš zase 1. checkpoint Cčka. Chceš tam autoskolac[playerid] = CCP2 a podobne to posunúť všade (v Cčku). Čo sa týka returnu, skús si najskôr prečítať ako funguje napríklad tu: https://sampwiki.blast.hk/wiki/Control_Structures#return Pamätám si, že keď som sa učil pawn (moja prvá skúsenosť s programovaním), tak som return dlho nechápal, až kým som nenarazil na tento článok.
    • Jasne rozumiem, skúsal som to aj takto   switch(autoskolac[playerid]) { case CCP1: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1142.7788,1264.6090,11.4266,5.0); autoskolac[playerid] = CCP1; } case CCP2: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1125.2251,1232.4261,11.4270,5.0); autoskolac[playerid] = CCP2; } case CCP3: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1111.6285,1258.4397,11.4275,5.0); autoskolac[playerid] = CCP3; } case CCP4: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1110.7295,1299.6412,11.4267,5.0); autoskolac[playerid] = CCP4; } } return 1; }             case 1:                 {                 if (PlayerInfo[playerid][pVodickyC] == 1)                 {                 SetTimerEx("preukazy", 5000, false, "i", playerid);                 PlayerTextDrawShow(playerid, preukazvlastni1[playerid]);                 PlayerTextDrawShow(playerid, preukazvlastni[playerid]);                 SetPlayerPos(playerid,1170.7604,1353.1532,10.9219);                 }                 else if(GetPlayerMoney(playerid) < 9999)                 {                 SetTimerEx("Nedostatokpenazi", 5000, false, "i", playerid);                 PlayerTextDrawShow(playerid, nedostatokpenazi[playerid]);                 PlayerTextDrawShow(playerid, nedostatokpenazi1[playerid]);                 SetPlayerPos(playerid,1170.7604,1353.1532,10.9219);                 }                 else //když splňuje podmínky                 {                 GivePlayerMoney(playerid,-10000); //vezmem mu peníze                 autoskolac[playerid] = CCP1;                 autoskolacarc = CreateVehicle(403, 1139.6000000,1342.1000000,11.5000000,180.0000000, random(100), random(100), 1000);                 autoskolacarcnaves = CreateVehicle(435, 1139.6000000,1351.0000000,11.5000000,180.0000000, random(100), random(100), 1000);                 AttachTrailerToVehicle(autoskolacarcnaves, autoskolacarc);                 PutPlayerInVehicle(playerid, autoskolacarc,0);                 SetPlayerCheckpoint(playerid,1142.4054,1314.2500,11.4265,5.0); // prvy CHECKPOINT                 }                 } aj v dialogu som prehodil ale stále mi ide len prvy ale ten další zobrazi ale ked na neho vejdem už nereaguje.. ešte sa chcem spýtať či za tým prvým switchom nema byť return??.. v navode tu na fore bolo písane od autora " ja ho tam nedávam " .. nemôže to byť koli tomu ?   - každopadne chalani dakujem za pomoc
    • Namiesto case 1, 2, 3... Používaj vo switchi tie svoje definície a podobné chyby uvidíš v budúcnosti ľahšie
    • Čaute prosim vas vedel by mi niekto pomocť s tymto problemom v autoškole? Mám vytvorenu skupinu B .. pri ktorej mi funguje uplne všetko aj ukladanie atd. Problem nastáva ked chcem vytvorit dalšie checkpointy určené len pre Skupinu C.. funguje mi iba prvý checkpoint ale další ktory mam už v onplayerentercheckpoint tak neurobi nič.. Dakujem za pomoc..   define... #define CP1 1 #define CP2 2 #define CP3 3 #define CP4 4 #define CP5 5 #define CP6 6 #define CP7 7 #define CP8 8 #define CP9 9 #define CP10 10 #define CP11 11 #define CP12 12 #define CP13 13 #define CP14 14 #define CP15 15 #define CCP1 16 #define CCP2 17 #define CCP3 18 #define CCP4 19 // Onplayerentercheckpoint public OnPlayerEnterCheckpoint(playerid) { //============================================================================== switch(autoskolab[playerid]) { case 1: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-2047.6212,-78.2796,34.7413,5.0); autoskolab[playerid] = CP2; } case 2: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-2026.7949,-156.6074,35.3203,5.0); autoskolab[playerid] = CP3; } case 3: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-2045.3695,-173.9235,37.7754,5.0); autoskolab[playerid] = CP4; } case 4: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-2058.1487,-162.0910,35.3203,5.0); autoskolab[playerid] = CP5; } case 5: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-2058.2043,-126.9359,35.3227,5.0); autoskolab[playerid] = CP6; } case 6: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1148.3583,1376.4371,10.5468,7.0); autoskolab[playerid] = CP7; LinkVehicleToInterior(autoskolacarb,0); SetPlayerInterior(playerid,0); SetCameraBehindPlayer(playerid); SetVehicleZAngle(autoskolacarb,149.2382); SetVehiclePos(autoskolacarb,1163.3914,1380.4377,10.5469); TogglePlayerControllable(playerid,0); SetTimerEx("AntifreezeAutoSkola", 8000, false, "i", playerid); SetTimerEx("TextDrawAutoskola", 8000, false, "i", playerid); PlayerTextDrawShow(playerid, autoskolab1[playerid]); PlayerTextDrawShow(playerid, autoskolab2[playerid]); PlayerTextDrawShow(playerid, autoskolab3[playerid]); PlayerTextDrawShow(playerid, autoskolab4[playerid]); PlayerTextDrawShow(playerid, autoskolab5[playerid]); PlayerTextDrawShow(playerid, autoskolab6[playerid]); PlayerTextDrawShow(playerid, autoskolab7[playerid]); PlayerTextDrawShow(playerid, autoskolab8[playerid]); PlayerTextDrawShow(playerid, autoskolab9[playerid]); PlayerTextDrawShow(playerid, autoskolab10[playerid]); PlayerTextDrawShow(playerid, autoskolab11[playerid]); } case 7: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1103.7428,1376.0496,10.5468,5.0); autoskolab[playerid] = CP8; } case 8: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1007.2051,1382.1805,10.5751,7.0); autoskolab[playerid] = CP9; } case 9: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1006.8726,1716.1813,10.6523,7.0); autoskolab[playerid] = CP10; } case 10: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1007.9291,1810.5002,10.7037,7.0); autoskolab[playerid] = CP11; } case 11: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1224.1656,1813.0670,13.6591,7.0); autoskolab[playerid] = CP12; } case 12: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1272.4874,1743.7592,9.0676,7.0); autoskolab[playerid] = CP13; } case 13: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1217.2009,1442.5193,6.5797,7.0); autoskolab[playerid] = CP14; } case 14: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1174.1589,1376.4054,10.6933,7.0); autoskolab[playerid] = CP15; } case 15: { if(autoskolab[playerid]) PlayerInfo[playerid][pVodickyB]++; SetPlayerVirtualWorld(playerid, 0); DisablePlayerCheckpoint(playerid); SetPlayerPos(playerid, 1170.7604,1353.1532,10.9219); SetPlayerFacingAngle(playerid, 89.9102); SetPlayerInterior(playerid, 0); SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid,0); SetTimerEx("AntifreezeAutoSkola", 5000, false, "i", playerid); SetTimerEx("TextDrawAutoskola", 5000, false, "i", playerid); PlayerTextDrawShow(playerid, akotskolabkonec0[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec1[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec2[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec3[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec4[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec5[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec6[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec7[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec8[playerid]); PlayerTextDrawShow(playerid, akotskolabkonec9[playerid]); } } switch(autoskolac[playerid]) { case 16: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1142.7788,1264.6090,11.4266,5.0); autoskolac[playerid] = CCP1; } case 17: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1125.2251,1232.4261,11.4270,5.0); autoskolac[playerid] = CCP2; } case 18: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1111.6285,1258.4397,11.4275,5.0); autoskolac[playerid] = CCP3; } case 19: { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,1110.7295,1299.6412,11.4267,5.0); autoskolac[playerid] = CCP4; } } return 1; } a dialog.... if (dialogid == DIALOG_AUTOSKOLA) { if(!response) // If they clicked 'Select' or double-clicked a weapon { SetPlayerPos(playerid,1170.7604,1353.1532,10.9219); return 1; } switch (listitem) { case 0: { if (PlayerInfo[playerid][pVodickyB] == 1) { SetTimerEx("preukazy", 5000, false, "i", playerid); PlayerTextDrawShow(playerid, preukazvlastni1[playerid]); PlayerTextDrawShow(playerid, preukazvlastni[playerid]); SetPlayerPos(playerid,1170.7604,1353.1532,10.9219); } else if(GetPlayerMoney(playerid) < 9999) { SetTimerEx("Nedostatokpenazi", 5000, false, "i", playerid); PlayerTextDrawShow(playerid, nedostatokpenazi[playerid]); PlayerTextDrawShow(playerid, nedostatokpenazi1[playerid]); SetPlayerPos(playerid,1170.7604,1353.1532,10.9219); } else //když splňuje podmínky { GivePlayerMoney(playerid,-10000); //vezmem mu peníze autoskolab[playerid] = 2; autoskolacarb = CreateVehicle(565, -2042.4133,-112.9670,35.2057,179.9765, random(100), random(100), 1000); //vytvoříme vozidlo (ID) a souřdnice kde se spawne PutPlayerInVehicle(playerid, autoskolacarb,0); SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 10); SetPlayerVirtualWorld(playerid, 10); SetPlayerCheckpoint(playerid,-2037.4709,-127.8062,35.2436,7.0); TogglePlayerControllable(playerid,0); SetTimerEx("AntifreezeAutoSkola", 8000, false, "i", playerid); //textdrawsautoskolaCVICISKO SetTimerEx("TextDrawAutoskola", 8000, false, "i", playerid); PlayerTextDrawShow(playerid, autoskola1[playerid]); PlayerTextDrawShow(playerid, autoskola2[playerid]); PlayerTextDrawShow(playerid, autoskola3[playerid]); PlayerTextDrawShow(playerid, autoskola4[playerid]); PlayerTextDrawShow(playerid, autoskola5[playerid]); PlayerTextDrawShow(playerid, autoskola6[playerid]); PlayerTextDrawShow(playerid, autoskola7[playerid]); PlayerTextDrawShow(playerid, autoskola8[playerid]); PlayerTextDrawShow(playerid, autoskola9[playerid]); PlayerTextDrawShow(playerid, autoskola10[playerid]); PlayerTextDrawShow(playerid, autoskola11[playerid]) } } case 1: { if (PlayerInfo[playerid][pVodickyC] == 1) { SetTimerEx("preukazy", 5000, false, "i", playerid); PlayerTextDrawShow(playerid, preukazvlastni1[playerid]); PlayerTextDrawShow(playerid, preukazvlastni[playerid]); SetPlayerPos(playerid,1170.7604,1353.1532,10.9219); } else if(GetPlayerMoney(playerid) < 9999) { SetTimerEx("Nedostatokpenazi", 5000, false, "i", playerid); PlayerTextDrawShow(playerid, nedostatokpenazi[playerid]); PlayerTextDrawShow(playerid, nedostatokpenazi1[playerid]); SetPlayerPos(playerid,1170.7604,1353.1532,10.9219); } else //když splňuje podmínky { GivePlayerMoney(playerid,-10000); //vezmem mu peníze autoskolac[playerid] = 16; autoskolacarc = CreateVehicle(403, 1139.6000000,1342.1000000,11.5000000,180.0000000, random(100), random(100), 1000); autoskolacarcnaves = CreateVehicle(435, 1139.6000000,1351.0000000,11.5000000,180.0000000, random(100), random(100), 1000); AttachTrailerToVehicle(autoskolacarcnaves, autoskolacarc); PutPlayerInVehicle(playerid, autoskolacarc,0); SetPlayerCheckpoint(playerid,1142.4054,1314.2500,11.4265,5.0); } } case 2: { } } } return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText. }  
  • Nejlepší reputace

  • Statistiky

    • Celkem témat
      33.2k
    • Celkem příspěvků
      325k
  • Pupulární tagy

×
×
  • Create New...