28.03.2018, 17:30
Try this
PHP код:
enum MapInfo
{
Float:XPOS,
Float:YPOS,
Float:ZPOS
};
new Float:gMapSpawns1[][MapInfo] =
{
//Coords
{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}
};
public OnPlayerSpawn(playerid)
{
switch( MapChange )
{
case 0:
{
new gMap1 = random( sizeof ( gMapSpawns1 ));
SetPlayerPos(playerid, gMapSpawns1[gMap1][XPOS], gMapSpawns1[gMap1][YPOS], gMapSpawns1[gMap1][ZPOS]);
SetPlayerFacingAngle(playerid, gMapSpawns1[randombag][ZPOS]);
}
}
return 1;
}