17.08.2012, 23:53
This will help u:
pawn Код:
new Float:RandomSpawn[][10] =//10 is count the random spawns+1
{
// Positions, (X, Y, Z and Facing Angle)
{-1960.8276,-854.2136,32.2188,182.3284}, // Randomspawn 1
{-2043.7568,-39.8849,35.4227,357.6480}, // Randomspawn 2
{-2269.7905,220.2377,35.3153,174.5811}, // Randomspawn 3
{-2649.6274,16.6343,6.1328,4.0869}, // Randomspawn 4
{-2548.9504,814.3687,49.9844,189.6447}, // Randomspawn 5
{-2655.3545,1348.3672,7.0954,285.7137}, // Randomspawn 6
{-1843.6552,1087.6333,46.0781,355.9009}, // Randomspawn 7
{-1717.4703,397.4977,7.1797,230.0023}, // Randomspawn 8
{-2536.6614,2289.7332,4.9844,154.8162} // Randomspawn 9
}
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]);
return 1;
};