Ok so I'm setting up custom spawns, I only have 3 at the moment so I could do some testing but players are spawning in random directions which I had a feeling would happen. Is there a way that I can include viewpos to the coordinates? my code is below
Code:
terminalspawn()
{
if(getDvar("mapname") == "mp_terminal")
{
if(self.team == "allies")
{
{
self.spawnLocations = [];
self.spawnLocations[0] = (-310.8, 4853.7, 253.1);
self.spawnLocations[1] = (-56.7, 4866.4, 253.1);
self.spawnLocations[2] = (-57.3, 5383.9, 253.1);
self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
}
}
else if(self.team == "axis")
{
{
self.spawnLocations = [];
self.spawnLocations[0] = ( 2254.7, 4485.5, 252.1);
self.spawnLocations[1] = ( 1944.4, 5035.9, 252.1);
self.spawnLocations[2] = ( 2307.0, 4731.8, 252.1);
self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
}
}
}
}