Array problem
#1

Код:
#define PICKUPS_NUMBER 5
#define MAX_LS_LOCATIONS 60
new LSObjectLocationsPickUp[MAX_PLAYERS_VAR][PICKUPS_NUMBER];

new Float:LSObjectLocations[MAX_LS_LOCATIONS][3] = {
	{2689.9155,-1698.7030,9.9737},
	{2218.4771,-1164.4073,25.2973},
...
	{2245.4922,-1318.1755,23.9844}
}
I have array like this with 60 different locations.

How can I create a function, that randomly chooses only 5 out of those 60 locations without repeating any on them and then create pickups on those 5 locations?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)