Problem with custom spawns

Posts 1–7 of 7 · Page 1 of 1
Problem with custom spawns
[php]doSpawn()
{
if(getDvar("mapname") == "mp_checkpoint")
{
if(self.team == "allies")
{
self.randomspawn = randomInt(6);
if(self.randomspawn == 0) {
self SetOrigin((-3404,-1626,424)); }
if(self.randomspawn == 1) {
self SetOrigin((-3881,-440,424)); }
if(self.randomspawn == 2) {
self SetOrigin((-2919,-466,360)); }
if(self.randomspawn == 3) {
self SetOrigin((-3237,-247,360)); }
if(self.randomspawn == 4) {
self SetOrigin((-3230,-488,632)); }
if(self.randomspawn == 5) {
self SetOrigin((-2979,-454,496)); }
}

if(self.team == "axis")
{
self.randomspawn = randomInt(6);
if(self.randomspawn == 0) {
self SetOrigin((-2564,903,584)); }
if(self.randomspawn == 1) {
self SetOrigin((-2508,851,189)); }
if(self.randomspawn == 2) {
self SetOrigin((-3121,1132,312)); }
if(self.randomspawn == 3) {
self SetOrigin((-3611,888,224)); }
if(self.randomspawn == 4) {
self SetOrigin((-3915,1007,632)); }
if(self.randomspawn == 5) {
self SetOrigin((-2849,1055,488)); }
}
}
}

onPlayerSpawned()
{
self endon("disconnect");
self waittill("spawned_player");
self thread doSpawn();
}[/php]

That's my code....
My problem is that the players do spawn exactly 1time how I want them to spawn and after they died once they spawn how they normally spawn.
How can i fix this ?
i can help u i think =D

i had the problem to
cuz i deleted :

Code:
for(;;)
Code:
onPlayerSpawned()
{
    self endon("disconnect");

{
for(;;)
    self waittill("spawned_player");
    self thread doSpawn();
}  
}
thanks if it helped =D
Edit: Got it working now... Thanks TheSaboteur

Got another problem...
The first time a player spawns he spawns at the normal coordinates, untill he died onetime he spawns how i want him to spawn every time... How can I fix this ?
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
        self thread doSpawn();
    }
}
Quote Originally Posted by master131 View Post
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
        self thread doSpawn();
    }
}
Already got that... But the first time every player spawns how they normally do, after they died once or switched the Team they spawn how I want them to spawn...

ps: How can i force change the Team?
something like
Code:
If(self.team==Allies)
{self setTeam=axis
}
(except of all the mistakes x))
Oh isn't it solved? <_>

/unsolved then <_<
put it this in onPlayerConnect()

player thread doSpawn();
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us