Home » Renegade Discussions » Mod Forum » Server Side Hunt The Player
Re: Server Side Hunt The Player [message #314587 is a reply to message #314412] |
Wed, 30 January 2008 03:28 |
|
wittebolx
Messages: 332 Registered: May 2007 Location: the netherlands
Karma: 0
|
Recruit |
|
|
reborn wrote on Tue, 29 January 2008 17:22 | Change the RandomSpawnCharacter array to model names instead of preset names, like this:
// Note that I havn't included the .w3d file extension
char *RandomSpawnCharacter[3][1] = {
{ "trike" },
{ "clown" },
{ "dino" },
};
Change the MDB_SSGM_Player::Created part of your code to look like this:
(comments have been added for you to follow)
void MDB_SSGM_Player::Created(GameObject *obj) {
/////////////////////////////////////////////////////////////////////////////
// This line of code ensures that the player uses the hard-coded spawn points,
// as the nuetral team does not have any apart from 0,0,0
RequestSpawn(obj);
/////////////////////////////////////////////////////////////////////////////
// This code here ensures a random number is drawn between 1 and 100
int Rnd = Commands->Get_Random_Int(1,100);
/////////////////////////////////////////////////////////////////////////////
// declare and initialise Index as 0, Index will be the number used to choose a model from the model array
int Index = 0;
/////////////////////////////////////////////////////////////////////////////
// code to get a random number for Index
//This code here basically changes the chances of the model your character gets set to
//Instead of drawing a random number between one and three (meaning you would have an equal chance of getting any model)
//This code makes sure the greatest chance is of getting Index 1, followed by Index 0, then Index 2.
if (Rnd <= 10) Index = 2;
else if (Rnd<=60) Index = 1;
else if (Rnd<=80) Index = 0;
/////////////////////////////////////////////////////////////////////////////
// This code sets the model of the player, using Index as the random number
// but using the array of models made earlier for it's list
//Commands->Set_Model(obj,RandomSpawnCharacter[Index][0]);
////////////////////////////////////////////////////////////////////////////
if (Settings->ForceTeam != -1) {
if (Commands->Get_Player_Type(obj) != Settings->ForceTeam) {
Change_Team(obj,Settings->ForceTeam);
return;
}
}
//etc etc etc
Also please note, the download has now changed to include support for CnC_Under.mix.
|
i managed to add all mission maps to the .dll with 32 spawn points per map.
also renamed the Hunt the Player Mode to DM
reason: more people.
added !pt command so people can buy normal characters like from the Purchase terminal.
added weapon spawn points.
*still need to figure out the random character spawn, because it gives some problems.
* need to find a way for the credit tick rate to enable.
* need to fix bug where you change character as the infected player, the DNA thing will not disappear.
http://www.wittebolx.com
|
|
|
Re: Server Side Hunt The Player [message #314589 is a reply to message #314587] |
Wed, 30 January 2008 03:36 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
wittebolx wrote on Wed, 30 January 2008 05:28 |
reborn wrote on Tue, 29 January 2008 17:22 | Change the RandomSpawnCharacter array to model names instead of preset names, like this:
// Note that I havn't included the .w3d file extension
char *RandomSpawnCharacter[3][1] = {
{ "trike" },
{ "clown" },
{ "dino" },
};
Change the MDB_SSGM_Player::Created part of your code to look like this:
(comments have been added for you to follow)
void MDB_SSGM_Player::Created(GameObject *obj) {
/////////////////////////////////////////////////////////////////////////////
// This line of code ensures that the player uses the hard-coded spawn points,
// as the nuetral team does not have any apart from 0,0,0
RequestSpawn(obj);
/////////////////////////////////////////////////////////////////////////////
// This code here ensures a random number is drawn between 1 and 100
int Rnd = Commands->Get_Random_Int(1,100);
/////////////////////////////////////////////////////////////////////////////
// declare and initialise Index as 0, Index will be the number used to choose a model from the model array
int Index = 0;
/////////////////////////////////////////////////////////////////////////////
// code to get a random number for Index
//This code here basically changes the chances of the model your character gets set to
//Instead of drawing a random number between one and three (meaning you would have an equal chance of getting any model)
//This code makes sure the greatest chance is of getting Index 1, followed by Index 0, then Index 2.
if (Rnd <= 10) Index = 2;
else if (Rnd<=60) Index = 1;
else if (Rnd<=80) Index = 0;
/////////////////////////////////////////////////////////////////////////////
// This code sets the model of the player, using Index as the random number
// but using the array of models made earlier for it's list
//Commands->Set_Model(obj,RandomSpawnCharacter[Index][0]);
////////////////////////////////////////////////////////////////////////////
if (Settings->ForceTeam != -1) {
if (Commands->Get_Player_Type(obj) != Settings->ForceTeam) {
Change_Team(obj,Settings->ForceTeam);
return;
}
}
//etc etc etc
Also please note, the download has now changed to include support for CnC_Under.mix.
|
i managed to add all mission maps to the .dll with 32 spawn points per map.
also renamed the Hunt the Player Mode to DM
reason: more people.
added !pt command so people can buy normal characters like from the Purchase terminal.
added weapon spawn points.
*still need to figure out the random character spawn, because it gives some problems.
* need to find a way for the credit tick rate to enable.
* need to fix bug where you change character as the infected player, the DNA thing will not disappear.
|
It is not death match mode.. It is hunt the player mode :-/
It's good that you added support for the mission maps. Care to share so I can release it for others?
You know how I feel about chat hooks, but it's your server I guess :-/
Did you add the spawn weapons and stuff via the map or objects.ddb file, or did you make a power-up spawn manager in the .dll?
The random character spawn will mess up if you change someones preset to one that isn't teamed -1. Setting there model will work no matter what, but will mess up for people without scripts.dll updated on there client.
The tick rate is disabled becuase I made it set the health of the ref and weps/air to 0 on map load... I will show you where I done that when I get home if you cannot find it yourself.
What's the DNA bug thing, can you explain it in greater detail please? Is it something that is screwed witht he release, or something you've done yourself?
|
|
|
Re: Server Side Hunt The Player [message #314592 is a reply to message #314589] |
Wed, 30 January 2008 04:19 |
|
wittebolx
Messages: 332 Registered: May 2007 Location: the netherlands
Karma: 0
|
Recruit |
|
|
Quote: | title=reborn wrote on Wed, 30 January 2008 11:36
It is not death match mode.. It is hunt the player mode :-/
It's good that you added support for the mission maps. Care to share so I can release it for others?
You know how I feel about chat hooks, but it's your server I guess :-/
Did you add the spawn weapons and stuff via the map or objects.ddb file, or did you make a power-up spawn manager in the .dll?
The random character spawn will mess up if you change someones preset to one that isn't teamed -1. Setting there model will work no matter what, but will mess up for people without scripts.dll updated on there client.
The tick rate is disabled becuase I made it set the health of the ref and weps/air to 0 on map load... I will show you where I done that when I get home if you cannot find it yourself.
What's the DNA bug thing, can you explain it in greater detail please? Is it something that is screwed witht he release, or something you've done yourself?
|
about DNA bug, when you are the infected player and you change character via the !pt command (i know chathook..) the DNA thing goed away and doesnt come back.
also, why doesnt this work?:
Commands->Change_Character(obj,RandomSpawnCharacter[Index][0]);
i have no idea why it doesnt work, all i get is an error that i cant seem to fix:
1>.\gmmain.cpp(5407) : error C2039: 'Change_Character' : is not a member of 'ScriptCommands'
1> c:\users\wittebolx\desktop\hunt the player\scripts.h(695) : see declaration of 'ScriptCommands'
and here are some codes i added myself:
char *RandomSpawnCharacter[27][1] = {
{ "cnc_gdi_engineer_0" },
{ "cnc_gdi_engineer_2sf" },
{ "cnc_gdi_grenadier_0" },
{ "cnc_gdi_grenadier_2sf" },
{ "cnc_gdi_minigunner_0" },
{ "cnc_gdi_minigunner_1off" },
{ "cnc_gdi_minigunner_2sf" },
{ "cnc_gdi_minigunner_3boss" },
{ "cnc_gdi_rocketsoldier_0" },
{ "cnc_gdi_rocketsoldier_2sf" },
{ "cnc_gdi_rocketsoldier_1off" },
{ "cnc_sydney_powersuit_alt2" },
{ "cnc_sydney" },
{ "cnc_nod_engineer_0" },
{ "cnc_nod_flamethrower_0" },
{ "cnc_nod_flamethrower_1off" },
{ "cnc_nod_flamethrower_2sf" },
{ "cnc_nod_flamethrower_3boss" },
{ "cnc_nod_minigunner_0" },
{ "cnc_nod_minigunner_1off" },
{ "cnc_nod_minigunner_2sf" },
{ "cnc_nod_minigunner_3boss" },
{ "cnc_nod_rocketsoldier_0" },
{ "cnc_nod_rocketsoldier_1off" },
{ "cnc_nod_rocketsoldier_2sf" },
{ "cnc_nod_rocketsoldier_3boss" },
{ "cnc_nod_technician_0" },
};
void RequestSpawn(GameObject *obj) {
Vector3 NewPos;
Spawn:
// get a random number from 1 to 33
int RandomSpawn = Commands->Get_Random_Int(1,33);
// if the map is volcano then allow the following to happen
if (strstr(Data->CurrMap,"C&C_Volcano")) {
// check if the spawn boolean allows you to spawn there and if the random number equals 1
// I won't bother writing comments for the rest, you get the idea...
if (RandomSpawn == 1 && Spawn1OK == true) {
// Set the allowed to spawn as false (this will ensure that no one else can spawn at the same place as you when they die)
Spawn1OK = false;
// Set the position of where they are to be moved to
NewPos.X = 9.269f;
NewPos.Y = 8.691f;
NewPos.Z = 3.873f;
// create a little explosion when they spawn
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -20.972f;
NewPos.Y = 28.411f;
NewPos.Z = -0.538f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -64.304f;
NewPos.Y = 48.846f;
NewPos.Z = -3.591f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -60.498f;
NewPos.Y = 104.866f;
NewPos.Z = 3.873f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -29.620f;
NewPos.Y = 132.920f;
NewPos.Z = -3.616f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = 33.422f;
NewPos.Y = 124.567f;
NewPos.Z = -3.574f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 33.704f;
NewPos.Y = 51.097f;
NewPos.Z = -3.473f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 9.485f;
NewPos.Y = 76.473f;
NewPos.Z = -3.577f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = 142.005f;
NewPos.Y = 22.460f;
NewPos.Z = -3.449f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 104.241f;
NewPos.Y = 6.953f;
NewPos.Z = -3.628f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 58.066f;
NewPos.Y = -35.133f;
NewPos.Z = -3.648f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 77.324f;
NewPos.Y = -80.889f;
NewPos.Z = -3.705f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = 114.192f;
NewPos.Y = -38.135f;
NewPos.Z = -1.733f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 167.814f;
NewPos.Y = -42.106f;
NewPos.Z = -3.632;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 162.793;
NewPos.Y = -84.725f;
NewPos.Z = -3.549f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = 111.600f;
NewPos.Y = -79.748f;
NewPos.Z = -3.611f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = 23.316f;
NewPos.Y = -86.181f;
NewPos.Z = -8.704f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -8.762f;
NewPos.Y = -95.591f;
NewPos.Z = -12.929f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -17.240f;
NewPos.Y = -68.683f;
NewPos.Z = -14.500f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -39.258f;
NewPos.Y = -68.708f;
NewPos.Z = -15.913f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -29.727f;
NewPos.Y = -33.479f;
NewPos.Z = -13.516f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -67.799f;
NewPos.Y = -15.489f;
NewPos.Z = -8.767f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -83.971f;
NewPos.Y = -7.567f;
NewPos.Z = -3.406f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -80.869f;
NewPos.Y = -41.679f;
NewPos.Z = 0.906f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -52.656f;
NewPos.Y = -77.863f;
NewPos.Z = 5.106f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -32.148f;
NewPos.Y = -101.776f;
NewPos.Z = 2.897f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = 34.994f;
NewPos.Y = -17.782f;
NewPos.Z = -3.119f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 11.504f;
NewPos.Y = -24.479f;
NewPos.Z = -2.713f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -22.877f;
NewPos.Y = -31.605f;
NewPos.Z = 0.587f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = 48.994f;
NewPos.Y = 6.259f;
NewPos.Z = 7.776f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = 86.689f;
NewPos.Y = 24.903f;
NewPos.Z = 13.993f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = 97.406f;
NewPos.Y = 61.942f;
NewPos.Z = 5.138f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"C&C_Under")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 25.056f;
NewPos.Y = 56.579f;
NewPos.Z = 29.048f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -69.257f;
NewPos.Y = -61.740f;
NewPos.Z = 23.378f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -19.263f;
NewPos.Y = 48.846f;
NewPos.Z = -3.591f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -6.381f;
NewPos.Y = 81.260f;
NewPos.Z = 33.922f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -29.620f;
NewPos.Y = -81.260f;
NewPos.Z = 33.922f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -44.123f;
NewPos.Y = 1.080f;
NewPos.Z = 4.161f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -45.509f;
NewPos.Y = 24.709f;
NewPos.Z = -1.619f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 46.966f;
NewPos.Y = 21.842f;
NewPos.Z = 3.028f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = 44.022f;
NewPos.Y = -55.072f;
NewPos.Z = 12.156f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 61.307f;
NewPos.Y = -90.217f;
NewPos.Z = 19.566f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = -96.389f;
NewPos.Y = -161.187f;
NewPos.Z = 3.534f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -104.777f;
NewPos.Y = -26.136f;
NewPos.Z = -1.108f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -190.634f;
NewPos.Y = -21.875f;
NewPos.Z = -3.310f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -195.342f;
NewPos.Y = -72.409f;
NewPos.Z = -3.392;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -53.203;
NewPos.Y = -27.137f;
NewPos.Z = 28.002f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -3.998f;
NewPos.Y = -37.700f;
NewPos.Z = 11.380f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -23.875f;
NewPos.Y = -67.052f;
NewPos.Z = 12.873f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 44.675f;
NewPos.Y = -144.734f;
NewPos.Z = 17.254f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 17.254f;
NewPos.Y = -119.372f;
NewPos.Z = 19.326f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = 1.997f;
NewPos.Y = 85.789f;
NewPos.Z = -3.439f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -71.248f;
NewPos.Y = 105.247f;
NewPos.Z = -3.272f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -56.568f;
NewPos.Y = 161.868f;
NewPos.Z = -4.211f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -30.596f;
NewPos.Y = -12.772f;
NewPos.Z = 12.605f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -53.702f;
NewPos.Y = -48.056f;
NewPos.Z = 12.415f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -82.732f;
NewPos.Y = -55.993f;
NewPos.Z = 12.577f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -88.862f;
NewPos.Y = -32.036f;
NewPos.Z = 4.161f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -145.744f;
NewPos.Y = 10.406f;
NewPos.Z = -3.163f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 28.511f;
NewPos.Y = -17.985f;
NewPos.Z = 11.067f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -50.814f;
NewPos.Y = -82.273f;
NewPos.Z = 11.612f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -118.505f;
NewPos.Y = -102.755f;
NewPos.Z = -2.984f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -57.985f;
NewPos.Y = -117.403f;
NewPos.Z = 10.006f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -45.536f;
NewPos.Y = 79.451f;
NewPos.Z = -3.456f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
// if the map is volcano then allow the following to happen
else if (strstr(Data->CurrMap,"C&C_Islands")) {
// check if the spawn boolean allows you to spawn there and if the random number equals 1
// I won't bother writing comments for the rest, you get the idea...
if (RandomSpawn == 1 && Spawn1OK == true) {
// Set the allowed to spawn as false (this will ensure that no one else can spawn at the same place as you when they die)
Spawn1OK = false;
// Set the position of where they are to be moved to
NewPos.X = -65.578f;
NewPos.Y = 34.899f;
NewPos.Z = -0.008f;
// create a little explosion when they spawn
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -92.529f;
NewPos.Y = 82.658f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -123.266f;
NewPos.Y = 16.320f;
NewPos.Z = 0.055f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -131.520f;
NewPos.Y = -27.986f;
NewPos.Z = 6.317f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -108.859f;
NewPos.Y = -27.974f;
NewPos.Z = 6.333f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -42.869f;
NewPos.Y = -4.189f;
NewPos.Z = 2.701f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 2.468f;
NewPos.Y = 23.540f;
NewPos.Z = -1.726f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 52.638f;
NewPos.Y = 9.941f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = 89.266f;
NewPos.Y = 12.153f;
NewPos.Z = -0.465f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 20.634;
NewPos.Y = -10.976f;
NewPos.Z = -0.326f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 33.946f;
NewPos.Y = -47.826f;
NewPos.Z = -1.252f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 19.069f;
NewPos.Y = -62.970f;
NewPos.Z = -1.726f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = 69.215f;
NewPos.Y = -56.576f;
NewPos.Z = -1.726f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 167.814f;
NewPos.Y = -42.106f;
NewPos.Z = -3.632;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 53.210;
NewPos.Y = -89.051f;
NewPos.Z = 0.320f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = 76.006f;
NewPos.Y = -103.232f;
NewPos.Z = -0.604f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = 56.414f;
NewPos.Y = -133.557f;
NewPos.Z = -0.110f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -11.023f;
NewPos.Y = -143.389f;
NewPos.Z = -1.726f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -5.962f;
NewPos.Y = -119.081f;
NewPos.Z = -1.185f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -43.173f;
NewPos.Y = -175.852f;
NewPos.Z = 3.152f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -135.792f;
NewPos.Y = -125.599f;
NewPos.Z = 0.003f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -89.803f;
NewPos.Y = -130.789f;
NewPos.Z = -0.001f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -87.865f;
NewPos.Y = -83.145f;
NewPos.Z = 6.080f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -62.008f;
NewPos.Y = -83.042f;
NewPos.Z = 6.086f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -82.670f;
NewPos.Y = -71.188f;
NewPos.Z = -8.544f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -64.019f;
NewPos.Y = -54.700f;
NewPos.Z = -8.544f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -124.496f;
NewPos.Y = -41.870f;
NewPos.Z = -8.544f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -39.637f;
NewPos.Y = -39.571f;
NewPos.Z = -8.544f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -110.762f;
NewPos.Y = -39.339f;
NewPos.Z = -8.544f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -10.310f;
NewPos.Y = -69.661f;
NewPos.Z = -8.544f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -68.904f;
NewPos.Y = -69.915f;
NewPos.Z = -8.545f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = 0.806f;
NewPos.Y = -84.286f;
NewPos.Z = -0.328f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M01")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 93.032f;
NewPos.Y = 79.411f;
NewPos.Z = -4.857f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -122.393f;
NewPos.Y = 94.157f;
NewPos.Z = -6.411f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -120.029f;
NewPos.Y = 135.703f;
NewPos.Z = -1.404f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -93.361f;
NewPos.Y = 125.463f;
NewPos.Z = 2.5109f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -78.180f;
NewPos.Y = 105.751f;
NewPos.Z = 3.518f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -53.002f;
NewPos.Y = 108.081f;
NewPos.Z = 3.589f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -39.408f;
NewPos.Y = 129.758f;
NewPos.Z = 2.963f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -24.382f;
NewPos.Y = 146.104f;
NewPos.Z = 1.011f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -16.868f;
NewPos.Y = 169.563f;
NewPos.Z = 1.119f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -25.771f;
NewPos.Y = 191.728f;
NewPos.Z = 0.881f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 0.881f;
NewPos.Y = 206.158f;
NewPos.Z = 3.631f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -71.707f;
NewPos.Y = 206.017f;
NewPos.Z = 5.801f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -86.254f;
NewPos.Y = 186.813f;
NewPos.Z = 2.101f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -103.009f;
NewPos.Y = 170.540f;
NewPos.Z = 1.156f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -87.710f;
NewPos.Y = 151.034f;
NewPos.Z = 1.216f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -82.236f;
NewPos.Y = 136.987f;
NewPos.Z = 2.322f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -63.527f;
NewPos.Y = 125.774f;
NewPos.Z = 3.390f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -45.531f;
NewPos.Y = 136.995f;
NewPos.Z = 2.472f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -39.530f;
NewPos.Y = 159.216f;
NewPos.Z = 2.293f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -42.350f;
NewPos.Y = 186.786f;
NewPos.Z = 1.402f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -51.206f;
NewPos.Y = 183.623f;
NewPos.Z = 1.793f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -58.488f;
NewPos.Y = 181.223f;
NewPos.Z = 1.793f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -59.588f;
NewPos.Y = 182.102f;
NewPos.Z = 6.523f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -50.141f;
NewPos.Y = 166.462f;
NewPos.Z = 2.026f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -60.271f;
NewPos.Y = 166.403f;
NewPos.Z = 2.028f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -66.624f;
NewPos.Y = 154.464f;
NewPos.Z = 2.036f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -69.557f;
NewPos.Y = 138.752f;
NewPos.Z = 1.347f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -73.358f;
NewPos.Y = 138.404f;
NewPos.Z = 1.347f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -59.307f;
NewPos.Y = 147.594f;
NewPos.Z = 2.021f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -80.8074f;
NewPos.Y = 69.240f;
NewPos.Z = 1.788f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -92.901f;
NewPos.Y = 54.889f;
NewPos.Z = -0.676f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -90.686f;
NewPos.Y = 31.875f;
NewPos.Z = -4.858f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M03")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 65.006103515625f;
NewPos.Y = 52.120506286621f;
NewPos.Z = 46.994472503662f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 64.668510437012f;
NewPos.Y = 60.971313476563f;
NewPos.Z = 46.994472503662f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = 72.825439453125f;
NewPos.Y = 60.988277435303f;
NewPos.Z = 46.994472503662f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -110.9547958374f;
NewPos.Y = 75.515998840332f;
NewPos.Z = 9.9377613067627f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -120.62490844727f;
NewPos.Y = 83.302703857422f;
NewPos.Z = 9.9593887329102f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -122.70695495605f;
NewPos.Y = 88.888961791992f;
NewPos.Z = 9.8477659225464f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -99.344627380371f;
NewPos.Y = 82.61457824707f;
NewPos.Z = 10.057372093201f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -82.147018432617f;
NewPos.Y = 69.372062683105f;
NewPos.Z = 10.329183578491f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -63.257946014404f;
NewPos.Y = 54.33080291748f;
NewPos.Z = 9.8919658660889f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -56.372886657715f;
NewPos.Y = 29.429492950439f;
NewPos.Z = 10.232938766479f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = -41.623386383057f;
NewPos.Y = 28.057956695557f;
NewPos.Z = 9.9022769927979f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -42.081897735596f;
NewPos.Y = 12.397909164429f;
NewPos.Z = 9.8222217559814f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -67.822174072266f;
NewPos.Y = 30.290029525757f;
NewPos.Z = 17.208494186401f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -65.784660339355f;
NewPos.Y = 12.010090827942f;
NewPos.Z = 17.209756851196f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -58.531719207764f;
NewPos.Y = 34.929512023926f;
NewPos.Z = 13.216559410095f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -71.27172088623f;
NewPos.Y = 45.027523040771f;
NewPos.Z = 10.262223243713f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -81.820709228516f;
NewPos.Y = 42.336898803711f;
NewPos.Z = 10.325974464417f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -91.604484558105f;
NewPos.Y = 35.828247070313f;
NewPos.Z = 10.34476184845f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -106.07060241699f;
NewPos.Y = 14.40703868866f;
NewPos.Z = 10.153545379639f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -114.28244018555f;
NewPos.Y = 17.809938430786f;
NewPos.Z = 10.34476184845f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -133.46296691895f;
NewPos.Y = 17.708166122437f;
NewPos.Z = 10.388935089111f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -150.8878326416f;
NewPos.Y = 36.366840362549f;
NewPos.Z = 10.351961135864f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -148.41122436523f;
NewPos.Y = 65.685874938965f;
NewPos.Z = 10.009819984436f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -168.35049438477f;
NewPos.Y = 9.9061441421509f;
NewPos.Z = 10.421723365784f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
NewPos.X = -167.89692687988f;
NewPos.Y = -10.616461753845f;
NewPos.Z = 10.552794456482f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -144.67330932617f;
NewPos.Y = -22.300235748291f;
NewPos.Z = 10.263560295105f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -128.1192779541f;
NewPos.Y = -13.301196098328f;
NewPos.Z = 10.345967292786f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -110.15124511719f;
NewPos.Y = 43.767120361328f;
NewPos.Z = 10.163479804993f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -102.87775421143f;
NewPos.Y = 41.869667053223f;
NewPos.Z = 9.7131061553955f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -119.98876953125f;
NewPos.Y = 52.388977050781f;
NewPos.Z = 10.313445091248f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -123.30559539795f;
NewPos.Y = 64.948463439941f;
NewPos.Z = -0.92951595783234f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -123.34825134277f;
NewPos.Y = 48.973022460938f;
NewPos.Z = -0.92981195449829f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M05")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 23.850292205811f;
NewPos.Y = 10.854857444763f;
NewPos.Z = 7.0497350692749f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 29.070964813232f;
NewPos.Y = -2.0020010471344f;
NewPos.Z = 6.3998069763184f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = 30.610973358154f;
NewPos.Y = -14.677942276001f;
NewPos.Z = 5.5481986999512f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = 25.802562713623f;
NewPos.Y = -26.208236694336f;
NewPos.Z = 5.3087892532349f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = 11.054759025574f;
NewPos.Y = -32.729274749756f;
NewPos.Z = 5.2235498428345f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -5.0002055168152f;
NewPos.Y = -36.681457519531f;
NewPos.Z = 5.1708455085754f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -17.808902740479f;
NewPos.Y = -39.635257720947f;
NewPos.Z = 5.1113061904907f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -34.333866119385f;
NewPos.Y = -43.323085784912f;
NewPos.Z = 5.0367498397827f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -51.325832366943f;
NewPos.Y = -46.743537902832f;
NewPos.Z = 5.0132741928101f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -63.271842956543f;
NewPos.Y = -49.024990081787f;
NewPos.Z = 4.9225716590881f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = -77.021453857422f;
NewPos.Y = -51.323139190674f;
NewPos.Z = 4.9119424819946f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -89.906181335449f;
NewPos.Y = -52.465766906738f;
NewPos.Z = 4.9193964004517f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -105.7195892334f;
NewPos.Y = -52.256145477295f;
NewPos.Z = 5.2951855659485f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -124.52362823486f;
NewPos.Y = -47.025241851807f;
NewPos.Z = 5.8715238571167f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -136.77947998047f;
NewPos.Y = -41.053314208984f;
NewPos.Z = 6.2649059295654f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -149.88014221191f;
NewPos.Y = -33.762672424316f;
NewPos.Z = 7.0657024383545f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -143.40432739258f;
NewPos.Y = -60.221981048584f;
NewPos.Z = 5.5557827949524f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -102.86894989014f;
NewPos.Y = -66.178558349609f;
NewPos.Z = 5.1688785552979f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -100.74297332764f;
NewPos.Y = -78.347351074219f;
NewPos.Z = 5.0695691108704f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -98.464698791504f;
NewPos.Y = -91.397918701172f;
NewPos.Z = 5.014946937561f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -88.841697692871f;
NewPos.Y = -95.818710327148f;
NewPos.Z = 4.951192855835f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -76.046058654785f;
NewPos.Y = -95.626640319824f;
NewPos.Z = 5.0129432678223f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -88.507690429688f;
NewPos.Y = -83.625495910645f;
NewPos.Z = 5.1458978652954f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -83.960929870605f;
NewPos.Y = -77.18815612793f;
NewPos.Z = 5.1458926200867f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -76.776519775391f;
NewPos.Y = -88.61344909668f;
NewPos.Z = 5.1458878517151f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -68.809883117676f;
NewPos.Y = -88.469528198242f;
NewPos.Z = 5.1458921432495f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -68.524383544922f;
NewPos.Y = -69.970733642578f;
NewPos.Z = 4.8822078704834f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -88.748168945313f;
NewPos.Y = -71.954284667969f;
NewPos.Z = 13.366863250732f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -88.092155456543f;
NewPos.Y = -79.763870239258f;
NewPos.Z = 13.366860389709f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -74.43448638916f;
NewPos.Y = -87.073432922363f;
NewPos.Z = 13.366860389709f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -68.624938964844f;
NewPos.Y = -88.137313842773f;
NewPos.Z = 13.366860389709f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -67.32674407959f;
NewPos.Y = -76.957130432129f;
NewPos.Z = 13.366860389709f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M07")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = -116.63651275635f;
NewPos.Y = 144.7501373291f;
NewPos.Z = 30.28377532959f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -116.70039367676f;
NewPos.Y = 131.70085144043f;
NewPos.Z = 30.163196563721f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -121.28568267822f;
NewPos.Y = 116.83400726318f;
NewPos.Z = 29.95142364502f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -131.05018615723f;
NewPos.Y = 103.42805480957f;
NewPos.Z = 29.743860244751f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -147.48788452148f;
NewPos.Y = 102.11985778809f;
NewPos.Z = 29.673934936523f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -162.55819702148f;
NewPos.Y = 103.55657196045f;
NewPos.Z = 29.570426940918f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -178.82177734375f;
NewPos.Y = 105.11713409424f;
NewPos.Z = 29.459005355835f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -200.15545654297f;
NewPos.Y = 106.95414733887f;
NewPos.Z = 29.465051651001f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -215.54640197754f;
NewPos.Y = 108.14338684082f;
NewPos.Z = 29.595315933228f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -232.22937011719f;
NewPos.Y = 109.4447555542f;
NewPos.Z = 29.620258331299f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = -244.44256591797f;
NewPos.Y = 110.40316009521f;
NewPos.Z = 29.739274978638f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -255.86088562012f;
NewPos.Y = 111.29499053955f;
NewPos.Z = 29.846309661865f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -261.84280395508f;
NewPos.Y = 125.60028839111f;
NewPos.Z = 30.087936401367f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -247.76661682129f;
NewPos.Y = 129.64976501465f;
NewPos.Z = 29.975257873535f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -239.33731079102f;
NewPos.Y = 139.36584472656f;
NewPos.Z = 29.932706832886f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -238.24681091309f;
NewPos.Y = 154.94018554688f;
NewPos.Z = 30.044805526733f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -238.70356750488f;
NewPos.Y = 168.37327575684f;
NewPos.Z = 30.053062438965f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -245.72918701172f;
NewPos.Y = 185.05313110352f;
NewPos.Z = 30.533149719238f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -255.54981994629f;
NewPos.Y = 196.49334716797f;
NewPos.Z = 30.582105636597f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -271.1708984375f;
NewPos.Y = 205.58363342285f;
NewPos.Z = 30.805799484253f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 287.99682617188f;
NewPos.Y = 207.79515075684f;
NewPos.Z = 30.543474197388f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -303.79470825195f;
NewPos.Y = 208.37274169922f;
NewPos.Z = 29.255788803101f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -320.49716186523f;
NewPos.Y = 211.57708740234f;
NewPos.Z = 27.034345626831f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -335.88137817383f;
NewPos.Y = 211.6820526123f;
NewPos.Z = 26.782257080078f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -326.44314575195f;
NewPos.Y = 202.9430847168f;
NewPos.Z = 26.732242584229f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -325.59689331055f;
NewPos.Y = 214.92445373535f;
NewPos.Z = 34.037906646729f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -326.51715087891f;
NewPos.Y = 199.86413574219f;
NewPos.Z = 34.036037445068f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -223.69413757324f;
NewPos.Y = 159.97778320313f;
NewPos.Z = 30.11269569397f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -198.95265197754f;
NewPos.Y = 137.24656677246f;
NewPos.Z = 30.112691879272f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -180.54556274414f;
NewPos.Y = 131.12243652344f;
NewPos.Z = 30.993980407715f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -156.70658874512f;
NewPos.Y = 147.71502685547f;
NewPos.Z = 30.993980407715f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -178.47180175781f;
NewPos.Y = 148.07878112793f;
NewPos.Z = 37.348129272461f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M10")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 48.921615600586f;
NewPos.Y = 102.44650268555f;
NewPos.Z = 34.337516784668f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 47.926128387451f;
NewPos.Y = 116.6403503418f;
NewPos.Z = 34.337516784668f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = 49.709503173828f;
NewPos.Y = 135.48893737793f;
NewPos.Z = 34.337516784668f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = 32.378761291504f;
NewPos.Y = 135.35203552246f;
NewPos.Z = 34.337520599365f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = 17.276889801025f;
NewPos.Y = 135.39044189453f;
NewPos.Z = 34.337520599365f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = 2.9789600372314f;
NewPos.Y = 135.42680358887f;
NewPos.Z = 34.337520599365f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -10.622992515564f;
NewPos.Y = 135.46139526367f;
NewPos.Z = 34.337520599365f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -22.118907928467f;
NewPos.Y = 135.49063110352f;
NewPos.Z = 34.337520599365f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -38.816890716553f;
NewPos.Y = 135.53309631348f;
NewPos.Z = 34.334945678711f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -42.618423461914f;
NewPos.Y = 120.03207397461f;
NewPos.Z = 34.337520599365f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = -44.288398742676f;
NewPos.Y = 102.47191619873f;
NewPos.Z = 34.337516784668f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -35.276649475098f;
NewPos.Y = 99.527572631836f;
NewPos.Z = 17.973701477051f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -38.391532897949f;
NewPos.Y = 85.383781433105f;
NewPos.Z = 15.605739593506f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -22.25306892395f;
NewPos.Y = 86.236122131348f;
NewPos.Z = 16.186170578003f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -19.651596069336f;
NewPos.Y = 110.387550354f;
NewPos.Z = 19.019006729126f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -24.042953491211f;
NewPos.Y = 133.64378356934f;
NewPos.Z = 19.019006729126f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -9.2233228683472f;
NewPos.Y = 136.45463562012f;
NewPos.Z = 19.019008636475f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 3.9782745838165f;
NewPos.Y = 136.11437988281f;
NewPos.Z = 19.019008636475f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 17.371696472168f;
NewPos.Y = 135.7664642334f;
NewPos.Z = 19.019008636475f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = 36.071212768555f;
NewPos.Y = 138.91744995117f;
NewPos.Z = 19.019006729126f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 48.354438781738f;
NewPos.Y = 135.48046875f;
NewPos.Z = 19.019006729126f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 48.701580047607f;
NewPos.Y = 116.85259246826f;
NewPos.Z = 19.019006729126f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = 65.78685760498f;
NewPos.Y = 116.98710632324f;
NewPos.Z = 19.013750076294f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 49.935340881348f;
NewPos.Y = 97.140769958496f;
NewPos.Z = 17.481092453003f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 5.2862863540649f;
NewPos.Y = 102.16333770752f;
NewPos.Z = 19.317756652832f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = 6.3700766563416f;
NewPos.Y = 92.923751831055f;
NewPos.Z = 20.02650642395f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = 19.126050949097f;
NewPos.Y = 90.07991027832f;
NewPos.Z = 26.950538635254f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 29.198749542236f;
NewPos.Y = 77.384056091309f;
NewPos.Z = 18.861736297607f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -5.5824828147888f;
NewPos.Y = 71.746726989746f;
NewPos.Z = 20.085088729858f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = 61.675945281982f;
NewPos.Y = 128.82955932617f;
NewPos.Z = 32.397808074951f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = 77.958679199219f;
NewPos.Y = 164.63185119629f;
NewPos.Z = 19.04550743103f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = 94.492431640625f;
NewPos.Y = 135.57243347168f;
NewPos.Z = 19.909471511841f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M13")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 17.266725540161f;
NewPos.Y = -0.65853822231293f;
NewPos.Z = 5.1198720932007f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 28.056159973145f;
NewPos.Y = 1.9227691888809f;
NewPos.Z = 5.3222489356995f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = 41.306186676025f;
NewPos.Y = 3.6985144615173f;
NewPos.Z = 5.3731365203857f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = 53.317359924316f;
NewPos.Y = 5.579469203949f;
NewPos.Z = 5.1493182182312f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = 70.456466674805f;
NewPos.Y = 5.8949646949768f;
NewPos.Z = 4.7280323505402f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = 86.076721191406f;
NewPos.Y = 2.5281779766083f;
NewPos.Z = 4.0719475746155f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 97.591812133789f;
NewPos.Y = -6.0020442008972f;
NewPos.Z = 3.4629242420197f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 102.62658691406f;
NewPos.Y = -21.966466903687f;
NewPos.Z = 3.1323990821838f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = 106.31679534912f;
NewPos.Y = -33.992069244385f;
NewPos.Z = 4.6939091682434f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 109.9750213623f;
NewPos.Y = -44.691585540771f;
NewPos.Z = 6.6486058235168f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 125.79872131348f;
NewPos.Y = -48.154163360596f;
NewPos.Z = 5.604208946228f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 135.57989501953f;
NewPos.Y = -44.830696105957f;
NewPos.Z = 6.2174110412598f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = 132.91221618652f;
NewPos.Y = -29.732955932617f;
NewPos.Z = 4.8495671749115f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 125.92281341553f;
NewPos.Y = -15.025457382202f;
NewPos.Z = 3.4808783531189f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 117.00187683105f;
NewPos.Y = 3.9290752410889f;
NewPos.Z = 4.5569379329681f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = 106.23387908936f;
NewPos.Y = 14.779637336731f;
NewPos.Z = 4.0820271968842f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = 92.272621154785f;
NewPos.Y = 24.160089492798f;
NewPos.Z = 4.5283970832825f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 75.523231506348f;
NewPos.Y = 28.812753677368f;
NewPos.Z = 4.7572336196899f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 72.769302368164f;
NewPos.Y = 16.234188079834f;
NewPos.Z = 3.2349574565887f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = 58.614566802979f;
NewPos.Y = 27.412546157837f;
NewPos.Z = 5.0647230148315f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 45.551425933838f;
NewPos.Y = 22.085052490234f;
NewPos.Z = 5.4832983016968f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 32.820556640625f;
NewPos.Y = 25.060638427734f;
NewPos.Z = 5.4600367546082f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = 20.665683746338f;
NewPos.Y = 26.124782562256f;
NewPos.Z = 5.4411263465881f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 8.5494527816772f;
NewPos.Y = -8.5943803787231f;
NewPos.Z = 5.2142324447632f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 2.4048821926117f;
NewPos.Y = 1.779855966568f;
NewPos.Z = 5.1554412841797f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -3.3202216625214f;
NewPos.Y = 14.656643867493f;
NewPos.Z = 5.4242472648621f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -26.63621711731f;
NewPos.Y = 15.09656047821f;
NewPos.Z = 3.8908712863922f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -34.53210067749f;
NewPos.Y = 2.8595607280731f;
NewPos.Z = 1.7843345403671f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -21.495456695557f;
NewPos.Y = -5.1635646820068f;
NewPos.Z = 3.4356000423431f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = 26.870428085327f;
NewPos.Y = 14.021278381348f;
NewPos.Z = 5.1844630241394f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = 39.042514801025f;
NewPos.Y = 14.792248725891f;
NewPos.Z = 5.3167185783386f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = 53.660186767578f;
NewPos.Y = 16.241395950317f;
NewPos.Z = 5.2185564041138f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M02")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 584.78717041016f;
NewPos.Y = 913.84509277344f;
NewPos.Z = -1.6633079051971f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 586.37774658203f;
NewPos.Y = 901.39886474609f;
NewPos.Z = -1.7526245117188f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = 572.48602294922f;
NewPos.Y = 889.99261474609f;
NewPos.Z = -1.7283055782318f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = 554.63037109375f;
NewPos.Y = 884.48297119141f;
NewPos.Z = -1.1128778457642f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = 534.43280029297f;
NewPos.Y = 880.10864257813f;
NewPos.Z = -0.33286023139954f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = 513.49066162109f;
NewPos.Y = 885.76684570313f;
NewPos.Z = 0.92130067199469f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 501.16708374023f;
NewPos.Y = 899.79272460938f;
NewPos.Z = 2.1223813295364f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 480.66052246094f;
NewPos.Y = 897.43023681641f;
NewPos.Z = 3.3145763874054f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = 471.787109375f;
NewPos.Y = 875.84710693359f;
NewPos.Z = 4.1171028614044f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 476.60894775391f;
NewPos.Y = 851.46850585938f;
NewPos.Z = 4.6050071716309f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 482.53289794922f;
NewPos.Y = 831.51934814453f;
NewPos.Z = 4.8014612197876f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 483.27200317383f;
NewPos.Y = 813.82830810547f;
NewPos.Z = 4.7826161384583f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = 476.39584350586f;
NewPos.Y = 796.47821044922f;
NewPos.Z = 4.7917153835297f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 459.52429199219f;
NewPos.Y = 787.80450439453f;
NewPos.Z = 4.3649890422821f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 441.90728759766f;
NewPos.Y = 784.041015625f;
NewPos.Z = 4.0202438831329f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = 427.8542175293f;
NewPos.Y = 771.10217285156f;
NewPos.Z = 0.91975612938404f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = 424.33905029297f;
NewPos.Y = 751.66674804688f;
NewPos.Z = -4.8175864219666f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 425.38040161133f;
NewPos.Y = 734.59851074219f;
NewPos.Z = -8.5863523483276f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 445.47842407227f;
NewPos.Y = 724.17370605469f;
NewPos.Z = -12.1871509552f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = 465.21298217773f;
NewPos.Y = 721.41040039063f;
NewPos.Z = -15.034122467041f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 486.39178466797f;
NewPos.Y = 714.52362060547f;
NewPos.Z = -17.482192993164f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 503.31283569336f;
NewPos.Y = 704.29772949219f;
NewPos.Z = -18.55899810791f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = 363.10330200195f;
NewPos.Y = 767.16760253906f;
NewPos.Z = 7.7208714485168f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 351.03274536133f;
NewPos.Y = 788.26593017578f;
NewPos.Z = 4.9589147567749f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 348.80725097656f;
NewPos.Y = 809.97351074219f;
NewPos.Z = 6.3280124664307f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = 349.99771118164f;
NewPos.Y = 827.95648193359f;
NewPos.Z = 6.3151173591614f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = 354.23049926758f;
NewPos.Y = 847.41571044922f;
NewPos.Z = 6.8187441825867f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 363.27938842773f;
NewPos.Y = 872.30212402344f;
NewPos.Z = 6.1597242355347f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = 373.92144775391f;
NewPos.Y = 892.31329345703f;
NewPos.Z = 5.4646430015564f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = 393.84732055664f;
NewPos.Y = 908.42205810547f;
NewPos.Z = 4.1575224399567f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = 411.30413818359f;
NewPos.Y = 917.85015869141f;
NewPos.Z = 6.8140640258789f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = 439.44201660156f;
NewPos.Y = 923.72076416016f;
NewPos.Z = 9.4492864608765f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M06")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = 17.930034637451f;
NewPos.Y = -41.659755706787f;
NewPos.Z = 7.0189943313599f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 13.970408439636f;
NewPos.Y = -26.958986282349f;
NewPos.Z = 7.0189995765686f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = 13.566187858582f;
NewPos.Y = -8.3493499755859f;
NewPos.Z = 7.0189986228943f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = 13.530658721924f;
NewPos.Y = 3.0085570812225f;
NewPos.Z = 7.0189995765686f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = 23.590347290039f;
NewPos.Y = 3.5157742500305f;
NewPos.Z = 7.0189986228943f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = 25.949756622314f;
NewPos.Y = 12.484521865845f;
NewPos.Z = 7.0190010070801f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 25.923007965088f;
NewPos.Y = 22.846439361572f;
NewPos.Z = 7.0190014839172f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 25.319650650024f;
NewPos.Y = 17.219724655151f;
NewPos.Z = -0.98099660873413f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -1.0043543577194f;
NewPos.Y = 33.23649597168f;
NewPos.Z = 7.0189957618713f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 23.401239395142f;
NewPos.Y = 31.788677215576f;
NewPos.Z = 1.0190009251237f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 41.762783050537f;
NewPos.Y = 14.411650657654f;
NewPos.Z = -0.98099827766418f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 55.68826675415f;
NewPos.Y = 4.1190624237061f;
NewPos.Z = -3.9804315567017f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = 43.526443481445f;
NewPos.Y = 11.661541938782f;
NewPos.Z = -7.9809999465942f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 5.638768196106f;
NewPos.Y = -2.369464635849f;
NewPos.Z = 1.0189999043941f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 5.5177035331726f;
NewPos.Y = -15.220881462097f;
NewPos.Z = 1.0189999006689f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = 5.4382352828979f;
NewPos.Y = -37.460544586182f;
NewPos.Z = 5.0208282470703f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = 8.8531150817871f;
NewPos.Y = -28.606813430786f;
NewPos.Z = 7.0189990997314f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 1.8330520391464f;
NewPos.Y = -28.497220993042f;
NewPos.Z = 7.0189990997314f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -3.1206123828888f;
NewPos.Y = -15.947816848755f;
NewPos.Z = 7.0189986228943f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -1.9673683643341f;
NewPos.Y = 2.6727705001831f;
NewPos.Z = 7.0189990997314f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 12.349419593811f;
NewPos.Y = 3.5725357532501f;
NewPos.Z = 7.0189995765686f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 14.648083686829f;
NewPos.Y = 7.6078805923462f;
NewPos.Z = 7.0190005302429f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = 4.2868328094482f;
NewPos.Y = 7.4940209388733f;
NewPos.Z = 7.0189995765686f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -3.7934367656708f;
NewPos.Y = 12.608921051025f;
NewPos.Z = 7.0189986228943f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -4.1921424865723f;
NewPos.Y = 22.832349777222f;
NewPos.Z = 7.0189986228943f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = 7.6587405204773f;
NewPos.Y = 23.898368835449f;
NewPos.Z = 7.0189981460571f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = 17.211256027222f;
NewPos.Y = 24.364667892456f;
NewPos.Z = 7.0190000534058f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 49.666610717773f;
NewPos.Y = 17.508028030396f;
NewPos.Z = 13.015302658081f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = 38.184074401855f;
NewPos.Y = 23.226833343506f;
NewPos.Z = 13.137537956238f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = 32.994125366211f;
NewPos.Y = 17.442153930664f;
NewPos.Z = 13.850888252258f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = 33.871486663818f;
NewPos.Y = 10.125178337097f;
NewPos.Z = 13.144733428955f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = 41.624389648438f;
NewPos.Y = 16.412538528442f;
NewPos.Z = 13.130729675293f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M08")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = -36.957523345947f;
NewPos.Y = 548.41571044922f;
NewPos.Z = -84.696174621582f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -37.614635467529f;
NewPos.Y = 560.30212402344f;
NewPos.Z = -84.807640075684f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -27.658107757568f;
NewPos.Y = 564.83532714844f;
NewPos.Z = -84.772994995117f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -21.652879714966f;
NewPos.Y = 572.06890869141f;
NewPos.Z = -84.652992248535f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -8.3283605575562f;
NewPos.Y = 573.81201171875f;
NewPos.Z = -84.59757232666f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = 3.2238113880157f;
NewPos.Y = 573.51824951172f;
NewPos.Z = -84.560615539551f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 17.763008117676f;
NewPos.Y = 573.14776611328f;
NewPos.Z = -84.560340881348f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 30.003540039063f;
NewPos.Y = 586.08380126953f;
NewPos.Z = -84.595893859863f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = 38.458106994629f;
NewPos.Y = 588.92449951172f;
NewPos.Z = -84.595886230469f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 34.460674285889f;
NewPos.Y = 563.88140869141f;
NewPos.Z = -84.605628967285f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 25.221338272095f;
NewPos.Y = 548.59625244141f;
NewPos.Z = -84.591812133789f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 17.34525680542f;
NewPos.Y = 536.56268310547f;
NewPos.Z = -84.311790466309f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -5.2855362892151f;
NewPos.Y = 510.31079101563f;
NewPos.Z = -79.701164245605f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 5.4106111526489f;
NewPos.Y = 522.48303222656f;
NewPos.Z = -81.564659118652f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -13.750266075134f;
NewPos.Y = 500.90441894531f;
NewPos.Z = -79.701171875f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -22.882472991943f;
NewPos.Y = 490.6139831543f;
NewPos.Z = -79.70092010498f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -31.123296737671f;
NewPos.Y = 480.1725769043f;
NewPos.Z = -78.679542541504f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -41.810817718506f;
NewPos.Y = 465.87255859375f;
NewPos.Z = -77.270545959473f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = -45.777538299561f;
NewPos.Y = 452.89822387695f;
NewPos.Z = -76.910835266113f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -45.966613769531f;
NewPos.Y = 438.95571899414f;
NewPos.Z = -76.962387084961f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -36.289745330811f;
NewPos.Y = 452.94174194336f;
NewPos.Z = -76.963096618652f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -22.345251083374f;
NewPos.Y = 453.64212036133f;
NewPos.Z = -76.962394714355f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -4.6187882423401f;
NewPos.Y = 455.2795715332f;
NewPos.Z = -76.962394714355f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 15.344830513f;
NewPos.Y = 461.14288330078f;
NewPos.Z = -76.96240234375f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 29.035684585571f;
NewPos.Y = 472.70907592773f;
NewPos.Z = -76.96240234375f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = 31.520847320557f;
NewPos.Y = 486.71234130859f;
NewPos.Z = -76.96240234375f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = 31.736013412476f;
NewPos.Y = 500.16122436523f;
NewPos.Z = -76.96240234375f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 32.021781921387f;
NewPos.Y = 510.61514282227f;
NewPos.Z = -76.96240234375f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -6.1281709671021f;
NewPos.Y = 444.39743041992f;
NewPos.Z = -76.990921020508f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -4.6536540985107f;
NewPos.Y = 433.03256225586f;
NewPos.Z = -76.972213745117f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -20.565391540527f;
NewPos.Y = 432.29470825195f;
NewPos.Z = -76.972213745117f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -21.451160430908f;
NewPos.Y = 443.31533813477f;
NewPos.Z = -76.972213745117f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"M11")) {
if (RandomSpawn == 1 && Spawn1OK == true) {
Spawn1OK = false;
NewPos.X = -0.17854605615139f;
NewPos.Y = 94.561401367188f;
NewPos.Z = -33.214282989502f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 0.36729165911675f;
NewPos.Y = 82.427680969238f;
NewPos.Z = -33.214298248291f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -5.8288540840149f;
NewPos.Y = 79.790740966797f;
NewPos.Z = -38.441871643066f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -3.7944235801697f;
NewPos.Y = 55.058883666992f;
NewPos.Z = -38.467098236084f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = 1.5166391134262f;
NewPos.Y = 53.599742889404f;
NewPos.Z = -44.764656066895f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -9.6485347747803f;
NewPos.Y = 64.330749511719f;
NewPos.Z = -44.764656066895f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 0.057154469192028f;
NewPos.Y = 76.94075012207f;
NewPos.Z = -48.143642425537f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -5.8097972869873f;
NewPos.Y = 71.439590454102f;
NewPos.Z = -51.095138549805f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -0.66785538196564f;
NewPos.Y = 58.558837890625f;
NewPos.Z = -51.095146179199f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 21.261148452759f;
NewPos.Y = 58.279216766357f;
NewPos.Z = -53.281028747559f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 33.248184204102f;
NewPos.Y = 64.998077392578f;
NewPos.Z = -54.20426940918f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 97.413749694824f;
NewPos.Y = 50.093284606934f;
NewPos.Z = -61.667247772217f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = 97.398048400879f;
NewPos.Y = 43.540328979492f;
NewPos.Z = -61.667247772217f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 83.759437561035f;
NewPos.Y = 45.877738952637f;
NewPos.Z = -61.66724395752f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 55.772983551025f;
NewPos.Y = 45.911594390869f;
NewPos.Z = -61.66724395752f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = 37.443328857422f;
NewPos.Y = 46.007286071777f;
NewPos.Z = -61.667240142822f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = 22.504320144653f;
NewPos.Y = 45.672046661377f;
NewPos.Z = -61.667240142822f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 25.577869415283f;
NewPos.Y = 29.661560058594f;
NewPos.Z = -62.730339050293f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 15.227779388428f;
NewPos.Y = 29.264289855957f;
NewPos.Z = -62.731029510498f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = 20.862987518311f;
NewPos.Y = 19.450553894043f;
NewPos.Z = -62.728939056396f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 15.584223747253f;
NewPos.Y = 8.9534282684326f;
NewPos.Z = -62.730293273926f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 8.0012845993042f;
NewPos.Y = 0.25313025712967f;
NewPos.Z = -62.731094360352f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -0.91075021028519f;
NewPos.Y = -11.397403717041f;
NewPos.Z = -62.730472564697f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 3.5440919399261f;
NewPos.Y = 22.326547622681f;
NewPos.Z = -62.773471832275f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 2.8809931278229f;
NewPos.Y = 28.879434585571f;
NewPos.Z = -62.732120513916f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -3.3464167118073f;
NewPos.Y = 27.874572753906f;
NewPos.Z = -62.732116699219f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -16.457319259644f;
NewPos.Y = 29.627326965332f;
NewPos.Z = -62.730369567871f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -9.0939531326294f;
NewPos.Y = 25.21865272522f;
NewPos.Z = -62.732105255127f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = 1.185063958168f;
NewPos.Y = 26.143671035767f;
NewPos.Z = -63.213897705078f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -0.0003907703794539f;
NewPos.Y = 13.056221961975f;
NewPos.Z = -62.732120513916f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = 8.3378210067749f;
NewPos.Y = 13.017148971558f;
NewPos.Z = -62.732456207275f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -2.8589682579041f;
NewPos.Y = 20.866159439087f;
NewPos.Z = -62.732116699219f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"C&C_Complex")) {
// check if the spawn boolean allows you to spawn there and if the random number equals 1
// I won't bother writing comments for the rest, you get the idea...
if (RandomSpawn == 1 && Spawn1OK == true) {
// Set the allowed to spawn as false (this will ensure that no one else can spawn at the same place as you when they die)
Spawn1OK = false;
// Set the position of where they are to be moved to
NewPos.X = 29.759f;
NewPos.Y = -139.211f;
NewPos.Z = -1.344f;
// create a little explosion when they spawn
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -18.947f;
NewPos.Y = -144.600f;
NewPos.Z = 0.009f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -68.554f;
NewPos.Y = -121.414f;
NewPos.Z = -0.005f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -41.820f;
NewPos.Y = -82.063f;
NewPos.Z = 0.468f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -13.144f;
NewPos.Y = -114.224f;
NewPos.Z = 0.013f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = 34.100f;
NewPos.Y = -58.812f;
NewPos.Z = 0.014f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = 19.662f;
NewPos.Y = 98.160f;
NewPos.Z = 0.006f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 16.049f;
NewPos.Y = 64.136f;
NewPos.Z = 0.573f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -14.432f;
NewPos.Y = 126.751f;
NewPos.Z = 0.076f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -9.246;
NewPos.Y = 200.487f;
NewPos.Z = -0.005f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = -63.306f;
NewPos.Y = 176.662f;
NewPos.Z = -0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -92.719f;
NewPos.Y = 145.071f;
NewPos.Z = 0.021f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -92.137f;
NewPos.Y = 67.515f;
NewPos.Z = -1.350f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -42.059f;
NewPos.Y = 74.158f;
NewPos.Z = 0.048f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 6.385f;
NewPos.Y = 43.794f;
NewPos.Z = -4.256f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -22.665f;
NewPos.Y = 27.622f;
NewPos.Z = -7.996f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -15.643f;
NewPos.Y = 21.344f;
NewPos.Z = -8.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 11.426f;
NewPos.Y = -5.549f;
NewPos.Z = -8.838f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 52.629f;
NewPos.Y = -7.140f;
NewPos.Z = -11.481f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = 30.552f;
NewPos.Y = -20.318f;
NewPos.Z = -0.738f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -9.655f;
NewPos.Y = 8.064f;
NewPos.Z = 7.460f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = -26.422f;
NewPos.Y = -13.463f;
NewPos.Z = 7.452f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = -67.220f;
NewPos.Y = 6.842f;
NewPos.Z = -0.005f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = -100.376f;
NewPos.Y = 6.165f;
NewPos.Z = 0.008f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = -65.298f;
NewPos.Y = 18.607f;
NewPos.Z = -8.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = -78.724f;
NewPos.Y = -5.086f;
NewPos.Z = -7.996f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -51.752f;
NewPos.Y = -32.870f;
NewPos.Z = -8.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -47.741f;
NewPos.Y = -17.185f;
NewPos.Z = -4.489f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -20.081f;
NewPos.Y = -7.371f;
NewPos.Z = 0.006f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -37.798f;
NewPos.Y = -0.085f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -49.555f;
NewPos.Y = -5.239f;
NewPos.Z = -4.500f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -32.315f;
NewPos.Y = 3.448f;
NewPos.Z = -4.500f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"C&C_Mesa")) {
// check if the spawn boolean allows you to spawn there and if the random number equals 1
// I won't bother writing comments for the rest, you get the idea...
if (RandomSpawn == 1 && Spawn1OK == true) {
// Set the allowed to spawn as false (this will ensure that no one else can spawn at the same place as you when they die)
Spawn1OK = false;
// Set the position of where they are to be moved to
NewPos.X = -18.321f;
NewPos.Y = 23.134f;
NewPos.Z = 7.462f;
// create a little explosion when they spawn
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = -27.755f;
NewPos.Y = 60.530f;
NewPos.Z = 7.488f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -85.255f;
NewPos.Y = 62.227f;
NewPos.Z = 10.162f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -113.034f;
NewPos.Y = 103.797f;
NewPos.Z = 18.984f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -56.230f;
NewPos.Y = 110.080f;
NewPos.Z = 4.582f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -94.167f;
NewPos.Y = 129.673f;
NewPos.Z = 7.395f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -112.643f;
NewPos.Y = 62.103f;
NewPos.Z = 6.398f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = 43.295f;
NewPos.Y = -14.815f;
NewPos.Z = 7.436f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = 15.751f;
NewPos.Y = -2.089f;
NewPos.Z = 7.435f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = 52.608f;
NewPos.Y = -39.092f;
NewPos.Z = 7.791f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 80.859f;
NewPos.Y = -56.376f;
NewPos.Z = 7.729f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 116.617f;
NewPos.Y = -81.048f;
NewPos.Z = 13.914f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = 79.490f;
NewPos.Y = -104.677f;
NewPos.Z = 8.127f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = 50.144f;
NewPos.Y = -125.766f;
NewPos.Z = 7.955f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = 16.947f;
NewPos.Y = -120.988f;
NewPos.Z = 7.687f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = 11.989f;
NewPos.Y = -152.867f;
NewPos.Z = 7.948f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -22.353f;
NewPos.Y = -132.540f;
NewPos.Z = 7.454f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 57.510f;
NewPos.Y = -67.566f;
NewPos.Z = 14.853f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 23.502f;
NewPos.Y = -64.923f;
NewPos.Z = 4.797f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = 93.051f;
NewPos.Y = -24.288f;
NewPos.Z = 13.734f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 140.336f;
NewPos.Y = -35.065f;
NewPos.Z = 7.851f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 147.182f;
NewPos.Y = -6.957f;
NewPos.Z = 6.786f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = 168.905f;
NewPos.Y = 21.064f;
NewPos.Z = 7.871f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 146.889f;
NewPos.Y = 51.662f;
NewPos.Z = 6.610f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 98.962f;
NewPos.Y = 86.684f;
NewPos.Z = 0.241f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = 67.592f;
NewPos.Y = 7.455f;
NewPos.Z = -0.002f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = 21.731f;
NewPos.Y = 71.355f;
NewPos.Z = 1.098f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 19.450f;
NewPos.Y = 123.659f;
NewPos.Z = -0.029f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -91.728f;
NewPos.Y = -1.108f;
NewPos.Z = 0.005f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -64.635f;
NewPos.Y = -82.141f;
NewPos.Z = 0.263f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -15.416f;
NewPos.Y = -12.575f;
NewPos.Z = 0.041f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -13.090f;
NewPos.Y = -73.559f;
NewPos.Z = -0.003f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"C&C_Canyon")) {
// check if the spawn boolean allows you to spawn there and if the random number equals 1
// I won't bother writing comments for the rest, you get the idea...
if (RandomSpawn == 1 && Spawn1OK == true) {
// Set the allowed to spawn as false (this will ensure that no one else can spawn at the same place as you when they die)
Spawn1OK = false;
// Set the position of where they are to be moved to
NewPos.X = -74.112f;
NewPos.Y = 104.265f;
NewPos.Z = 0.000f;
// create a little explosion when they spawn
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 13.778f;
NewPos.Y = 125.087f;
NewPos.Z = 4.651f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = -37.199f;
NewPos.Y = 109.046f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -87.891f;
NewPos.Y = 99.151f;
NewPos.Z = 14.493f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -72.725f;
NewPos.Y = 17.930f;
NewPos.Z = 18.135f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -86.858f;
NewPos.Y = -13.849f;
NewPos.Z = 4.952f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -96.162f;
NewPos.Y = -16.464f;
NewPos.Z = 11.197f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -71.342f;
NewPos.Y = -18.366f;
NewPos.Z = 18.494f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -102.372f;
NewPos.Y = -115.827f;
NewPos.Z = 16.668f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -62.311f;
NewPos.Y = -61.373f;
NewPos.Z = 2.985f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = 19.985f;
NewPos.Y = -57.477f;
NewPos.Z = 3.001f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = 39.541f;
NewPos.Y = -128.044f;
NewPos.Z = -10.475f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -4.171f;
NewPos.Y = -111.624f;
NewPos.Z = -10.475f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -90.322f;
NewPos.Y = -139.205f;
NewPos.Z = -0.001f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -85.972f;
NewPos.Y = -91.692f;
NewPos.Z = 0.292f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -3.225f;
NewPos.Y = -113.586f;
NewPos.Z = -0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -18.191f;
NewPos.Y = -71.458f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = 65.891f;
NewPos.Y = -58.523f;
NewPos.Z = 1.922f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 68.835f;
NewPos.Y = -27.321f;
NewPos.Z = 4.353f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -34.559f;
NewPos.Y = -0.757f;
NewPos.Z = 1.438f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = 0.009f;
NewPos.Y = 28.818f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 61.807f;
NewPos.Y = 16.806f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = 33.999f;
NewPos.Y = 64.939f;
NewPos.Z = 2.998f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 73.947f;
NewPos.Y = 52.360f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 65.242f;
NewPos.Y = 124.350f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = 13.812f;
NewPos.Y = 106.224f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = 25.494f;
NewPos.Y = 36.016f;
NewPos.Z = 1.363f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = 4.355f;
NewPos.Y = 30.857f;
NewPos.Z = 3.342f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -27.061f;
NewPos.Y = 50.745f;
NewPos.Z = 2.213f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = -82.431f;
NewPos.Y = 18.398f;
NewPos.Z = 2.920f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -96.335f;
NewPos.Y = 42.151f;
NewPos.Z = 12.036f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = -83.384f;
NewPos.Y = -57.888f;
NewPos.Z = 3.854f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
else if (strstr(Data->CurrMap,"C&C_Field")) {
// check if the spawn boolean allows you to spawn there and if the random number equals 1
// I won't bother writing comments for the rest, you get the idea...
if (RandomSpawn == 1 && Spawn1OK == true) {
// Set the allowed to spawn as false (this will ensure that no one else can spawn at the same place as you when they die)
Spawn1OK = false;
// Set the position of where they are to be moved to
NewPos.X = 5.273f;
NewPos.Y = 57.273f;
NewPos.Z = 0.528f;
// create a little explosion when they spawn
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 2 && Spawn2OK == true) {
Spawn2OK = false;
NewPos.X = 15.026f;
NewPos.Y = 16.863f;
NewPos.Z = 4.729f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 3 && Spawn3OK == true) {
Spawn3OK = false;
NewPos.X = 65.161f;
NewPos.Y = 11.431f;
NewPos.Z = 0.301f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 4 && Spawn4OK == true) {
Spawn4OK = false;
NewPos.X = -5.390f;
NewPos.Y = -3.360f;
NewPos.Z = 3.262f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 5 && Spawn5OK == true) {
Spawn5OK = false;
NewPos.X = -19.356f;
NewPos.Y = 42.073f;
NewPos.Z = 0.010f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 6 && Spawn6OK == true) {
Spawn6OK = false;
NewPos.X = -37.691f;
NewPos.Y = -33.976f;
NewPos.Z = 5.244f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 7 && Spawn7OK == true) {
Spawn7OK = false;
NewPos.X = -51.139f;
NewPos.Y = 32.783f;
NewPos.Z = -0.558f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 8 && Spawn8OK == true) {
Spawn8OK = false;
NewPos.X = -67.228f;
NewPos.Y = 94.305f;
NewPos.Z = 0.296f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 9 && Spawn9OK == true) {
Spawn9OK = false;
NewPos.X = -90.969f;
NewPos.Y = 54.851f;
NewPos.Z = 0.019f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 10 && Spawn10OK == true) {
Spawn10OK = false;
NewPos.X = -141.506f;
NewPos.Y = 14.592f;
NewPos.Z = -3.155f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 11 && Spawn11OK == true) {
Spawn11OK = false;
NewPos.X = -122.929f;
NewPos.Y = 74.229f;
NewPos.Z = 0.042f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 12 && Spawn12OK == true) {
Spawn12OK = false;
NewPos.X = -85.974f;
NewPos.Y = -31.588f;
NewPos.Z = -11.751f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 13 && Spawn13OK == true) {
Spawn13OK = false;
NewPos.X = -160.826f;
NewPos.Y = -69.883f;
NewPos.Z = 2.519f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 14 && Spawn14OK == true) {
Spawn14OK = false;
NewPos.X = -168.499f;
NewPos.Y = -104.218f;
NewPos.Z = -12.265f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 15 && Spawn15OK == true) {
Spawn15OK = false;
NewPos.X = -141.832f;
NewPos.Y = -96.085f;
NewPos.Z = -10.759f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 16 && Spawn16OK == true) {
Spawn16OK = false;
NewPos.X = -147.463f;
NewPos.Y = -126.542f;
NewPos.Z = -14.345f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 17 && Spawn17OK == true) {
Spawn17OK = false;
NewPos.X = -72.952f;
NewPos.Y = -82.345f;
NewPos.Z = -13.686f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 18 && Spawn18OK == true) {
Spawn18OK = false;
NewPos.X = -122.497f;
NewPos.Y = -138.255f;
NewPos.Z = -12.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 19 && Spawn19OK == true) {
Spawn19OK = false;
NewPos.X = 80.301f;
NewPos.Y = -124.017f;
NewPos.Z = -9.642f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 20 && Spawn20OK == true) {
Spawn20OK = false;
NewPos.X = -21.169f;
NewPos.Y = -83.424f;
NewPos.Z = -8.311f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 21 && Spawn21OK == true) {
Spawn21OK = false;
NewPos.X = -60.923f;
NewPos.Y = -162.247f;
NewPos.Z = 1.291f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 22 && Spawn22OK == true) {
Spawn22OK = false;
NewPos.X = 6.720f;
NewPos.Y = -74.317f;
NewPos.Z = 0.026f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 23 && Spawn23OK == true) {
Spawn23OK = false;
NewPos.X = 17.820f;
NewPos.Y = -126.877f;
NewPos.Z = -0.242f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 24 && Spawn24OK == true) {
Spawn24OK = false;
NewPos.X = 60.634f;
NewPos.Y = -59.493f;
NewPos.Z = -0.008f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 25 && Spawn25OK == true) {
Spawn25OK = false;
NewPos.X = 92.997f;
NewPos.Y = -41.580f;
NewPos.Z = -0.001f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 26 && Spawn26OK == true) {
Spawn26OK = false;
NewPos.X = 33.287f;
NewPos.Y = -43.037f;
NewPos.Z = 0.000f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 27 && Spawn27OK == true) {
Spawn27OK = false;
NewPos.X = -100.528f;
NewPos.Y = -100.433f;
NewPos.Z = -14.311f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 28 && Spawn28OK == true) {
Spawn28OK = false;
NewPos.X = -91.876f;
NewPos.Y = -73.055f;
NewPos.Z = -14.025f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 29 && Spawn29OK == true) {
Spawn29OK = false;
NewPos.X = -50.385f;
NewPos.Y = -45.760f;
NewPos.Z = -13.872f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 30 && Spawn30OK == true) {
Spawn30OK = false;
NewPos.X = 2.853f;
NewPos.Y = -40.124f;
NewPos.Z = 0.0495f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 31 && Spawn31OK == true) {
Spawn31OK = false;
NewPos.X = -75.674f;
NewPos.Y = -78.536f;
NewPos.Z = -8.954f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
else if (RandomSpawn == 32 && Spawn32OK == true) {
Spawn32OK = false;
NewPos.X = 67.757f;
NewPos.Y = -97.144f;
NewPos.Z = 1.798f;
Commands->Create_Explosion("Explosion_Crate_Large",NewPos,0);
}
// If none are available then loop again until the conditions are met (chances are very slim)
else goto Spawn;
char param[5];
sprintf(param,"%d",RandomSpawn);
// Once the position is choosen then create an object and attach the spawn refresh code to it
GameObject *Refresh = Commands->Create_Object("Invisible_Object",NewPos);
Commands->Attach_Script(Refresh,"KAK_DM_Refresh_Spawn",param);
// Move the player to there new spawn location
Commands->Set_Position(obj,NewPos);
}
}
http://www.wittebolx.com
[Updated on: Wed, 30 January 2008 04:36] Report message to a moderator
|
|
|
Re: Server Side Hunt The Player [message #314593 is a reply to message #313512] |
Wed, 30 January 2008 05:06 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
I was so tempted to quote all that
Thankyou for sharing, I personally know what a pain in the ass it was to copy that shit from dm.ini. I will update the source and release it so everyone can host more maps
Use this instead:
Change_Character(obj,RandomSpawnCharacter[Index][0]);
Change_Character is not a script command class...
Your array will work, but it will only work properly if you update:
/////////////////////////////////////////////////////////////////////////////
// This code here ensures a random number is drawn between 1 and 100
//int Rnd = Commands->Get_Random_Int(1,100);
to:
/////////////////////////////////////////////////////////////////////////////
// This code here ensures a random number is drawn between 1 and 100
//int Rnd = Commands->Get_Random_Int(1,270);
and then change:
// if (Rnd <= 10) Index = 2;
// else if (Rnd<=20) Index = 1;
// else if (Rnd<=30) Index = 0;
To allow for all the extra Index possibilities...
The DNA goes away because essentially the preset has been destroyed, and the object has a MDB script on it that destroys the object when this happens.
You would have to re-attach the DNA strand to the person after you have set there preset to the new version.
Check out how it is attached in void hunted_player::Created(GameObject *obj){, and apply it to your chat hook after the point that you have set there new preset.
Something like this:
GameObject *Icon = Commands->Create_Object_At_Bone(obj,"Invisible_Object","c HEAD");
Commands->Set_Model(Icon,"p_tnanites");
Commands->Attach_To_Object_Bone(Icon,obj,"c HEAD");
Commands->Attach_Script(Icon,"MDB_SSGM_Destroy_When_Object_Destroyed",ToString(Commands- >Get_ID(obj)).c_str());
|
|
|
|
|
|
|
|
|
|
Re: Server Side Hunt The Player [message #315470 is a reply to message #313512] |
Mon, 04 February 2008 17:09 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Thanks to whitebolx's input there is now support for m01, m03, m05, m07, m02, m06 and m08. Downloads have been altered to reflect this.
|
|
|
Re: Server Side Hunt The Player [message #315522 is a reply to message #313512] |
Tue, 05 February 2008 00:43 |
|
mvrtech
Messages: 81 Registered: March 2007 Location: UK
Karma: 0
|
Recruit |
|
|
Ok thanks for that i will see if team -1 will allow the health upgeade
I have commands in all my games so i can spawn either a bike, tank or either sides helecopters at my location, i will take another look at it and see if i can get it going
I has a cheezeburger
[Updated on: Tue, 05 February 2008 00:49] Report message to a moderator
|
|
|
|
|
|
|
Re: Server Side Hunt The Player [message #315647 is a reply to message #313512] |
Tue, 05 February 2008 16:31 |
|
mvrtech
Messages: 81 Registered: March 2007 Location: UK
Karma: 0
|
Recruit |
|
|
i use this lua for a recon bike
end
if Message == "!recon" or Message == "!purchase nodrecon" then
local pos = Get_Position(Get_GameObj(pID))
if Get_Team(pID) == -1 then
if Get_Money(pID) < 600 then
InputConsole("ppage %d [NR] You need 600 credits", pID)
else
pos:AssignY(pos:GetY()+1)
pos:AssignX(pos:GetX()+1)
pos:AssignZ(pos:GetZ()+1)
turret = Create_Object("Nod_Recon_Bike_Player", pos)
Attach_Script_Once(turret, "JFW_Base_Defence", "5,100,1")
if turret == nil then
InputConsole("ppage %d [NR] Error creating bike", pID)
else
Set_Money(pID, Get_Money(pID)-600)
end
end
I has a cheezeburger
|
|
|
|
|
Re: Server Side Hunt The Player [message #316086 is a reply to message #313512] |
Thu, 07 February 2008 20:24 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Incase anyone wanted to add some maps and get some spawn positions, I made a handy little chat hook that is allot more useful then using level edit to go around and get the exact x,y,z for your spawn positions.
The text will output in the renlog and is set up to easily copy/paste into your solution.
class posChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
Vector3 CurPosition = Commands->Get_Position(obj);
Console_Input(StrFormat("msg NewPos.X = %ff;",CurPosition.X).c_str());
Console_Input(StrFormat("msg NewPos.Y = %ff;",CurPosition.Y).c_str());
Console_Input(StrFormat("msg NewPos.Z = %ff;",CurPosition.Z).c_str());
}
};
ChatCommandRegistrant<posChatCommand> posChatCommandReg("!pos",CHATTYPE_TEAM,0,GAMEMODE_ALL);
Would come in useful for servers hosting custom maps and they want to quickly add support.
|
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Oct 31 10:28:15 MST 2024
Total time taken to generate the page: 0.01282 seconds
|