Random
#1

Hello, now i go to chechpoint and i wanna to make random chehcpoints on all map, like this, when i get to ls chechkpoints, i wanna random a lv or sf, when i get to sf, i wanna lv or sf chehckponts, did this is possible ? If yes, please write exemple. Sry for bad english

Код:
new Float: ls[][] =
{
  { 2176.4348, -2301.5466, 13.5469, 10.0 },
  { 2297.7925, -2337.0667, 13.5469, 10.0  },
  { 2284.1611, -2350.3787, 13.5469, 10.0  },
  { 2755.8450, -2392.5229, 13.6285, 10.0  },
  { 2750.9282, -2432.6614, 13.6432, 10.0  },
  { 2787.8430, -2527.3252,13.6311, 10.0  }
};

new Float: lv[][] =
{
  { 2855.0972, 899.9720, 10.4711, 10.0  },
  { 2827.3425, 901.4199, 10.5921, 10.0  },
  { 2818.1404, 901.0425, 10.5606, 10.0  },
  { 2347.3894, 2747.8772, 10.8203, 10.0  },
  { 2346.9094,2770.1055, 10.8203, 10.0  },
  { 326.7607, 2538.2200, 16.8070, 10.0  },
  { 292.9708, 2540.2820, 16.8210, 10.0  },
  { -2446.0706, 2233.1648, 4.8438, 10.0  }
};

new Float: sf[][] =
{
  { -1971.0656, -2438.6025, 30.6250, 10.0  },
  { -1994.0486, -2423.0342, 30.6250, 10.0  },
  { -1885.4247, -1727.3879, 21.7564, 10.0  },
  { -1913.1434, -1718.7805, 21.7500, 10.0  },
  { -1733.9470, 190.5790, 3.5547, 10.0  },
  { -1744.7137,161.1667,3.5496, 10.0  },
  { 326.7607,2538.2200,16.8070, 10.0  },
  { 2780.1716,-2400.1199,13.6473, 10.0  }

};
Reply
#2

Los Santos
pawn Код:
new id = random(sizeof(ls));
SetPlayerChckpoint(playerid, ls[id][0], ls[id][1], ls[id][2],2.0);
San Fierro
pawn Код:
new id = random(sizeof(sf));
SetPlayerChckpoint(playerid, sf[id][0], sf[id][1], sf[id][2],2.0);
Las Venturas
pawn Код:
new id = random(sizeof(lv));
SetPlayerChckpoint(playerid, lv[id][0], lv[id][1], lv[id][2],2.0);
Try this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)