Thanks for the comments.
pawn Code:
new Float:tp_coords[6][3] =
{
{ 1977.0000, 1446.4529, 157.7731 },
{ 1965.0000, 1446.4529, 157.7731 },
{ 1953.0000, 1446.4529, 157.7731 },
{ 1941.0000, 1446.4529, 157.7731 },
{ 1929.0000, 1446.4529, 157.7731 },
{ 1917.0000, 1446.4529, 157.7731 }
};
new Float:inf_coords[8][3] =
{
{ 1987.5000, 1416.3500, 152.5000 },
{ 1979.3000, 1416.3500, 152.5000 },
{ 1987.5000, 1421.3500, 152.5000 },
{ 1979.3000, 1421.3500, 152.5000 },
{ 1979.3000, 1475.8000, 152.5000 },
{ 1987.5000, 1475.8000, 152.5000 },
{ 1979.3000, 1470.8000, 152.5000 },
{ 1987.5000, 1470.8000, 152.5000 }
};
new inf[sizeof inf_coords];
new Float:nrg_coords[12][3] =
{
{ 1989.0000, 1428.7242, 152.2400 },
{ 1984.0000, 1428.6825, 152.2400 },
{ 1978.0000, 1428.6825, 152.2400 },
{ 1989.0000, 1426.7242, 152.2400 },
{ 1984.0000, 1426.6825, 152.2400 },
{ 1978.0000, 1426.6825, 152.2400 },
{ 1989.0000, 1463.9889, 152.2400 },
{ 1984.0000, 1463.9889, 152.2400 },
{ 1978.0000, 1463.9889, 152.2400 },
{ 1989.0000, 1465.9889, 152.2400 },
{ 1984.0000, 1465.9889, 152.2400 },
{ 1978.0000, 1465.9889, 152.2400 }
};
new nrg[sizeof nrg_coords];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/teleportmetothemothership", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
new pos = random(sizeof tp_coords);
new veh = GetPlayerVehicleID(playerid);
SetVehiclePos(veh, tp_coords[pos][0], tp_coords[pos][1], tp_coords[pos][2]);
}
else
{
new pos = random(sizeof inf_coords);
SetPlayerPos(playerid, inf_coords[pos][0], inf_coords[pos][1], inf_coords[pos][2]);
}
return 1;
}
return 0;
}
public OnFilterScriptInit()
{
for( new i; i < sizeof inf_coords; i++)
{
inf[i] = CreateVehicle(411, inf_coords[i][0], inf_coords[i][1], inf_coords[i][2], 90.0, -1, -1, 10); // infernus
AddVehicleComponent(inf[i], 1010);
}
for( new i; i < sizeof nrg_coords; i++)
{
nrg[i] = CreateVehicle(522, nrg_coords[i][0], nrg_coords[i][1], nrg_coords[i][2], 90.0, -1, -1, 10); // nrg
}
return 1;
}
public OnFilterScriptExit()
{
for( new i; i < MAX_OBJECTS; i++) //Here we will destroy every single object, including those that aren't even in this map :)
{
DestroyObject(i);
}
for( new i; i < sizeof inf_coords; i++)
{
DestroyVehicle(inf[i]);
}
for( new i; i < sizeof nrg_coords; i++)
{
DestroyVehicle(nrg[i]);
}
return 1;
}