Jump to content
  • 0

pomoc Problém s Checkpointamy ..


MrShoTys74

Dotaz

Č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.
    }

 

Link to comment
Share on other sites

8 odpovědí na tuto otázku

Recommended Posts

  • 0

Dovolil jsem si mensi optimalizaci :)

#include <a_samp>

enum e_info
{
    pVodickyB,
    pVodickyC
}
new PlayerInfo[MAX_PLAYERS][e_info];
new autoskolacarb;
new autoskolab[MAX_PLAYERS];
new autoskolac[MAX_PLAYERS];
new PlayerText:akotskolabkonec[MAX_PLAYERS][18];
new PlayerText:autoskolabtd[MAX_PLAYERS][12];
new PlayerText:autoskolatd[MAX_PLAYERS][12];
new PlayerText:preukazvlastni[MAX_PLAYERS];
new PlayerText:preukazvlastni1[MAX_PLAYERS];
new PlayerText:nedostatokpenazi[MAX_PLAYERS];
new PlayerText:nedostatokpenazi1[MAX_PLAYERS];
new autoskolacarc;
new autoskolacarcnaves;

enum
{
    DIALOG_AUTOSKOLA
}
//----------------------------------------------------------------------------//
#define CP 1
#define CCP 16

new Float:CPAutoskolaB[][] = {
	{-2047.6212,-78.2796,34.7413,5.0},
	{-2026.7949,-156.6074,35.3203,5.0},
	{-2045.3695,-173.9235,37.7754,5.0},
	{-2058.1487,-162.0910,35.3203,5.0},
	{-2058.2043,-126.9359,35.3227,5.0},
	{1148.3583,1376.4371,10.5468,7.0},
	{1103.7428,1376.0496,10.5468,5.0},
	{1007.2051,1382.1805,10.5751,7.0},
	{1006.8726,1716.1813,10.6523,7.0},
	{1007.9291,1810.5002,10.7037,7.0},
	{1224.1656,1813.0670,13.6591,7.0},
	{1272.4874,1743.7592,9.0676,7.0},
	{1217.2009,1442.5193,6.5797,7.0},
	{1174.1589,1376.4054,10.6933,7.0}
};

new Float:CPAutoskolaC[][] = {
	{1142.7788,1264.6090,11.4266,5.0},
	{1125.2251,1232.4261,11.4270,5.0},
	{1111.6285,1258.4397,11.4275,5.0},
	{1110.7295,1299.6412,11.4267,5.0}
};

public OnPlayerEnterCheckpoint(playerid)
{
	switch(autoskolab[playerid])
	{
		case CP .. CP + sizeof(CPAutoskolaB):
		{
		    if(autoskolab[playerid] >= sizeof(CPAutoskolaB))
		    {
		        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);
				for(new i;i<sizeof(akotskolabkonec[]);i++) PlayerTextDrawShow(playerid, akotskolabkonec[playerid][i]);
			}
			else
			{
				SetPlayerCheckpoint(playerid,CPAutoskolaB[autoskolab[playerid]][0],CPAutoskolaB[autoskolab[playerid]][1],CPAutoskolaB[autoskolab[playerid]][2],CPAutoskolaB[autoskolab[playerid]][3]);
		   		autoskolab[playerid]++;
		   		if(autoskolab[playerid] == 6)
			    {
					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);
					for(new i;i<sizeof(autoskolabtd[]);i++) PlayerTextDrawShow(playerid, autoskolabtd[playerid][i]);
				}
			}
		}
		case CCP .. CCP + sizeof(CPAutoskolaC):
		{
			SetPlayerCheckpoint(playerid,CPAutoskolaC[autoskolac[playerid]][0],CPAutoskolaC[autoskolac[playerid]][1],CPAutoskolaC[autoskolac[playerid]][2],CPAutoskolaC[autoskolac[playerid]][3]);
 			autoskolac[playerid]++;
		}
	}
	return 1;
}

public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
	if(dialogid == DIALOG_AUTOSKOLA)
	{
		if(!response)
		{
			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) < 10000)
				{
					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] = CP;
					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(autoskolacarb, 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);
					for(new i;i<sizeof(autoskolatd[]);i++) PlayerTextDrawShow(playerid, autoskolatd[playerid][i]);
				}
			}
			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] = CCP;
					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);
				}
			}
		}
	}
	return 1;
}

 

  • Děkuji (+1) 3
Link to comment
Share on other sites

  • 1
před 2hodinami, MrShoTys74 said:
#define CCP1 16

 

před 2hodinami, MrShoTys74 said:
case 16:
	{
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1142.7788,1264.6090,11.4266,5.0);
    autoskolac[playerid] = CCP1;
	}

tu máš chybu

  • Kappa 1
Link to comment
Share on other sites

  • 0

Namiesto case 1, 2, 3... Používaj vo switchi tie svoje definície a podobné chyby uvidíš v budúcnosti ľahšie

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

  • 0

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 :)

Edited by MrShoTys74
Link to comment
Share on other sites

  • 0

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.

  • Kappa 1
  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

  • 0
On 4. 5. 2024 at 21:54, MrShoTys74 said:

Ďakujem vemi pekne ATomasi odskúšané a funguje to velmi dobre :)

Diky za info, psal jsem to naslepo tak jsem se bal nejake chybicky :)

Edited by ATomas
  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...