10.01.2012, 11:24
I have a problem with move object. Everything else works, the messages are show and animations are applied like it should to but the objects don't move.
I use Incognito's Streamer.
OnPlayerKeyStateChange
OnFilterScriptInit
on top of the FS
What am I doing wrong here?
I use Incognito's Streamer.
OnPlayerKeyStateChange
pawn Код:
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");
}
}
pawn Код:
// 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
pawn Код:
new pddoor[3]; // 0 - cell1 1 - cell2 2 - cell3
new bool:pddooropen[3];