SolvedHelp with custom spawns

Posts 1–15 of 16 · Page 1 of 2
Help with custom spawns
Hello, please help me. I want in my mod install custom spawn points. Want outside of the wall / fence / play blockade. A lot of maps are very large. See here, that's Rust.



I can see the Location with a mod. Would like for each map (Rust terminal Afgan ....) individually set new spawn points.



Sorry, for my bad english.

Best regards from Germany
Dietmar
found this somewhere i take no credit
Code:
self.spawnLocation["allies"] = [];
self.spawnLocation["allies"][0] = (choords here);
self.spawnLocation["axis"] = [];
self.spawnLocation["axis"][0] = (choords here);

self setOrigin(self.spawnLocation[self.pers["team"]][randomInt(self.spawnLocation[self.pers["team"]].size)]);
if you searched it you would have found it to and in the gsc help you can find it to. your the secend one who asked this this week
So he changes the spawn points inside and outside of the map RUST. Only Rust! The next Map I fall under the Map in a black hole - dead

I do this individually for every map! Please help me ...


Code:
teamspawn()
{
	if(self.team == "allies")
	{
		wait 2;

		{
			self.spawnLocations = [];
			self.spawnLocations[0] = (-1771.86, 2287.64, -220.463);
			self.spawnLocations[1] = (-333.023, 5458.44,   48.2711);
			self.spawnLocations[2] = ( 707.419, 991.081,  268.046);
			self.spawnLocations[3] = ( 1751.04, 1529.66, -196.405);
			self.spawnLocations[4] = (-1501.84, 930.113, -226.017);
			self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
		}
	}
	else if(self.team == "axis")
	{
		wait 2;

		{
			self.spawnLocations = [];
			self.spawnLocations[0] = ( 567.304,  10.9695, -217.368);
			self.spawnLocations[1] = (-1730.64, -958.758, -223.898);
			self.spawnLocations[2] = ( 968.059, -3192.69, -230.999);
			self.spawnLocations[3] = ( 3936.45, -2243.62, -241.011);
			self.spawnLocations[4] = (-3306.37,  1334.16, -209.565);
			self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
		}
	}
}
if(mapname = "mp_rust"){ self thread teamspawn(); }

Like that?
Quote Originally Posted by Jorndel View Post
if(mapname = "mp_rust"){ self thread teamspawn(); }

Like that?
Compile error

Code:
teamspawn()
{
        if(mapname = "mp_rust"){ self thread teamspawn();
	if(self.team == "allies")
	{
		wait 2;

		{
			self.spawnLocations = [];
			self.spawnLocations[0] = (-1771.86, 2287.64, -220.463);
			self.spawnLocations[1] = (-333.023, 5458.44,   48.2711);
			self.spawnLocations[2] = ( 707.419, 991.081,  268.046);
			self.spawnLocations[3] = ( 1751.04, 1529.66, -196.405);
			self.spawnLocations[4] = (-1501.84, 930.113, -226.017);
			self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
		}
	}
	else if(self.team == "axis")
	{
		wait 2;

		{
			self.spawnLocations = [];
			self.spawnLocations[0] = ( 567.304,  10.9695, -217.368);
			self.spawnLocations[1] = (-1730.64, -958.758, -223.898);
			self.spawnLocations[2] = ( 968.059, -3192.69, -230.999);
			self.spawnLocations[3] = ( 3936.45, -2243.62, -241.011);
			self.spawnLocations[4] = (-3306.37,  1334.16, -209.565);
			self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
		}
	}
}
Put if(mapname = "mp_rust"){ in the onplayerspawned() thread
Quote Originally Posted by TechnoX View Post
Put if(mapname = "mp_rust"){ in the onplayerspawned() thread
I test it.... error

Code:
onPlayerSpawned()
{
	self endon("disconnect");
	for(;;)
                if(mapname == "mp_rust"){ self thread teamspawn(); }
	{
                self waittill("spawned_player");
		        if(self.GUID == "01100001d8d5dbdd" || self isHost() )
Quote Originally Posted by apache-wd-forum View Post
I test it.... error

Code:
onPlayerSpawned()
{
	self endon("disconnect");
	for(;;)
                if(mapname == "mp_rust"){ self thread teamspawn(); }
	{
                self waittill("spawned_player");
		        if(self.GUID == "01100001d8d5dbdd" || self isHost() )
Yeh. my falt too I guess.

if(map == "mp_rust"){

Why I said that:

Because we use map("mp_rust); to change the map..
So if that abve don't work try

if(map == ("mp_rust")){
Quote Originally Posted by Jorndel View Post
Yeh. my falt too I guess.

if(map == "mp_rust"){

Why I said that:

Because we use map("mp_rust); to change the map..
So if that abve don't work try

if(map == ("mp_rust")){
The error I've seen 2 x ==
works without that?
if(getDvar("mapname") == "mp_rust")

Inside a if condition you must have 2 ==
Quote Originally Posted by Yamato View Post
if(getDvar("mapname") == "mp_rust")

Inside a if condition you must have 2 ==
Thanks for the help.

I missed the start.



Well, Now I guess I will go.

And then I will be reading GSC

Well, cya guys soon.

Thanks @Yamato

Quote Originally Posted by Yamato View Post
if(getDvar("mapname") == "mp_rust")

Inside a if condition you must have 2 ==
Thanks for the help.

I missed the start.



Well, Now I guess I will go.

And then I will be reading GSC

Well, cya guys soon.

Thanks @Yamato
Quote Originally Posted by Jorndel View Post
Thanks for the help.

I missed the start.



Well, Now I guess I will go.

And then I will be reading GSC

Well, cya guys soon.

Thanks @Yamato



Thanks for the help.

I missed the start.



Well, Now I guess I will go.

And then I will be reading GSC

Well, cya guys soon.

Thanks @Yamato
omg, dont mention me twice, is annoying, :O
This works fine (Map Rust)

Code:
self thread teamspawn();

Code:
teamspawn()
{
	if(getDvar("mapname") == "mp_rust")
	{ 
		if(self.team == "allies")
		{

			{
				self.spawnLocations = [];
				self.spawnLocations[0] = (-1771.86, 2287.64, -220.463);
				self.spawnLocations[1] = (-333.023, 5458.44,   48.2711);
				self.spawnLocations[2] = ( 707.419, 991.081,  268.046);
				self.spawnLocations[3] = ( 1751.04, 1529.66, -196.405);
				self.spawnLocations[4] = (-1501.84, 930.113, -226.017);
				self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
			}
		}
		else if(self.team == "axis")
		{

			{
				self.spawnLocations = [];
				self.spawnLocations[0] = ( 567.304,  10.9695, -217.368);
				self.spawnLocations[1] = (-1730.64, -958.758, -223.898);
				self.spawnLocations[2] = ( 968.059, -3192.69, -230.999);
				self.spawnLocations[3] = ( 3936.45, -2243.62, -241.011);
				self.spawnLocations[4] = (-3306.37,  1334.16, -209.565);
				self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
			}
		}
	}
}
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us