30.09.2011, 11:39
Hey there ,
I've been trying to script an elevator , everything is working fine till now except one thing :
It's all working fine but how can i make it that if the elevator is moving up the player won't be able to use /eledown until the elevator reaches it up.
Thanks in advance .
I've been trying to script an elevator , everything is working fine till now except one thing :
Code:
//=================ELEUP==========================
if (strcmp("/eleup", cmdtext, true, 10) == 0){
MoveObject(object2,1222.9000244141, -1667, 29.10000038147, 2.00);
SetTimer("ele", 8000, 0);
}
//====================ELECDOWN==========================
if (strcmp("/eledown", cmdtext, true, 10) == 0){
MoveObject(object2,1222.9000244141, -1667, 29.10000038147, 2.00);
SetTimer("eledown", 4000, 0);
}
//=================================================
public ele()
{
MoveObject(object2,1213.5999755859, -1668.1999511719, 29.10000038147, 3.00);
return 1;
}
//=================================================
public eledown()
{
MoveObject(object2,1222.3000488281, -1668.0999755859, 12.5, 3.00);
return 1;
}
//I've done this timer thingy because the elevator doesn't go straight up , moves left and right aswell ..
Thanks in advance .

