• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Set Spawn
#1
Is it possible? and if so how
[Image: mca.png]

ADD ME ON STEAM: AKNINJA612
  Reply
#2
i think this was posted somewhere on the forums try searching for it
  Reply
#3
(03-03-2011, 11:43)No One Wrote: i think this was posted somewhere on the forums try searching for it

k thanks
[Image: mca.png]

ADD ME ON STEAM: AKNINJA612
  Reply
#4
Code:
//goes onplayerspawned
if(self.team == "allies") self thread doallies();
else if(self.team == "axis") self thread doaxis();


doallies()
{
//1111,2222,3333 represents the spawn's coordinate, the function automaticly creates other spawnpoints around it so you don't all spawn on the same place,
//be sure to take a free area so you don't spawn in a tree close to your spawnpoint
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}

doaxis()
{
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}

--
  Reply
#5
You can't but you can do:

Code:
doRandomSpawn()
{
switch(randomInt(5)) //selects a random number between 0-4
{
case 0:
spwn = (124, 52, 523); //X, Y, Z
break;
case 1:
spwn = (523, 274, 923);
break;
case 2:
spwn = (473, 463, 413);
break;
case 3:
spwn = (469, 123, 634);
break;
case 4:
spwn = (893, 534, 134);
break;
default: //if somehow it jumped to undefined number (a number which you did not include)
spwn = self.origin; //no change at spawn positions
break;
}
self.origin = spwn; //teleports to new place
}

And if you put that under onPlayerSpawned it looks like a custom spawn point.
[Image: 1fxsnb.jpg]
  Reply
#6
can be shortened down to this
Code:
spawn = [];
spawn[0] = (x,y,z);
spawn[1] = (x,y,z);
spawn[2] = (x,y,z);
spawn[3] = (x,y,z);
self setOrigin(spawn[RandomInt(spawn.size)]);

or if you want to code it fast
Code:
spawn = [];
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
spawn[spawn.size] = (x,y,z);
self setOrigin(spawn[RandomInt(spawn.size)]);
YouTube 1: Azumikkel - Modding
YouTube 2: DerpShark - Gaming Entertainment
Website: Jensby.me
Contact: im[at]jensby.me
  Reply
#7
lol we'r having a battle helping somebody set the spawns ^^

Tnx for sharing azu
--
  Reply
#8
Battle?
I'm just being helpful
Okay.
YouTube 1: Azumikkel - Modding
YouTube 2: DerpShark - Gaming Entertainment
Website: Jensby.me
Contact: im[at]jensby.me
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Exclamation [Request] Random Weapon At Spawn Scripts18 3 1,851 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Spawn Message Playing on Respawn? Killjoy 7 1,938 07-11-2013, 14:53
Last Post: Killjoy
  [Release] Spawn Polygons and Pyramids Yamato 6 1,655 06-20-2013, 12:30
Last Post: Yamato
  Question on how to "Spawn" a flying rocket as a player? akillj 8 2,197 06-04-2013, 01:54
Last Post: rotceh_dnih
  Help pickup mod + spawn fx m4gicaL 1 1,237 03-07-2013, 17:52
Last Post: tadej
  Help No more free spawn influencers! JustDoingThisShit 0 2,743 02-03-2013, 20:21
Last Post: JustDoingThisShit
  [email protected]: Making player spawn with a custom default class. koil 9 2,157 01-13-2013, 12:10
Last Post: koil
  spawn object SaviouR9966 3 1,081 01-08-2013, 14:31
Last Post: 99IRock
  Help Spawn on predefined points problem islamsaab 2 1,001 09-29-2012, 21:23
Last Post: islamsaab
  Help Spawn Weapon Models Ich1994 3 1,672 07-15-2012, 14:20
Last Post: archit

Forum Jump:


Users browsing this thread: 1 Guest(s)