03-03-2011, 10:22
Is it possible? and if so how
![[Image: mca.png]](http://mag.racked.eu/image/300/PUT+ON+PANTS+/mca.png)
ADD ME ON STEAM: AKNINJA612
|
Help Set Spawn
|
|
03-03-2011, 11:43
i think this was posted somewhere on the forums try searching for it
03-03-2011, 11:45
(03-03-2011, 11:43)No One Wrote: i think this was posted somewhere on the forums try searching for it k thanks ![]() ADD ME ON STEAM: AKNINJA612
03-04-2011, 13:47
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));
}
--
03-04-2011, 13:50
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.
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: [email protected]
03-04-2011, 14:30
lol we'r having a battle helping somebody set the spawns ^^
Tnx for sharing azu
--
03-04-2011, 15:00
Battle?
I'm just being helpful Okay.
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment Website:Jensby.me Contact: [email protected] |
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
|
|
[Request] Random Weapon At Spawn | Scripts18 | 3 | 6,891 |
07-27-2013, 23:53 Last Post: DidUknowiPwn |
| Help Spawn Message Playing on Respawn? | Killjoy | 7 | 7,486 |
07-11-2013, 14:53 Last Post: Killjoy |
|
| [Release] Spawn Polygons and Pyramids | Yamato | 6 | 6,839 |
06-20-2013, 12:30 Last Post: Yamato |
|
| Question on how to "Spawn" a flying rocket as a player? | akillj | 8 | 8,684 |
06-04-2013, 01:54 Last Post: rotceh_dnih |
|
| Help pickup mod + spawn fx | m4gicaL | 1 | 3,767 |
03-07-2013, 17:52 Last Post: tadej |
|
| Help No more free spawn influencers! | JustDoingThisShit | 0 | 5,828 |
02-03-2013, 20:21 Last Post: JustDoingThisShit |
|
| W@W: Making player spawn with a custom default class. | koil | 9 | 7,717 |
01-13-2013, 12:10 Last Post: koil |
|
| spawn object | SaviouR9966 | 3 | 4,130 |
01-08-2013, 14:31 Last Post: 99IRock |
|
| Help Spawn on predefined points problem | islamsaab | 2 | 3,986 |
09-29-2012, 21:23 Last Post: islamsaab |
|
| Help Spawn Weapon Models | Ich1994 | 3 | 4,724 |
07-15-2012, 14:20 Last Post: archit |
|
| Users browsing this thread: |
| 2 Guest(s) |