16.10.2013, 13:17
Hey, this is from Wennicke's police interior map. The command seems to work but the doors do not move? I get the PlayerActionMessage but nothing else happens. I use Incognito's streamer and changed to MoveDynamicObject from MoveObject but it's still not working.
pawn Код:
CMD:dooropen(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,1487.00000000,-1762.42504883,3284.23608398)) //Door 0
{
MoveDynamicObject(door0, 1487.00000000,-1762.42504883+1.25,3284.23608398, 0.50);
PlayerActionMessage(playerid, 20.0, "unlocks and opens the door.");
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1483.79003906,-1762.42504883,3284.23608398)) //Door 1
{
MoveDynamicObject(door1,1483.79003906,-1762.42504883+1.25,3284.23608398,0.50);
PlayerActionMessage(playerid, 20.0, "unlocks and opens the door.");
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1479.85998535,-1758.31994629,3284.23388672)) //Door 2
{
MoveDynamicObject(door2,1479.85998535-1.25,-1758.31994629,3284.23388672,0.50);
PlayerActionMessage(playerid, 20.0, "unlocks and opens the door.");
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1467.06701660,-1758.31994629,3284.23388672)) //Door 3
{
MoveDynamicObject(door3,1467.06701660-1.25,-1758.31994629,3284.23388672,0.50);
PlayerActionMessage(playerid, 20.0, "unlocks and opens the door.");
} else return SCM(playerid, COLOR_LIGHTRED, "[Error]: You're not by any door.");
return 1;
}