14.09.2011, 04:12
what i need to do when player press Onkey F lift get down and when he press F again lift go up help!
Код:
if(PRESSED(KEY_SECONDARY_ATTACK))
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
if(gTeam[playerid] == TEAM_ARMY)
{
if(x >= 1000.30 && x <= 1031.69 && y >= -2352.85 && y <= -2319.59)
{
MoveObject(lift,1015.39, -2336.91, 12.19,3);
SendClientMessage(playerid,COLOR_GREEN,"Lift Going Down");
LiftDown =1;
}
if(x >= 1000.30 && x <= 1031.69 && y >= -2352.85 && y <= -2319.59)
{
if(LiftDown == 1)
{
MoveObject(lift,1015.39, -2336.91, 19.24,3);
SendClientMessage(playerid,COLOR_GREEN,"Lift Going Up");
}
}
}
}

