okay, having some trouble with spawning a player at a team specific spawnpoint. I want the player to enter the server and appear at a regular spawnpoint, then select a team from an centerprint/impulse menu, then spawn for real at a team specific spawnpoint. teamfortress i know does this. lots of ctf mods probably do too. here's how i'm doing it and its not working:
in PutClientInServer, I leave the spawn code unchanged, but set the player to MOVETYPE_NONE, SOLID_NOT, and DAMAGE_NO. I have tried lots of movetype/solid combinations, as well as setting model to "" (both ways). Also in PutClientInServer I set a timer, self.menutime to time + 3. In PlayerPreThink, I check the timer and if its been three seconds I do the centerprint, but only if self.loyal is true (loyal as in they are loyal to a side, so if they haven't picked a team its false, putclientinserver sets this false on spawn.)
In ImpulseCommands I have this code: (and everything else is commented out)
Code: Select all
if (self.loyal == FALSE)
{
if (self.impulse == 1)
{
self.team = 1;
self.loyal = TRUE;
spot = find (world, classname, "info_team1_start");
setorigin(self, spot.origin);
self.angles = spot.angles;
}
if (self.impulse == 2)
{
self.team = 2;
self.loyal = TRUE;
spot = find (world, classname, "info_team2_start");
setorigin(self, spot.origin);
self.angles = spot.angles;
}
}