detecting map
#1

so i was playing around and i was trying to get the script to know what map is going to be loaded now


so i've done this

Код:
public StartNewMap()
{

   for(new i = 0; i < MAX_PLAYERS; i++) {
		SpawnPlayer(i);


		if(gMapSpawns1 == 1) {
		
		   SendClientMessage(i, -1, "{FFFF99}[SERVER]: The map has been changed! (Map: Los Santos)");
		}
		else if(gMapSpawns2 == 1) {

		   SendClientMessage(i, -1, "{FFFF99}[SERVER]: The map has been changed! (Map: Bayside)");
		}
		else if(gMapSpawns3 == 1) {

		   SendClientMessage(i, -1, "{FFFF99}[SERVER]: The map has been changed! (Map: Las Payasdas)");
		}
  }

   return 1;
}
Код:
new Float:gMapSpawns1[][]= { // Los Santos
{2161.4529,-1639.9576,14.2731},
{2250.9717,-1650.3555,15.4772},
{2245.1152,-1704.1963,22.8594},
{2317.3740,-1748.8496,13.3822},
{2352.1912,-1673.8510,13.5314},
{2427.8057,-1612.1277,26.6325},
{2513.1516,-1659.7305,13.6431},
{2522.6194,-1752.0939,13.5469},
{2463.5796,-1794.1737,13.6728}
};

new Float:gMapSpawns2[][]= { // Bayside
{-2237.6675,2353.6357,4.9804},
{-2244.4297,2382.6162,5.0651},
{-2280.8123,2288.3540,4.9592},
{-2349.1038,2422.4600,7.3348},
{-2379.6294,2443.7397,10.1694},
{-2386.5432,2446.7439,10.1694},
{-2408.1724,2454.0754,13.0031}, 
{-2472.1128,2450.4846,17.3230}, 
{-2479.6860,2449.3577,17.3230}, 
{-2422.2366,2492.0024,13.1417},
{-2446.1724,2491.9753,15.3203}
};

new Float:gMapSpawns3[][]= { // Las payasdas
{-150.0970,2688.6575,62.4297}, // 1
{-169.3251,2707.1938,62.5284}, // 2
{-160.7115,2727.9463,62.1849}, // 3
{-156.2372,2758.1042,62.6473}, // 4
{-164.8217,2768.1755,62.6875}, // 5
{-201.7420,2772.7991,62.1883}, // 6
{-219.7275,2766.4863,62.6875}, // 7
{-233.2206,2807.5701,62.0547}, // 8
{-257.9517,2781.7542,62.6875}, // 9
{-269.4338,2769.4917,61.8506}, // 10
{-286.9100,2758.0896,62.5121}, // 11
{-275.2169,2735.6252,62.7543}, // 12
{-279.3707,2722.6626,62.4894}, // 13
{-310.2263,2726.7783,62.6875}, // 14
{-322.9379,2675.7722,63.6797}, // 15
{-300.5310,2659.4617,62.7915}, // 16
{-284.7141,2656.4978,62.7125}, // 17
{-288.9666,2691.4153,62.6875}, // 18
{-271.5916,2692.3357,62.6875}, // 19
{-242.9563,2710.5710,62.6875}, // 20
{-235.9050,2710.7034,62.9766}, // 21
{-227.4022,2710.5737,62.9766}, // 22
{-219.3902,2710.8257,62.9766}, // 23
{-208.2178,2712.3406,62.9794}, // 24
{-254.4105,2603.3188,62.8582} // 25
};
but im getting errors

Код:
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(161) : error 033: array must be indexed (variable "gMapSpawns1")
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(165) : error 033: array must be indexed (variable "gMapSpawns2")
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(169) : error 033: array must be indexed (variable "gMapSpawns3")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply


Messages In This Thread
detecting map - by ivndosos - 30.03.2018, 09:17
Re: detecting map - by Staark - 30.03.2018, 09:50
Re: detecting map - by AdamsLT - 30.03.2018, 09:51
Re: detecting map - by ivndosos - 30.03.2018, 10:24
Re: detecting map - by AdamsLT - 30.03.2018, 10:35
Re: detecting map - by ivndosos - 30.03.2018, 10:53

Forum Jump:


Users browsing this thread: 1 Guest(s)