Ok...
I'm working on a lift which activates when you stand on it.
Got it and its working... But if the lift gets up I fall trough the lift. Some 1 knows why ? I already tried it to give the lift a place and link to the player if he is in range...
[PHP] if(Distance(self.origin, player.origin) <50){
place = "lift";
while(place == "lift"){
player linkto(level.center.origin);
}
}[/PHP]
But doesnt work

This is my current code for the lift:
[PHP]LiftThink(open, close)
{
while(1)
{
if(self.hp > 0){
self waittill ( "triggeruse" , player );
if(player.team == "allies"){
if(self.state == "open"){
self MoveTo(close, level.doorwait);
wait level.doorwait;
self.state = "close";
continue;
}
if(self.state == "close"){
self MoveTo(open, level.doorwait);
wait level.doorwait;
self.state = "open";
wait 2;
self thread ResetLift(open);
continue;
}
}
if(player.team == "axis"){
if(self.state == "open"){
self MoveTo(close, level.doorwait);
wait level.doorwait;
self.state = "close";
continue;
}
if(self.state == "close"){
self MoveTo(open, level.doorwait);
wait level.doorwait;
self.state = "open";
wait 2;
self thread ResetLift(open);
continue;
}
}
}
}
}



LiftUse(range)
{
self endon("disconnect");
while(1)
{
foreach(player in level.players)
{
if(Distance(self.origin, player.origin) <= self.range){
if(player.buttonPressed[ "+activate" ] == 1){
self notify( "triggeruse" , player);
player moveto(level.center);
}
}
}
wait 0.45;
}
}

ResetLift(open)
{
while(1)
{
self waittill("RESETDOORS");
self MoveTo(open, level.doorwait);
self.state = "open";
}
}[/PHP]

I would love you if you get it working for me! /