Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Spawn on predefined points problem
#1
Hi its me again, i know i know sorry .
i have some problem with that code:

Code:
SetupSpawn()
{
if(getDvar("mapname") == "mp_favela"){
self thread dofavela();
    }
}

dofavela()
{

level.spawn[0] = (-649, 207, 144);
level.spawn[1] = (-726, 340, 144);
level.spawn[2] = (-735, 176, 149);

    level.axispawn[0] = (-1051, 2945, 282);
    level.axispawn[1] =  (-971, 2950, 282);
    level.axispawn[2] =  (-862, 2648, 288);
    level.axispawn[3] = (-963,2612, 281);
    level.axispawn[4] =  (-1105, 2655, 281);
  
  
    wait .05;
    if(self.team == "allies")
        self setOrigin(level.spawn[RandomInt(level.spawn.size)]);
    else if(self.team == "axis")
        self setOrigin(level.axispawn[RandomInt(level.axispawn.size)]);
    
}

i added self thread SetupSpawn(); to onjoinedteam and it works fine and spawn me at my own coordinates but only after 1st round (its Search and destroy). First round we allways spawn at the defoult points.

i tryed to ad self thread SetupSpawn(); to init, to onplayerconnect, and to onplayerspawned. nothing changed. on some of them code doesnt works at all on some - its works after 1st round.
any ideas please?
Thank you for attention.
Reply

#2
Are you sure you added this code after "waittill( "spawned_player" );" in the OnPlayerSpawned function?

Uploading your whole code might help
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#3
(09-29-2012, 20:55)iAegle Wrote: Are you sure you added this code after "waittill( "spawned_player" );" in the OnPlayerSpawned function?

Uploading your whole code might help

i did it a bit difference. thank you so much, now it works Smile
all my mods started from 2nd round now everything gonna be ok Smile
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Android problem Yamato 12 8,185 04-25-2014, 04:49
Last Post: ScHmIdTy56789
  [Request] Health and Points on hud source robinvm 7 5,594 10-27-2013, 08:23
Last Post: robinvm
  Problem with Rain Effects on Maps mitchhacker 5 4,862 10-22-2013, 00:46
Last Post: mitchhacker
Exclamation [Request] Random Weapon At Spawn Scripts18 3 4,739 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Liberation Problem Yamato 27 24,953 07-17-2013, 19:54
Last Post: feature
  Help Spawn Message Playing on Respawn? Killjoy 7 5,233 07-11-2013, 14:53
Last Post: Killjoy
  [xna 4]Rendering problem narkos 9 5,946 07-03-2013, 19:00
Last Post: Nekochan
  Help Problem God plugin v4.0 4nonymous 1 2,729 06-22-2013, 23:25
Last Post: 8q4s8
  [Release] Spawn Polygons and Pyramids Yamato 6 4,614 06-20-2013, 12:30
Last Post: Yamato
  Question on how to "Spawn" a flying rocket as a player? akillj 8 5,543 06-04-2013, 01:54
Last Post: rotceh_dnih

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.