Ghost_Aut
04.05.2009, 19:45
Hallo leute ich hätte da ne frage zu einem Code!
die ich aus ner map Herrausgenommen habe und sie gerne in ne mission einzubinden! leider bin ich nicht so gut beim Scripten vielleicht könnt ihr mir helfen und mir sagen was ich da falsch mache! die akt. geht zwar ganz gut nur am schluss bekomme ich ne felermeldung!!
if (! isServer) exitWith {};
if (missionStarted) then
{
missionStarted = false;
publicVariable "missionStarted";
};
if (missionEnd) then
{
// 29 sec. delay for misend.sqf
sleep 14;
missionEnd = false;
publicVariable "missionEnd";
};
_missions = ((count missionArray)-1);
if (_missions < 14 + param2) then
{
waitUntil {(!(missionEnd))};
nomoremissions = true;
publicVariable "nomoremissions";
};
if (nomoremissions) exitWith {};
_objectiv = missionArray select (round (random _missions));
missionArray = missionArray - [_objectiv];
publicVariable "missionArray";
sleep 1;
switch (_objectiv) do
{
case ("m1"):
{
_nul = [] execVM "mission\m_chantico.sqf";
currentMission = "Chantico";
publicVariable "currentMission";
};
case ("m2"):
{
_nul = [] execVM "mission\m_dolores.sqf";
currentMission = "Dolores";
publicVariable "currentMission";
};
case ("m3"):
{
_nul = [] execVM "mission\m_paraiso.sqf";
currentMission = "Paraiso";
publicVariable "currentMission";
};
};
die ich aus ner map Herrausgenommen habe und sie gerne in ne mission einzubinden! leider bin ich nicht so gut beim Scripten vielleicht könnt ihr mir helfen und mir sagen was ich da falsch mache! die akt. geht zwar ganz gut nur am schluss bekomme ich ne felermeldung!!
if (! isServer) exitWith {};
if (missionStarted) then
{
missionStarted = false;
publicVariable "missionStarted";
};
if (missionEnd) then
{
// 29 sec. delay for misend.sqf
sleep 14;
missionEnd = false;
publicVariable "missionEnd";
};
_missions = ((count missionArray)-1);
if (_missions < 14 + param2) then
{
waitUntil {(!(missionEnd))};
nomoremissions = true;
publicVariable "nomoremissions";
};
if (nomoremissions) exitWith {};
_objectiv = missionArray select (round (random _missions));
missionArray = missionArray - [_objectiv];
publicVariable "missionArray";
sleep 1;
switch (_objectiv) do
{
case ("m1"):
{
_nul = [] execVM "mission\m_chantico.sqf";
currentMission = "Chantico";
publicVariable "currentMission";
};
case ("m2"):
{
_nul = [] execVM "mission\m_dolores.sqf";
currentMission = "Dolores";
publicVariable "currentMission";
};
case ("m3"):
{
_nul = [] execVM "mission\m_paraiso.sqf";
currentMission = "Paraiso";
publicVariable "currentMission";
};
};