Код:
new Float:RandomSpawn[][4] =
{
// Positions, (X, Y, Z and Facing Angle)
{-205.7703,-119.6655,2.4094,342.0546},
{-202.1386,-54.1213,2.4111,95.6799},
{-197.2334,7.5293,2.4034,16.0852},
{-135.7348,61.7265,2.4112,354.3534},
{-73.7883,73.4238,2.4082,260.5399},
{-6.9850,27.9988,2.4112,201.7691},
{0.6782,-16.0898,2.4076,161.7720},
{-46.3365,-88.3937,2.4092,180.7382},
{-72.4389,-127.2939,2.4107,113.5616},
{-128.1940,-144.1725,2.4094,78.9676},
{-266.0189,-50.6718,2.4125,223.8079},
{-244.2617,-1.0468,2.1038,257.3333},
{-93.3146,-32.4889,2.4085,186.0631},
{-130.7054,-93.4983,2.4124,73.8375},
{-117.4049,4.2989,2.4112,337.1284},
{-26.1622,135.8739,2.4094,248.1580},
{45.5705,86.7586,2.0753,147.3342},
{54.9881,2.2997,1.1132,95.7173},
{-248.9905,-119.3982,2.4083,303.7859},
{-60.1321,55.5239,2.4038,325.2209},
{-60.9184,47.9302,5.7706,342.8299},
{-70.0303,-22.0071,2.4113,165.2789},
{-138.3093,-83.2640,2.4152,4.0455},
{-25.5989,94.6100,2.4041,150.8322},
{-161.0327,-70.5945,2.4042,142.9221},
{1958.3783,1343.1572,15.3746},
{2199.6531,1393.3678,10.8203},
{2483.5977,1222.0825,10.8203},
{2637.2712,1129.2743,11.1797},
{2000.0106,1521.1111,17.0625},
{2024.8190,1917.9425,12.3386},
{2261.9048,2035.9547,10.8203},
{2262.0986,2398.6572,10.8203},
{2244.2566,2523.7280,10.8203},
{2335.3228,2786.4478,10.8203},
{2150.0186,2734.2297,11.1763},
{2158.0811,2797.5488,10.8203},
{1969.8301,2722.8564,10.8203},
{1652.0555,2709.4072,10.8265},
{1564.0052,2756.9463,10.8203},
{1271.5452,2554.0227,10.8203},
{1441.5894,2567.9099,10.8203},
{1480.6473,2213.5718,11.0234},
{1400.5906,2225.6960,11.0234},
{1598.8419,2221.5676,11.0625},
{1318.7759,1251.3580,10.8203},
{1558.0731,1007.8292,10.8125},
{1705.2347,1025.6808,10.8203},
{-54.8308,-139.6148,2.4119,258.7639}
};
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(RandomSpawn));
// SetPlayerPos to the random spawn data
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
// SetPlayerFacingAngle to the random facing angle data
SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);