hey i am trying to make a door open as rotating and stop at where i set it, here is my code i defined the closed and open, i want it to rotate like a door should open
PHP код:
cmd(bdop, playerid, params[])
{
if(!IsCop(playerid))//CreateObject(1495, 1498.55640, -1044.58679, 600.53223, 0.00000, 0.00000, -94.86004);
{
return SendClientMessage(playerid, COLOR_RED, "You are not a Bank Staff.");
}
if(PlayerToPoint(2.0,playerid,1500.3375,-1044.1240,601.5460))
{
// open for player
MoveObject(bDoor,1498.55640, -1044.58679, 600.53223,0.50);
return 1;
}
else SendClientMessage(playerid, 0xAA3333AA, "[Error]: {FFFFFF} You are not around a control pad!");
return 1;
}
cmd(bdcl, playerid, params[])
{
if(!IsCop(playerid))
{
return SendClientMessage(playerid, COLOR_RED, "You are not a Bank Staff.");
}
if(PlayerToPoint(2.0,playerid,1500.3375,-1044.1240,601.5460))
{
// close for player
MoveObject(bDoor,1498.55640, -1044.58679, 600.53223,0.50);
return 1;
}
else SendClientMessage(playerid, 0xAA3333AA, "[Error]: {FFFFFF} You are not around a control pad!");
return 1;
}