if(newkeys & 16)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 266.8070,79.8379,1001.0391)){
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
// FACTION CHECK HERE !
if(!pddooropen[0]){
MoveObject(pddoor[0], 266.30, 83.97, 1001.27, 2, 0, 0, 270);
pddooropen[0] = true;
return PlayerActionMsg(playerid, "opens the cell gate");
}
MoveObject(pddoor[0], 266.31, 82.97, 1001.27, 2, 0, 0, 270);
pddooropen[0] = false;
return PlayerActionMsg(playerid, "closes the cell gate");
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 266.37, 84.35, 1001.57)){
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
// FACTION CHECK HERE !
if(!pddooropen[1]){
MoveObject(pddoor[0], 266.30, 79.50, 1001.27, 1.5, 0, 0, 270);
pddooropen[1] = true;
return PlayerActionMsg(playerid, "opens the cell gate");
}
MoveObject(pddoor[01], 266.31, 82.97, 1001.27, 1.5, 0, 0, 270);
pddooropen[1] = false;
return PlayerActionMsg(playerid, "closes the cell gate");
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 266.36, 88.59, 1001.57)){
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
// FACTION CHECK HERE !
if(!pddooropen[2]){
MoveObject(pddoor[2], 266.29, 84.79, 1001.27, 1.5, 0, 0, 270);
pddooropen[2] = true;
return PlayerActionMsg(playerid, "opens the cell gate");
}
MoveObject(pddoor[2], 266.31, 87.47, 1001.27, 1.5, 0, 0, 270);
pddooropen[2] = false;
return PlayerActionMsg(playerid, "closes the cell gate");
}
}
// SD Cells
pddoor[0] = CreateDynamicObject(19302, 266.31, 82.97, 1001.27, 0.00, 0.00, 270.00, -1, -1, -1, 50); // door 1
//Opened: 266.30, 83.97, 1001.27
pddoor[1] = CreateDynamicObject(19302, 266.29, 78.47, 1001.27, 0.00, 0.00, 270.00, -1, -1, -1, 50); // door 2
//Opened:266.30, 79.50, 1001.27
pddoor[2] = CreateDynamicObject(19302, 266.31, 87.47, 1001.27, 0.00, 0.00, 270.00, -1, -1, -1, 50); // door 3
//Opened: 266.29, 84.79, 1001.27
new pddoor[3]; // 0 - cell1 1 - cell2 2 - cell3
new bool:pddooropen[3];
MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed);
MoveObject(//blah blah
MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed);
|
MoveDynamicObject doesn't have the RotX, Y, Z option, and it sets it to 0, instead of 270 as I set it. :/
|
GetDynamicObjectRot(objectid, Float:rx, Float:ry, Float:rz);
SetDynamicObjectRot(objectid, Float:rx, Float:ry, Float:rz);
|
I think I'll leave those three objects out of the streamer, won't cause much problems.
|