02.08.2014, 05:50
sure
top
#include <streamer>
new Checkpoint [MAX_PLAYERS];
under OnPlayerSpawn
also, there's no errors or loose indentations
top
#include <streamer>
new Checkpoint [MAX_PLAYERS];
under OnPlayerSpawn
Код:
Checkpoint[0] = CreateDynamicCP(-2112.7422,-753.4459,32.1719, 2, -1, -1, -1, 10); // Enter Store // Checkpoint[1] = CreateDynamicCP(-2112.7422,-753.4459,32.1719, 2, -1, -1, -1, 10); // Exit Store // Checkpoint[2] = CreateDynamicCP(295.7549,-38.3972,1001.5156, 2, -1, 1, -1, 10); // Ammunation Dialog Market // Checkpoint[3] = CreateDynamicCP(1939.9860,-1771.2769,13.3906, 2, -1, 0, -1, 10); // Petrol Idlewood // Checkpoint[4] = CreateDynamicCP(1685.8761,-2335.4973,13.5469, 2, -1, 0, -1, 10); // Airways Entrance // Checkpoint[5] = CreateDynamicCP(315.7267,1026.2152,1949.4008, 2, -1, 9, -1, 10); // Skydive Dialog // Checkpoint[6] = CreateDynamicCP(315.8065,972.7241,1961.7169, 2, -1, 9, -1, 10); // Airways Exit // Checkpoint[7] = CreateDynamicCP(2027.6025,-1406.3354,17.2111, 2, -1, 0, -1, 10); // Hospital Jefferson // Checkpoint[8] = CreateDynamicCP(1172.0770,-1323.4292,15.4032, 2, -1, 0, -1, 10); // Hospital Market // Checkpoint[9] = CreateDynamicCP(1001.0299,-935.4196,42.1797, 2, -1, 0, -1, 10); // Petrol Mulholland // Checkpoint[10] = CreateDynamicCP(657.5551,-570.3030,16.3359, 2, -1, 0, -1, 10); // Petrol Dillimore // Checkpoint[11] = CreateDynamicCP(1383.7936,460.8412,20.0972, 2, -1, 0, -1, 10); // Petrol Montgomery // Checkpoint[12] = CreateDynamicCP(-30.2348,-55.6318,1003.5469, 2, -1, 6, -1, 10); // 24/7 Commerce Dialog // Checkpoint[13] = CreateDynamicCP(1368.6726,-1279.0184,13.5469, 1, -1, 0, -1, 10); // Ammunation Market Enter // Checkpoint[14] = CreateDynamicCP(285.4913,-41.8041,1001.5156, 1, -1, 1, -1, 10); // Ammunation Market Exit // Checkpoint[15] = CreateDynamicCP(1555.0160,-1675.0308,16.1953, 1, -1, 0, -1, 10); // LSPD Enter // Checkpoint[16] = CreateDynamicCP(246.8640,62.3215,1003.6406, 1, -1, 6, -1, 10); // LSPD Exit // Checkpoint[17] = CreateDynamicCP(1352.2979,-1759.2493,13.5078, 1, -1, 0, -1, 10); // 24 7 Commerce Enter // Checkpoint[18] = CreateDynamicCP(-26.6681,-58.2642,1003.5469, 1, -1, 6, -1, 10); // 24 7 Commerce Exit // Checkpoint[19] = CreateDynamicCP(2400.3748,-1981.9937,13.5469, 1, -1, 0, -1, 10); // Ammunation Willowfield Enter // Checkpoint[20] = CreateDynamicCP(296.8109,-112.0679,1001.5156, 1, -1, 6, -1, 10); // Ammunation Willowfield Exit // Checkpoint[21] = CreateDynamicCP(290.1359,-109.7811,1001.5156, 1, -1, 6, -1, 10); // Ammunation Willowfield Dialog // Checkpoint[22] = CreateDynamicCP(1837.0398,-1682.3647,13.3228, 1, -1, 0, -1, 10); // Alhambra Enter // Checkpoint[23] = CreateDynamicCP(493.5882,-24.9520,1000.6719, 1, -1, 17, -1, 10); // Alhambra Exit //
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid) { if(checkpointid == Checkpoint[0]) // Enter Store { SetPlayerPos(playerid, 100, 100, 100); SetPlayerInterior(playerid, 1); } if(checkpointid == Checkpoint[1]) // Exit Store { SetPlayerPos(playerid, 100, 100, 100); SetPlayerInterior(playerid, 0); } if(checkpointid == Checkpoint[2]) // Ammunation Dialog Market { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Ammunation Menu", "Baseball Bat\t\t$100\nSawn-Off Shotgun\t$2000\nCombat Shotgun\t$1000\nM4\t\t\t$2000\nMP5\t\t\t$1500\nAK-47\t\t\t$1500\nSniper Rifle\t\t$1500\nTec-9\t\t\t$1000\nArmour\t\t\t$500", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[3]) // Petrol Dialog Idlewood { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Petrol Station Menu", "Repair Vehicle\nAdd Nitrous\nMolotovs\t$1000", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[4]) // Airways LS Marker { switch(GetPlayerMoney(playerid) <1000) { case 1: { SendClientMessage(playerid, -1, "A Minimum of $1000 is Required to Travel."); } default: { SetPlayerPos(playerid, 315.7090,983.4100,1959.2788); SetPlayerFacingAngle(playerid, 180); SetPlayerInterior(playerid, 9); SendClientMessage(playerid, -1, "Welcome to OzzieCoq Airways."); } } } if(checkpointid == Checkpoint[5]) // Skydive Dialog { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Skydive Menu", "Angel Pine\t\t$1000\nBayside\t\t$1000\nBlueberry\t\t$1000\nFort Carson\t\t$1000\nMontgomery\t\t$1000\nPalomino\t\t$1000\nVerdant Meadows\t$1000", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[6]) // Airways Exit { SetPlayerPos(playerid, 1685.8247,-2330.1519,13.5469); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, -1, "You have left OzzieCoq Airways."); } if(checkpointid == Checkpoint[7]) // Hospital Menu Jefferson { ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Hospital Menu", "Heal\t\t\t\t$100\nCure STD/Snakebite\t\t$500\nAntibiotics\t\t\t$2000", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[8]) // Hospital Menu Market { ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Hospital Menu", "Heal\t\t\t\t$100\nCure STD/Snakebite\t\t$500\nAntibiotics\t\t\t$2000", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[9]) // Petrol Dialog Mullholland { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Petrol Station Menu", "Repair Vehicle\nAdd Nitrous\nMolotovs\t$1000", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[10]) // Petrol Dialog Dillimore { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Petrol Station Menu", "Repair Vehicle\nAdd Nitrous\nMolotovs\t$1000", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[11]) // Petrol Dialog Montgomery { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Petrol Station Menu", "Repair Vehicle\nAdd Nitrous\nMolotovs\t$1000", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[12]) // 24/7 Commerce Shop { ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "24/7 Shop Menu", "Cane\t\t\t$100\nChainsaw\t\t$1000\nHandgun\t\t$500\nFlowers\t\t$250\nCamera\t\t\t$500\nParachute\t\t$500\nRob the 24/7", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[13]) // Ammunation Market Enter { SetPlayerPos(playerid, 287.2228,-39.6838,1001.5156); SetPlayerInterior(playerid, 1); } if(checkpointid == Checkpoint[14]) // Ammunation Market Exit { SetPlayerPos(playerid, 1365.3500,-1279.0601,13.5469); SetPlayerInterior(playerid, 0); } if(checkpointid == Checkpoint[15]) // LSPD Enter { SetPlayerPos(playerid, 246.7840,63.9002,1003.6406); SetPlayerInterior(playerid, 6); } if(checkpointid == Checkpoint[16]) // LSPD Exit { SetPlayerPos(playerid, 1552.4471,-1674.9868,16.1953); SetPlayerInterior(playerid, 0); } if(checkpointid == Checkpoint[17]) // LSPD Enter { SetPlayerPos(playerid, -26.6910,-55.7145,1003.5469); SetPlayerInterior(playerid, 6); } if(checkpointid == Checkpoint[18]) // LSPD Exit { SetPlayerPos(playerid, 1352.3300,-1755.7100,13.3530); SetPlayerInterior(playerid, 0); } if(checkpointid == Checkpoint[19]) // Ammunation Willowfield Enter { SetPlayerPos(playerid, 296.7698,-110.0871,1001.5156); SetPlayerInterior(playerid, 6); } if(checkpointid == Checkpoint[20]) // Ammunation Willowfield Exit { SetPlayerPos(playerid, 2400.6975,-1979.7654,13.5469); SetPlayerInterior(playerid, 0); } if(checkpointid == Checkpoint[21]) // Ammunation Dialog Market { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Ammunation Menu", "Baseball Bat\t\t$100\nSawn-Off Shotgun\t$2000\nCombat Shotgun\t$1000\nM4\t\t\t$2000\nMP5\t\t\t$1500\nAK-47\t\t\t$1500\nSniper Rifle\t\t$1500\nTec-9\t\t\t$1000\nArmour\t\t\t$500", "Select", "Exit");//Show them the dialog. } if(checkpointid == Checkpoint[22]) // Alhambra Enter { SetPlayerPos(playerid, 493.3910,-22.7228,1000.6797); SetPlayerInterior(playerid, 17); } if(checkpointid == Checkpoint[23]) // Alhambra Exit { SetPlayerPos(playerid, 1834.2383,-1682.4645,13.4399); SetPlayerInterior(playerid, 0); } }