sure here it is:

do i need tot make a tread();?

*Code:*

main() {
maps\mp\_load::main();
maps\mp\elevator::main();
maps\mp\kabelbaan::main();
maps\mp\trein::main();
maps\mp\slidingdoors::main();
maps\mp\mp_fearvillage_drown::main();
maps\mp\mp_fearvillage_fx::main();
// set background ambient noise
ambientPlay("ambient_mp_fearvillage");
// setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
setCullFog(0, 10000, 0.55, 0.6, 0.55, 0);
game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "airborne";
game["german_soldiertype"] = "coats";
// Set some cvars
setcvar("r_glowbloomintensity0","1");
setcvar("r_glowbloomintensity1","1");
setcvar("r_glowskybleedintensity0",".5");
thread door1_move();
thread door2_rotate();
thread door3_rotate();
thread door4_rotate();
thread door5a_rotate();
thread door5b_rotate();
thread door6a_rotate();
thread door6b_rotate();
thread door7_rotate();
thread door8_rotate();
}
door1_move()
{
door1 = getent("door1", "targetname");
trig = getent("door_trigger1",
"targetname");
while (1)
{
trig waittill("trigger");
door1 movex(50, 1.5, 0.7, 0.7);
door1 playsound ("dooropen");
door1 waittill("movedone");
wait (3);
door1 movex(-50, 1.5, 0.7, 0.7);
door1 playsound ("doorclose");
door1
waittill("movedone");
}
}
door2_rotate()
{
door2 = getent("door2", "targetname");
trig =
getent("door_trigger2", "targetname");
while (1)
{
trig waittill("trigger");
door2 rotateYaw(90, 1.5, 0.7, 0.7);
door2
playsound ("dooropen");
door2 waittill("rotatedone");
wait (3);
door2 rotateYaw(-90, 1.5, 0.7, 0.7);
door2 playsound
("doorclose");
door2 waittill("rotatedone");
}
}
door3_rotate()
{
door3 = getent("door3", "targetname");
trig =
getent("door_trigger3", "targetname");
while (1)
{
trig waittill("trigger");
door3 rotateYaw(-90, 1.5, 0.7, 0.7);
door3
playsound ("dooropen");
door3 waittill("rotatedone");
wait (3);
door3 rotateYaw(90, 1.5, 0.7, 0.7);
door3 playsound
("doorclose");
door3 waittill("rotatedone");
}
}
door4_rotate()
{
door4 = getent("door4", "targetname");
trig =
getent("door_trigger4", "targetname");
while (1)
{
trig waittill("trigger");
door4 rotateYaw(-90, 1.5, 0.7, 0.7);
door4
playsound ("dooropen");
door4 waittill("rotatedone");
wait (3);
door4 rotateYaw(90, 1.5, 0.7, 0.7);
door4 playsound
("doorclose");
door4 waittill("rotatedone");
}
}
door5a_rotate()
{
door5a = getent("door5", "targetname");
trig = getent("door_trigger5a",
"targetname");
while (1)
{
trig waittill("trigger");
door5a rotateYaw(90, 1.5, 0.7, 0.7);
door5a
playsound ("dooropen");
door5a waittill("rotatedone");
wait (3);
door5a rotateYaw(-90, 1.5, 0.7, 0.7);
door5a playsound
("doorclose");
door5a waittill("rotatedone");
}
}
door5b_rotate()
{
door5b = getent("door5", "targetname");
trig = getent("door_trigger5b",
"targetname");
while (1)
{
trig waittill("trigger");
door5b rotateYaw(-90, 1.5, 0.7, 0.7);
door5b
playsound ("dooropen");
door5b waittill("rotatedone");
wait (3);
door5b rotateYaw(90, 1.5, 0.7, 0.7);
door5b playsound
("doorclose");
door5b waittill("rotatedone");
}
}
door6_rotate1()
{
trig = getent("door_trigger6", "targetname");
door = getent(trig.script_noteworthy, "targetname");
while (1)
{
trig waittill("trigger", other);
rotatearray = thread rotation_dir(door, other);
door rotateYaw(rotatearray[0],1.5,0.7,0.7);
door playsound ("dooropen");
door waittill("rotatedone");
wait (2);
while (other istouching (trig))
wait (1);
wait (2);
door rotateYaw(rotatearray[1],1.5,0.7,0.7);
door playsound ("mp_v2_bunkerdoorback");
door waittill("rotatedone");
door playsound ("doorclose");
}
}
door7_rotate()
{
door7 = getent ("door7", "targetname");
trig = getent ("door_trigger7", "targetname");
while(1)
{
trig waittill ("trigger");
door7 rotateroll (90,0.5);
door7 waittill ("rotatedone");
trig waittill ("trigger");
door7 rotateroll (-90,0.5);
door7 waittill ("rotatedone");
}
}
door8_rotate()
{
door8 = getent ("door8", "targetname");
trig = getent ("door_trigger8", "targetname");
while(1)
{
trig waittill ("trigger");
door8 rotateroll (90,0.5);
door8 waittill ("rotatedone");
trig waittill ("trigger");
door8 rotateroll (-90,0.5);
door8 waittill ("rotatedone");
}
}
level.liftmoving = false;
level.direction = 553;
thread lift();
trig = getentarray("verzoektrigger", "targetname");
for (i=0; i < trig.size; i++)
{
trig[i] thread verzoeklift();
}
}
lift()
{
lift= getent ("lift", "targetname");
deurrechts= getent ("dr", "targetname");
deurlinks= getent ("dl", "targetname");
trig= getent ("triggerlift", "targetname");
trig enableLinkTo();
trig linkTo(lift);
while(1)
{
trig waittill ("trigger");
if (!level.liftmoving)
{
level.liftmoving = true;
lift playsound("doorclose");
deurrechts movex(47,2);
deurlinks movex(-47,2);
deurlinks waittill ("movedone");
lift playloopsound("elevator");
lift movez (level.direction,5);
deurrechts movez(level.direction,5);
deurlinks movez(level.direction,5);
deurlinks waittill ("movedone");
lift stoploopsound("elevator");
lift playsound("dooropen");
deurrechts movex(-47,2);
deurlinks movex(47,2);
deurlinks waittill ("movedone");
level.direction = level.direction * -1;
level.liftmoving = false;
}
}
}
verzoeklift()
{
lift= getent ("lift", "targetname");
deurrechts= getent ("dr", "targetname");
deurlinks= getent ("dl", "targetname");
while(1)
{
self waittill ("trigger");
if (!level.liftmoving)
{
level.liftmoving = true;
lift playsound("doorclose");
deurrechts movex(47,2);
deurlinks movex(-47,2);
deurlinks waittill ("movedone");
lift playloopsound("elevator");
lift movez (level.direction,5);
deurrechts movez(level.direction,5);
deurlinks movez(level.direction,5);
deurlinks waittill ("movedone");
lift stoploopsound("elevator");
lift playsound("dooropen");
deurrechts movex(-47,2);
deurlinks movex(47,2);
deurlinks waittill ("movedone");
level.direction = level.direction * -1;
level.liftmoving = false;
}
}
}