22.01.2014, 18:03
How to make Random Spawns ??
Код:
public OnPlayerSpawn(playerid) {
public OnPlayerSpawn(playerid) {
new Float:CopSpawn[][18] =
{
{1585.852661, -1684.627441, 6.225196, 269.585113},
{1586.231811, -1688.123779, 6.218750, 269.585113},
{1586.084960, -1691.770141, 6.218750, 269.585113},
{1583.049438, -1695.159179, 6.218750, 175.607589},
{1579.792602, -1694.699340, 6.218750, 175.607589},
{1576.519897, -1694.912353, 6.218750, 175.607589},
{1571.003173, -1692.305419, 5.890625, 177.800994},
{1568.185546, -1692.626831, 5.890625, 177.800994},
{1565.135131, -1692.907470, 5.890625, 177.800994},
{1561.285400, -1692.363647, 5.890625, 177.800994},
{1558.060424, -1692.505859, 5.896991, 177.800994},
{1552.152832, -1694.431640, 6.218750, 232.634796},
{1554.602050, -1711.158325, 6.218750, 356.402618},
{1551.307617, -1708.406494, 6.218750, 356.402618},
{1527.090209, -1675.670776, 5.890625, 268.981872},
{1527.365234, -1677.959106, 5.890625, 268.981872},
{1527.192382, -1680.603637, 5.890625, 268.981872},
{1530.806884, -1670.854492, 6.218750, 216.027984}
}
public OnPlayerSpawn(playerid)
{
new rnd = random(18);
SetPlayerPos(playerid,CopSpawn[rnd][0],CopSpawn[rnd][1],CopSpawn[rnd][2]);
return 1;
}