19.02.2009, 23:46
THanks for the reply.
This works partly.
I put it in like this..
The only problem is when there are more than 4 players requesting one of the random spawns, it doesnt work. they dont spawn anywhere. Instead they stay where they are.
This works partly.
I put it in like this..
pawn Code:
stock SpawnPlayerInMinigun(playerid)
{
const MAX_POSITIONS = 12;
static Float:Minigunspawns[MAX_POSITIONS][4] =
{
{2606.2012,2725.6223,23.8222,13.2314},{2590.4138,2719.8047,10.8203,180.1702},
{2619.6592,2708.9177,25.8222,195.3502},{2591.0515,2800.7275,10.8203,89.1443},
{2592.0317,2724.0625,10.9844,39.3620},{2653.7820,2723.7656,19.3222,287.7489},
{2542.4048,2807.4819,10.8203,329.6895},{2618.5669,2721.3716,36.5386,80.9590},
{2648.2996,2731.5466,10.8203,307.8025},{2556.0271,2710.1548,10.9844,56.4777},
{2626.6411,2840.9756,10.8203,70.1659},{2595.8225,2800.8164,10.8203,270.0378}
}, bool:taken[MAX_POSITIONS];
new freePos;
for(; freePos < MAX_POSITIONS; freePos++)
if(!taken[freePos]) break;
if(freePos == MAX_POSITIONS) return; //no free positions left
SetPlayerPos(playerid, Minigunspawns[freePos][0], Minigunspawns[freePos][1], Minigunspawns[freePos][2]);
SetPlayerFacingAngle(playerid, Minigunspawns[freePos][3]);
taken[freePos] = true;
}